github.com/circl-dev/go-swagger@v0.31.0/examples/auto-configure/restapi/embedded_spec.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package restapi 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "encoding/json" 10 ) 11 12 var ( 13 // SwaggerJSON embedded version of the swagger document used at generation time 14 SwaggerJSON json.RawMessage 15 // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time 16 FlatSwaggerJSON json.RawMessage 17 ) 18 19 func init() { 20 SwaggerJSON = json.RawMessage([]byte(`{ 21 "consumes": [ 22 "application/io.goswagger.examples.todo-list.v1+json" 23 ], 24 "produces": [ 25 "application/io.goswagger.examples.todo-list.v1+json" 26 ], 27 "schemes": [ 28 "http" 29 ], 30 "swagger": "2.0", 31 "info": { 32 "description": "The product of a tutorial on goswagger.io", 33 "title": "A To Do list application", 34 "version": "1.0.0" 35 }, 36 "paths": { 37 "/": { 38 "get": { 39 "tags": [ 40 "todos" 41 ], 42 "operationId": "findTodos", 43 "parameters": [ 44 { 45 "type": "integer", 46 "format": "int64", 47 "name": "since", 48 "in": "query" 49 }, 50 { 51 "type": "integer", 52 "format": "int32", 53 "default": 20, 54 "name": "limit", 55 "in": "query" 56 } 57 ], 58 "responses": { 59 "200": { 60 "description": "list the todo operations", 61 "schema": { 62 "type": "array", 63 "items": { 64 "$ref": "#/definitions/item" 65 } 66 } 67 }, 68 "default": { 69 "description": "generic error response", 70 "schema": { 71 "$ref": "#/definitions/error" 72 } 73 } 74 } 75 }, 76 "post": { 77 "tags": [ 78 "todos" 79 ], 80 "operationId": "addOne", 81 "parameters": [ 82 { 83 "name": "body", 84 "in": "body", 85 "schema": { 86 "$ref": "#/definitions/item" 87 } 88 } 89 ], 90 "responses": { 91 "201": { 92 "description": "Created", 93 "schema": { 94 "$ref": "#/definitions/item" 95 } 96 }, 97 "default": { 98 "description": "error", 99 "schema": { 100 "$ref": "#/definitions/error" 101 } 102 } 103 } 104 } 105 }, 106 "/{id}": { 107 "put": { 108 "tags": [ 109 "todos" 110 ], 111 "operationId": "updateOne", 112 "parameters": [ 113 { 114 "name": "body", 115 "in": "body", 116 "schema": { 117 "$ref": "#/definitions/item" 118 } 119 } 120 ], 121 "responses": { 122 "200": { 123 "description": "OK", 124 "schema": { 125 "$ref": "#/definitions/item" 126 } 127 }, 128 "default": { 129 "description": "error", 130 "schema": { 131 "$ref": "#/definitions/error" 132 } 133 } 134 } 135 }, 136 "delete": { 137 "tags": [ 138 "todos" 139 ], 140 "operationId": "destroyOne", 141 "responses": { 142 "204": { 143 "description": "Deleted" 144 }, 145 "default": { 146 "description": "error", 147 "schema": { 148 "$ref": "#/definitions/error" 149 } 150 } 151 } 152 }, 153 "parameters": [ 154 { 155 "type": "integer", 156 "format": "int64", 157 "name": "id", 158 "in": "path", 159 "required": true 160 } 161 ] 162 } 163 }, 164 "definitions": { 165 "error": { 166 "type": "object", 167 "required": [ 168 "message" 169 ], 170 "properties": { 171 "code": { 172 "type": "integer", 173 "format": "int64" 174 }, 175 "message": { 176 "type": "string" 177 } 178 } 179 }, 180 "item": { 181 "type": "object", 182 "required": [ 183 "description" 184 ], 185 "properties": { 186 "completed": { 187 "type": "boolean" 188 }, 189 "description": { 190 "type": "string", 191 "minLength": 1 192 }, 193 "id": { 194 "type": "integer", 195 "format": "int64", 196 "readOnly": true 197 } 198 } 199 } 200 }, 201 "securityDefinitions": { 202 "key": { 203 "type": "apiKey", 204 "name": "x-todolist-token", 205 "in": "header" 206 } 207 }, 208 "security": [ 209 { 210 "key": [] 211 } 212 ] 213 }`)) 214 FlatSwaggerJSON = json.RawMessage([]byte(`{ 215 "consumes": [ 216 "application/io.goswagger.examples.todo-list.v1+json" 217 ], 218 "produces": [ 219 "application/io.goswagger.examples.todo-list.v1+json" 220 ], 221 "schemes": [ 222 "http" 223 ], 224 "swagger": "2.0", 225 "info": { 226 "description": "The product of a tutorial on goswagger.io", 227 "title": "A To Do list application", 228 "version": "1.0.0" 229 }, 230 "paths": { 231 "/": { 232 "get": { 233 "tags": [ 234 "todos" 235 ], 236 "operationId": "findTodos", 237 "parameters": [ 238 { 239 "type": "integer", 240 "format": "int64", 241 "name": "since", 242 "in": "query" 243 }, 244 { 245 "type": "integer", 246 "format": "int32", 247 "default": 20, 248 "name": "limit", 249 "in": "query" 250 } 251 ], 252 "responses": { 253 "200": { 254 "description": "list the todo operations", 255 "schema": { 256 "type": "array", 257 "items": { 258 "$ref": "#/definitions/item" 259 } 260 } 261 }, 262 "default": { 263 "description": "generic error response", 264 "schema": { 265 "$ref": "#/definitions/error" 266 } 267 } 268 } 269 }, 270 "post": { 271 "tags": [ 272 "todos" 273 ], 274 "operationId": "addOne", 275 "parameters": [ 276 { 277 "name": "body", 278 "in": "body", 279 "schema": { 280 "$ref": "#/definitions/item" 281 } 282 } 283 ], 284 "responses": { 285 "201": { 286 "description": "Created", 287 "schema": { 288 "$ref": "#/definitions/item" 289 } 290 }, 291 "default": { 292 "description": "error", 293 "schema": { 294 "$ref": "#/definitions/error" 295 } 296 } 297 } 298 } 299 }, 300 "/{id}": { 301 "put": { 302 "tags": [ 303 "todos" 304 ], 305 "operationId": "updateOne", 306 "parameters": [ 307 { 308 "name": "body", 309 "in": "body", 310 "schema": { 311 "$ref": "#/definitions/item" 312 } 313 } 314 ], 315 "responses": { 316 "200": { 317 "description": "OK", 318 "schema": { 319 "$ref": "#/definitions/item" 320 } 321 }, 322 "default": { 323 "description": "error", 324 "schema": { 325 "$ref": "#/definitions/error" 326 } 327 } 328 } 329 }, 330 "delete": { 331 "tags": [ 332 "todos" 333 ], 334 "operationId": "destroyOne", 335 "responses": { 336 "204": { 337 "description": "Deleted" 338 }, 339 "default": { 340 "description": "error", 341 "schema": { 342 "$ref": "#/definitions/error" 343 } 344 } 345 } 346 }, 347 "parameters": [ 348 { 349 "type": "integer", 350 "format": "int64", 351 "name": "id", 352 "in": "path", 353 "required": true 354 } 355 ] 356 } 357 }, 358 "definitions": { 359 "error": { 360 "type": "object", 361 "required": [ 362 "message" 363 ], 364 "properties": { 365 "code": { 366 "type": "integer", 367 "format": "int64" 368 }, 369 "message": { 370 "type": "string" 371 } 372 } 373 }, 374 "item": { 375 "type": "object", 376 "required": [ 377 "description" 378 ], 379 "properties": { 380 "completed": { 381 "type": "boolean" 382 }, 383 "description": { 384 "type": "string", 385 "minLength": 1 386 }, 387 "id": { 388 "type": "integer", 389 "format": "int64", 390 "readOnly": true 391 } 392 } 393 } 394 }, 395 "securityDefinitions": { 396 "key": { 397 "type": "apiKey", 398 "name": "x-todolist-token", 399 "in": "header" 400 } 401 }, 402 "security": [ 403 { 404 "key": [] 405 } 406 ] 407 }`)) 408 }