github.com/kaisawind/go-swagger@v0.19.0/fixtures/expansion/all-the-things.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "version": "1.0.0",
     5      "title": "Swagger Petstore",
     6      "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
     7      "termsOfService": "http://helloreverb.com/terms/",
     8      "contact": {
     9        "name": "Wordnik API Team"
    10      },
    11      "license": {
    12        "name": "MIT"
    13      }
    14    },
    15    "host": "petstore.swagger.wordnik.com",
    16    "basePath": "/api",
    17    "schemes": [
    18      "http"
    19    ],
    20    "consumes": [
    21      "application/json"
    22    ],
    23    "produces": [
    24      "application/json"
    25    ],
    26    "parameters": {
    27      "idParam": {
    28        "name": "id",
    29        "in": "path",
    30        "description": "ID of pet to fetch",
    31        "required": true,
    32        "type": "integer",
    33        "format": "int64"
    34      },
    35      "tag": {
    36        "type": "string",
    37        "in": "query",
    38        "required": false
    39      },
    40      "query": {
    41        "$ref": "#/parameters/tag"
    42      }
    43    },
    44    "responses": {
    45      "petResponse": {
    46        "description": "pet response",
    47        "schema": {
    48          "$ref": "#/definitions/pet"
    49        }
    50      },
    51      "stringResponse": {
    52        "descripion": "string response",
    53        "schema": {
    54          "type": "string"
    55        }
    56      },
    57      "anotherPet": {
    58        "$ref": "#/responses/petResponse"
    59      }
    60    },
    61    "paths": {
    62      "/": {
    63        "get": {
    64          "operationId": "indexStuff",
    65          "responses": {
    66            "default": {
    67              "$ref": "#/responses/stringResponse"
    68            },
    69            "200": {
    70              "$ref": "#/responses/anotherPet"
    71            }
    72          }
    73        }
    74      },
    75      "/pets": {
    76        "get": {
    77          "description": "Returns all pets from the system that the user has access to",
    78          "operationId": "findPets",
    79          "produces": [
    80            "application/json",
    81            "application/xml",
    82            "text/xml",
    83            "text/html"
    84          ],
    85          "parameters": [
    86            {
    87              "name": "tags",
    88              "in": "query",
    89              "description": "tags to filter by",
    90              "required": false,
    91              "type": "array",
    92              "items": {
    93                "type": "string"
    94              },
    95              "collectionFormat": "csv"
    96            },
    97            {
    98              "name": "limit",
    99              "in": "query",
   100              "description": "maximum number of results to return",
   101              "required": false,
   102              "type": "integer",
   103              "format": "int32"
   104            }
   105          ],
   106          "responses": {
   107            "200": {
   108              "description": "pet response",
   109              "schema": {
   110                "type": "array",
   111                "items": {
   112                  "$ref": "#/definitions/pet"
   113                }
   114              }
   115            },
   116            "default": {
   117              "description": "unexpected error",
   118              "schema": {
   119                "$ref": "#/definitions/errorModel"
   120              }
   121            }
   122          }
   123        },
   124        "post": {
   125          "description": "Creates a new pet in the store.  Duplicates are allowed",
   126          "operationId": "addPet",
   127          "produces": [
   128            "application/json"
   129          ],
   130          "parameters": [
   131            {
   132              "name": "pet",
   133              "in": "body",
   134              "description": "Pet to add to the store",
   135              "required": true,
   136              "schema": {
   137                "$ref": "#/definitions/petInput"
   138              }
   139            }
   140          ],
   141          "responses": {
   142            "200": { "$ref": "#/responses/petResponse" },
   143            "default": {
   144              "description": "unexpected error",
   145              "schema": {
   146                "$ref": "#/definitions/errorModel"
   147              }
   148            }
   149          }
   150        }
   151      },
   152      "/pets/{id}": {
   153        "get": {
   154          "description": "Returns a user based on a single ID, if the user does not have access to the pet",
   155          "operationId": "findPetById",
   156          "produces": [
   157            "application/json",
   158            "application/xml",
   159            "text/xml",
   160            "text/html"
   161          ],
   162          "parameters": [
   163            {
   164              "$ref": "#/parameters/idParam"
   165            }
   166          ],
   167          "responses": {
   168            "200": {
   169              "$ref": "#/responses/petResponse"
   170            },
   171            "default": {
   172              "description": "unexpected error",
   173              "schema": {
   174                "$ref": "#/definitions/errorModel"
   175              }
   176            }
   177          }
   178        },
   179        "delete": {
   180          "description": "deletes a single pet based on the ID supplied",
   181          "operationId": "deletePet",
   182          "parameters": [
   183            {
   184              "$ref": "#/parameters/idParam"
   185            }
   186          ],
   187          "responses": {
   188            "204": {
   189              "description": "pet deleted"
   190            },
   191            "default": {
   192              "description": "unexpected error",
   193              "schema": {
   194                "$ref": "#/definitions/errorModel"
   195              }
   196            }
   197          }
   198        }
   199      }
   200    },
   201    "definitions": {
   202      "pet": {
   203        "required": [
   204          "id",
   205          "name"
   206        ],
   207        "properties": {
   208          "id": {
   209            "type": "integer",
   210            "format": "int64"
   211          },
   212          "name": {
   213            "type": "string"
   214          },
   215          "tag": {
   216            "type": "string"
   217          }
   218        }
   219      },
   220      "petInput": {
   221        "allOf": [
   222          {
   223            "$ref": "#/definitions/pet"
   224          },
   225          {
   226            "required": [
   227              "name"
   228            ],
   229            "properties": {
   230              "id": {
   231                "type": "integer",
   232                "format": "int64"
   233              }
   234            }
   235          }
   236        ]
   237      },
   238      "errorModel": {
   239        "required": [
   240          "code",
   241          "message"
   242        ],
   243        "properties": {
   244          "code": {
   245            "type": "integer",
   246            "format": "int32"
   247          },
   248          "message": {
   249            "type": "string"
   250          }
   251        }
   252      }
   253    }
   254  }