github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/540/swagger.yml (about) 1 swagger: '2.0' 2 info: 3 title: Pet Testing 4 version: 1.0.0 5 host: 'localhost:8080' 6 basePath: /v1 7 schemes: 8 - http 9 consumes: 10 - application/json 11 produces: 12 - application/json 13 paths: 14 /Pets: 15 get: 16 description: | 17 Returns list of all pets. 18 responses: 19 '200': 20 description: Array of pets 21 schema: 22 type: array 23 items: 24 $ref: '#/definitions/Pet' 25 default: 26 description: Unexpected error 27 schema: 28 $ref: '#/definitions/Error' 29 post: 30 operationId: postPet 31 description: | 32 Adds a new pet. 33 parameters: 34 - name: pet 35 in: body 36 description: Pet to add. 37 required: true 38 schema: 39 $ref: '#/definitions/Pet' 40 responses: 41 '200': 42 description: Pet added 43 schema: 44 $ref: '#/definitions/Pet' 45 default: 46 description: Unexpected error 47 schema: 48 $ref: '#/definitions/Error' 49 definitions: 50 Pet: 51 type: object 52 discriminator: petType 53 properties: 54 name: 55 type: string 56 petType: 57 type: string 58 required: 59 - name 60 - petType 61 Cat: 62 description: A representation of a cat 63 allOf: 64 - $ref: '#/definitions/Pet' 65 - type: object 66 properties: 67 huntingSkill: 68 type: string 69 description: The measured skill for hunting 70 default: lazy 71 enum: 72 - clueless 73 - lazy 74 - adventurous 75 - aggressive 76 required: 77 - huntingSkill 78 Goat: 79 description: A representation of a goat 80 allOf: 81 - $ref: '#/definitions/Pet' 82 - type: object 83 properties: 84 herdSize: 85 type: integer 86 format: int32 87 description: the size of the herd the goat is from 88 default: 0 89 minimum: 0 90 required: 91 - herdSize 92 Error: 93 type: object 94 properties: 95 code: 96 type: integer 97 format: int32 98 message: 99 type: string 100 fields: 101 type: string