github.com/AngusLu/go-swagger@v0.28.0/fixtures/diff/refprop.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/A1" }
   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          "wasRef":{ "$ref": "#/definitions/A5" }
   203        }
   204      },
   205      "A2": {
   206        "type": "object",
   207        "required": [ "name", "description" ],
   208        "properties": {
   209          "name": { "type": "string" },
   210          "description": { "type": "string" }
   211        }
   212      },
   213      "A3": {
   214        "type": "object",
   215        "properties": {
   216          "id": { "type": "integer" },
   217          "name": { "type": "string" },
   218          "description": { "type": "string" },
   219          "letters": {
   220            "type": "array",
   221            "items": { "type": "string" }
   222          },
   223          "attributes": {
   224            "type": "object",
   225            "additionalProperties": { "type": "string" }
   226          }
   227        }
   228      },
   229      "A4": {
   230        "type": "object",
   231        "properties": {
   232          "id": { "type": "integer" },
   233          "name": { "type": ["string", "null"] },
   234          "changeRef": { "$ref": "#/definitions/A5" },
   235          "str": { "type": "string" }
   236        }
   237      },
   238      "A5": {
   239        "type": "object",
   240        "properties": {
   241          "thing": { "type": "integer" },
   242          "name": { "type": "string" }
   243        }
   244      },
   245      "A6": {
   246        "type": "object",
   247        "properties": {
   248          "id": { "type": "integer" },
   249          "name": { "type": "string" },
   250          "obj": { "$ref": "#/definitions/A5" },
   251          "objs": { "type": "array",
   252                    "items": { "$ref": "#/definitions/A5" }
   253          },
   254          "str": { "type": "string" }
   255        }
   256      },
   257      "B1": {
   258        "type": "object",
   259        "allOf": [
   260          { "$ref": "#/definitions/A2" },
   261          {
   262            "required": ["req"],
   263            "properties": {
   264              "req": { "type": "string" },
   265              "opt": { "type": "string" }
   266            }
   267          }
   268        ]
   269      },
   270      "B2": {
   271        "type": "object",
   272        "allOf": [
   273          { "$ref": "#/definitions/A3" },
   274          {
   275            "properties": {
   276              "key1": { "type": "integer" },
   277              "key2": { "type": "string" }
   278            }
   279          }
   280        ]
   281      },
   282      "B3": {
   283        "type": "object",
   284        "properties": {
   285          "name": { "type": "string" }
   286        }
   287      },
   288      "C1": {
   289        "type": "object",
   290        "properties": {
   291          "id": { "type": "integer" },
   292          "name": { "type": "string" }
   293        }
   294      },
   295      "C2": {
   296        "type": "object",
   297        "properties": {
   298          "existing": { "$ref": "#/definitions/C3" }
   299        }
   300      },
   301      "C3": {
   302        "type": "object",
   303        "required": [ "a" ],
   304        "properties": {
   305          "a": { "type": "string" },
   306          "b": { "type": "string" }
   307        }
   308      },
   309      "C4": {
   310        "type": "object",
   311        "required": [ "a", "b" ],
   312        "properties": {
   313          "a": { "type": "string" },
   314          "b": { "type": "string" }
   315        }
   316      }
   317    }
   318  }