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