github.com/AngusLu/go-swagger@v0.28.0/fixtures/diff/path.v1.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            "200": {
    20              "description": "200 response",
    21              "schema": {
    22                "type": "array",
    23                "items": { "$ref": "#/definitions/A1" }
    24              }
    25            }
    26          }
    27        },
    28        "post": {
    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        "post": {
    62          "deprecated": true,
    63          "parameters": [
    64            {
    65              "name": "id",
    66              "in": "path",
    67              "required": true,
    68              "type": "integer"
    69            }
    70          ],
    71          "responses": {
    72            "200": {
    73              "description": "200 response",
    74              "schema": { "$ref": "#/definitions/A3" }
    75            }
    76          }
    77        },
    78        "patch" : {
    79          "parameters": [
    80            {
    81              "name": "id",
    82              "in": "path",
    83              "required": true,
    84              "type": "integer"
    85            },
    86            {
    87              "name": "",
    88              "in": "body",
    89              "schema": { "$ref": "#/definitions/A4" }
    90            }
    91          ],
    92          "responses": {
    93            "200": {
    94              "description": "200 response",
    95              "schema": { "$ref": "#/definitions/A6" }
    96            }
    97          }
    98        },
    99        "put" : {
   100          "parameters": [
   101            {
   102              "name": "id",
   103              "in": "path",
   104              "required": true,
   105              "type": "integer"
   106            },
   107            {
   108              "name": "",
   109              "in": "body",
   110              "schema": { "$ref": "#/definitions/A2" }
   111            }
   112          ],
   113          "responses": {
   114            "200": {
   115              "description": "200 response",
   116              "schema": { "$ref": "#/definitions/A3" }
   117            }
   118          }
   119        }
   120      },
   121      "/b/": {
   122        "post": {
   123          "parameters": [
   124            {
   125              "name": "",
   126              "in": "body",
   127              "schema": { "$ref": "#/definitions/B3" }
   128            }
   129          ],
   130          "responses": {
   131            "200": {
   132              "description": "200 response",
   133              "schema": { "$ref": "#/definitions/A1" }
   134            }
   135          }
   136        }
   137      },
   138      "/b/{id}": {
   139        "put": {
   140          "parameters": [
   141            {
   142              "name": "id",
   143              "in": "path",
   144              "required": true,
   145              "type": "integer"
   146            },
   147            {
   148              "name": "",
   149              "in": "body",
   150              "schema": { "$ref": "#/definitions/B1" }
   151            }
   152          ],
   153          "responses": {
   154            "200": {
   155              "description": "200 response",
   156              "schema": { "$ref": "#/definitions/B2" }
   157            }
   158          }
   159        }
   160      },
   161      "/c/": {
   162        "get": {
   163          "responses": {
   164            "200": {
   165              "description": "200 response",
   166              "schema": {
   167                "type": "array",
   168                "items": { "$ref": "#/definitions/C1" }
   169              }
   170            },
   171            "201": {
   172              "description": "201 response",
   173              "schema": {
   174                "type": "array",
   175                "items": { "$ref": "#/definitions/C1" }
   176              }
   177            }
   178          }
   179        },
   180        "post": {
   181          "parameters": [
   182            {
   183              "name": "",
   184              "in": "body",
   185              "schema": { "$ref": "#/definitions/C2" }
   186            }
   187          ],
   188          "responses": {
   189            "204": {
   190              "description": "204 response"
   191            }
   192          }
   193        }
   194      }
   195    },
   196    "definitions": {
   197      "A1": {
   198        "type": "object",
   199        "properties": {
   200          "id": { "type": "integer" },
   201          "name": { "type": "string" }
   202        }
   203      },
   204      "A2": {
   205        "type": "object",
   206        "required": [ "name", "description" ],
   207        "properties": {
   208          "name": { "type": "string" },
   209          "description": { "type": "string" }
   210        }
   211      },
   212      "A3": {
   213        "type": "object",
   214        "properties": {
   215          "id": { "type": "integer" },
   216          "name": { "type": "string" },
   217          "description": { "type": "string" },
   218          "letters": {
   219            "type": "array",
   220            "items": { "type": "string" }
   221          },
   222          "attributes": {
   223            "type": "object",
   224            "additionalProperties": { "type": "string" }
   225          }
   226        }
   227      },
   228      "A4": {
   229        "type": "object",
   230        "properties": {
   231          "id": { "type": "integer" },
   232          "name": { "type": ["string", "null"] },
   233          "obj": { "$ref": "#/definitions/A5" },
   234          "str": { "type": "string" }
   235        }
   236      },
   237      "A5": {
   238        "type": "object",
   239        "properties": {
   240          "thing": { "type": "integer" },
   241          "name": { "type": "string" }
   242        }
   243      },
   244      "A6": {
   245        "type": "object",
   246        "properties": {
   247          "id": { "type": "integer" },
   248          "name": { "type": "string" },
   249          "obj": { "$ref": "#/definitions/A5" },
   250          "objs": { "type": "array",
   251                    "items": { "$ref": "#/definitions/A5" }
   252          },
   253          "str": { "type": "string" }
   254        }
   255      },
   256      "B1": {
   257        "type": "object",
   258        "allOf": [
   259          { "$ref": "#/definitions/A2" },
   260          {
   261            "required": ["req"],
   262            "properties": {
   263              "req": { "type": "string" },
   264              "opt": { "type": "string" }
   265            }
   266          }
   267        ]
   268      },
   269      "B2": {
   270        "type": "object",
   271        "allOf": [
   272          { "$ref": "#/definitions/A3" },
   273          {
   274            "properties": {
   275              "key1": { "type": "integer" },
   276              "key2": { "type": "string" }
   277            }
   278          }
   279        ]
   280      },
   281      "B3": {
   282        "type": "object",
   283        "properties": {
   284          "name": { "type": "string" }
   285        }
   286      },
   287      "C1": {
   288        "type": "object",
   289        "properties": {
   290          "id": { "type": "integer" },
   291          "name": { "type": "string" }
   292        }
   293      },
   294      "C2": {
   295        "type": "object",
   296        "properties": {
   297          "existing": { "$ref": "#/definitions/C3" }
   298        }
   299      },
   300      "C3": {
   301        "type": "object",
   302        "required": [ "a" ],
   303        "properties": {
   304          "a": { "type": "string" },
   305          "b": { "type": "string" }
   306        }
   307      },
   308      "C4": {
   309        "type": "object",
   310        "required": [ "a", "b" ],
   311        "properties": {
   312          "a": { "type": "string" },
   313          "b": { "type": "string" }
   314        }
   315      }
   316    }
   317  }