|
| 1 | +openapi: 3.0.0 |
| 2 | +servers: |
| 3 | + - url: 'http://petstore.swagger.io/v2' |
| 4 | +info: |
| 5 | + description: >- |
| 6 | + This is a sample server Petstore server. You can find out more about |
| 7 | + Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, |
| 8 | + #swagger](http://swagger.io/irc/). For this sample, you can use the api key |
| 9 | + `special-key` to test the authorization filters. |
| 10 | + version: 1.0.0 |
| 11 | + title: Swagger Petstore |
| 12 | + termsOfService: 'http://swagger.io/terms/' |
| 13 | + contact: |
| 14 | + |
| 15 | + license: |
| 16 | + name: Apache 2.0 |
| 17 | + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' |
| 18 | +tags: |
| 19 | + - name: pet |
| 20 | + description: Everything about your Pets |
| 21 | + externalDocs: |
| 22 | + description: Find out more |
| 23 | + url: 'http://swagger.io' |
| 24 | + - name: store |
| 25 | + description: Access to Petstore orders |
| 26 | + - name: user |
| 27 | + description: Operations about user |
| 28 | + externalDocs: |
| 29 | + description: Find out more about our store |
| 30 | + url: 'http://swagger.io' |
| 31 | +paths: |
| 32 | + /pet/findByStatus: |
| 33 | + get: |
| 34 | + tags: |
| 35 | + - pet |
| 36 | + summary: Finds Pets by status |
| 37 | + description: Multiple status values can be provided with comma separated strings |
| 38 | + operationId: findPetsByStatus |
| 39 | + parameters: |
| 40 | + - name: status |
| 41 | + in: query |
| 42 | + description: Status values that need to be considered for filter |
| 43 | + required: true |
| 44 | + explode: true |
| 45 | + schema: |
| 46 | + type: array |
| 47 | + items: |
| 48 | + type: string |
| 49 | + enum: |
| 50 | + - available |
| 51 | + - pending |
| 52 | + - sold |
| 53 | + default: available |
| 54 | + responses: |
| 55 | + '200': |
| 56 | + description: successful operation |
| 57 | + content: |
| 58 | + application/json: |
| 59 | + schema: |
| 60 | + type: object |
| 61 | + properties: |
| 62 | + pets: |
| 63 | + type: array |
| 64 | + items: |
| 65 | + $ref: '#/components/schemas/Cat' |
| 66 | + '400': |
| 67 | + description: Invalid status value |
| 68 | + security: |
| 69 | + - petstore_auth: |
| 70 | + - 'write:pets' |
| 71 | + - 'read:pets' |
| 72 | +externalDocs: |
| 73 | + description: Find out more about Swagger |
| 74 | + url: 'http://swagger.io' |
| 75 | +components: |
| 76 | + requestBodies: |
| 77 | + Pet: |
| 78 | + content: |
| 79 | + application/json: |
| 80 | + schema: |
| 81 | + $ref: '#/components/schemas/Pet' |
| 82 | + description: Pet object that needs to be added to the store |
| 83 | + required: true |
| 84 | + securitySchemes: |
| 85 | + petstore_auth: |
| 86 | + type: oauth2 |
| 87 | + flows: |
| 88 | + implicit: |
| 89 | + authorizationUrl: 'http://petstore.swagger.io/oauth/dialog' |
| 90 | + scopes: |
| 91 | + 'write:pets': modify pets in your account |
| 92 | + 'read:pets': read your pets |
| 93 | + api_key: |
| 94 | + type: apiKey |
| 95 | + name: api_key |
| 96 | + in: header |
| 97 | + schemas: |
| 98 | + Cat: |
| 99 | + description: Cat class |
| 100 | + allOf: |
| 101 | + - $ref: './components/Pet.yaml' |
| 102 | + type: object |
| 103 | + properties: |
| 104 | + name: |
| 105 | + type: string |
| 106 | + Dog: |
| 107 | + description: Dog class |
| 108 | + allOf: |
| 109 | + - $ref: './components/Pet.yaml' |
| 110 | + type: object |
| 111 | + properties: |
| 112 | + bark: |
| 113 | + type: string |
0 commit comments