github.com/go-swagger/go-swagger@v0.31.0/fixtures/diff/response.v2.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "Swagger Fixture",
     5      "version": "1.0"
     6    },
     7    "paths": {
     8      "/a/": {
     9        "get": {
    10          "parameters": [
    11            {
    12              "name": "limit",
    13              "in": "query",
    14              "required": false,
    15              "type": "integer"
    16            }
    17          ],
    18          "responses": {
    19            "201": {
    20              "description": "200 response",
    21              "schema": {
    22                "type": "array",
    23                "items": { "$ref": "#/definitions/A1" }
    24              }
    25            }
    26          }
    27        },
    28        "put": {
    29          "parameters": [
    30            {
    31              "name": "",
    32              "in": "body",
    33              "schema": { "$ref": "#/definitions/A2" }
    34            }
    35          ],
    36          "responses": {
    37            "200": {
    38              "description": "200 response",
    39              "schema": { "$ref": "#/definitions/A3" }
    40            }
    41          }
    42        }
    43      },
    44      "/a/{id}": {
    45        "get": {
    46          "parameters": [
    47            {
    48              "name": "id",
    49              "in": "path",
    50              "required": true,
    51              "type": "integer"
    52            }
    53          ],
    54          "responses": {
    55            "200": {
    56              "description": "200 response",
    57              "schema": { "$ref": "#/definitions/A3" }
    58            }
    59          }
    60        },
    61        "patch" : {
    62          "parameters": [
    63            {
    64              "name": "id",
    65              "in": "path",
    66              "required": true,
    67              "type": "integer"
    68            },
    69            {
    70              "name": "",
    71              "in": "body",
    72              "schema": { "$ref": "#/definitions/A4" }
    73            }
    74          ],
    75          "responses": {
    76            "200": {
    77              "description": "200 response",
    78              "schema": { "$ref": "#/definitions/A6" }
    79            }
    80          }
    81        }
    82      },
    83      "/newpath/": {
    84        "post": {
    85          "parameters": [
    86            {
    87              "name": "",
    88              "in": "body",
    89              "schema": { "$ref": "#/definitions/B3" }
    90            }
    91          ],
    92          "responses": {
    93            "200": {
    94              "description": "200 response",
    95              "schema": { "$ref": "#/definitions/A1" }
    96            }
    97          }
    98        }
    99      },
   100      "/c/": {
   101        "get": {
   102          "responses": {
   103            "200": {
   104              "description": "200 response",
   105              "schema": {
   106                "type": "array",
   107                "items": { "$ref": "#/definitions/C1" }
   108              }
   109            },
   110            "201": {
   111              "description": "201 response",
   112              "schema": {
   113                "type": "array",
   114                "items": { "$ref": "#/definitions/C1" }
   115              }
   116            }
   117          }
   118        },
   119        "post": {
   120          "parameters": [
   121            {
   122              "name": "",
   123              "in": "body",
   124              "schema": { "$ref": "#/definitions/C2" }
   125            }
   126          ],
   127          "responses": {
   128            "200": {
   129              "description": "200 response"
   130            },
   131            "204": {
   132              "description": "204 response",
   133              "schema": {"$ref": "#/definitions/C6"}
   134            }
   135          }
   136        }
   137      }
   138    },
   139    "definitions": {
   140      "A1": {
   141        "type": "object",
   142        "properties": {
   143          "id": { "type": "integer" },
   144          "name": { "type": "string" }
   145        }
   146      },
   147      "A2": {
   148        "type": "object",
   149        "required": [ "name", "description" ],
   150        "properties": {
   151          "name": { "type": "string" },
   152          "description": { "type": "string" }
   153        }
   154      },
   155      "A3": {
   156        "type": "object",
   157        "properties": {
   158          "id": { "type": "integer" },
   159          "name": { "type": "string" },
   160          "description": { "type": "integer", "format": "int32" },
   161          "colour":{"type": "string"},
   162          "letters": {
   163            "type": "array",
   164            "items": { "type": "string" }
   165          },
   166          "attributes": {
   167            "type": "object",
   168            "additionalProperties": { "type": "string" }
   169          }
   170        }
   171      },
   172      "A4": {
   173        "type": "object",
   174        "properties": {
   175          "id": { "type": "integer" },
   176          "name": { "type": ["string", "null"] },
   177          "obj": { "$ref": "#/definitions/A5" },
   178          "str": { "type": "string" }
   179        }
   180      },
   181      "A5": {
   182        "type": "object",
   183        "properties": {
   184          "thing": { "type": "integer" },
   185          "name": { "type": "string" }
   186        }
   187      },
   188      "A6": {
   189        "type": "object",
   190        "properties": {
   191          "id": { "type": "integer" },
   192          "name": { "type": "string" },
   193          "obj": { "$ref": "#/definitions/A5" },
   194          "objs": { "type": "array",
   195                    "items": { "$ref": "#/definitions/A5" }
   196          },
   197          "str": { "type": "string" }
   198        }
   199      },
   200      "B1": {
   201        "type": "object",
   202        "allOf": [
   203          { "$ref": "#/definitions/A2" },
   204          {
   205            "required": ["req"],
   206            "properties": {
   207              "req": { "type": "string" },
   208              "opt": { "type": "string" }
   209            }
   210          }
   211        ]
   212      },
   213      "B2": {
   214        "type": "object",
   215        "allOf": [
   216          { "$ref": "#/definitions/A4" },
   217          {
   218            "properties": {
   219              "key1": { "type": "integer" },
   220              "key2": { "type": "string" }
   221            }
   222          }
   223        ]
   224      },
   225      "B3": {
   226        "type": "object",
   227        "properties": {
   228          "name": { "type": "string" }
   229        }
   230      },
   231      "C1": {
   232        "type": "object",
   233        "properties": {
   234          "id": { "type": "integer" },
   235          "name": { "type": "string" }
   236        }
   237      },
   238      "C2": {
   239        "type": "object",
   240        "properties": {
   241          "existing": { "$ref": "#/definitions/C3" }
   242        }
   243      },
   244      "C3": {
   245        "type": "object",
   246        "required": [ "a" ],
   247        "properties": {
   248          "a": { "type": "string" },
   249          "b": { "type": "string" }
   250        }
   251      },
   252      "C4": {
   253        "type": "object",
   254        "required": [ "a", "b" ],
   255        "properties": {
   256          "a": { "type": "string" },
   257          "b": { "type": "string" }
   258        }
   259      },
   260      "C5": {
   261        "required": [ "a"],
   262        "properties": {
   263          "a": {
   264            "type": "object"
   265          }
   266        }
   267      },
   268      "C6": {
   269        "required": [ "a"],
   270        "properties": {
   271          "a": {
   272            "type": "array",
   273            "items": {"type": "string"}
   274          }
   275        }
   276      }
   277    }
   278  }