github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/2590/2590.yaml (about) 1 swagger: "2.0" 2 info: 3 version: "1.0.0" 4 title: generating client with error reporting 5 description: verify that generated code prints errors 6 paths: 7 /abc: 8 post: 9 tags: 10 - "abc" 11 summary: "Create a new ABC" 12 description: "" 13 operationId: "create" 14 consumes: 15 - "application/json" 16 produces: 17 - "application/json" 18 parameters: 19 - in: "body" 20 name: "abc" 21 required: true 22 schema: 23 $ref: "#/definitions/abc" 24 responses: 25 202: 26 description: "Accepted" 27 schema: 28 $ref: '#/definitions/abc' 29 400: 30 $ref: '#/responses/BadRequest' 31 404: 32 $ref: '#/responses/NotFound' 33 409: 34 $ref: '#/responses/Conflict' 35 500: 36 $ref: '#/responses/InternalError' 37 default: 38 description: "default response" 39 schema: 40 41 definitions: 42 abc: 43 type: string 44 45 Error: 46 type: "object" 47 properties: 48 message: 49 type: string 50 x-nullable: false 51 minLength: 1 52 required: 53 - message 54 55 responses: 56 Unauthorized: 57 description: "Unauthorized" 58 schema: 59 $ref: '#/definitions/Error' 60 NotFound: 61 description: "Not found" 62 schema: 63 $ref: '#/definitions/Error' 64 InternalError: 65 description: "Inernal Server Error" 66 schema: 67 $ref: '#/definitions/Error' 68 BadRequest: 69 description: "Bad Request" 70 schema: 71 $ref: '#/definitions/Error' 72 Conflict: 73 description: "Conflict" 74 schema: 75 $ref: '#/definitions/Error' 76