github.com/apremalal/vamps-core@v1.0.1-0.20161221121535-d430b56ec174/server/webapps/apieditor/spec-files/petstore_simple.yaml (about) 1 swagger: '2.0' 2 info: 3 version: '1.0.0' 4 title: Swagger Petstore (Simple) 5 description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification 6 termsOfService: http://helloreverb.com/terms/ 7 contact: 8 name: Swagger API team 9 email: foo@example.com 10 url: http://swagger.io 11 license: 12 name: MIT 13 url: http://opensource.org/licenses/MIT 14 host: petstore.swagger.io 15 basePath: /api 16 schemes: 17 - http 18 consumes: 19 - application/json 20 produces: 21 - application/json 22 paths: 23 /pets: 24 get: 25 description: Returns all pets from the system that the user has access to 26 operationId: findPets 27 produces: 28 - application/json 29 - application/xml 30 - text/xml 31 - text/html 32 parameters: 33 - name: tags 34 in: query 35 description: tags to filter by 36 required: false 37 type: array 38 items: 39 type: string 40 collectionFormat: csv 41 - name: limit 42 in: query 43 description: maximum number of results to return 44 required: false 45 type: integer 46 format: int32 47 responses: 48 '200': 49 description: pet response 50 schema: 51 type: array 52 items: 53 $ref: '#/definitions/pet' 54 default: 55 description: unexpected error 56 schema: 57 $ref: '#/definitions/errorModel' 58 post: 59 description: Creates a new pet in the store. Duplicates are allowed 60 operationId: addPet 61 produces: 62 - application/json 63 parameters: 64 - name: pet 65 in: body 66 description: Pet to add to the store 67 required: true 68 schema: 69 $ref: '#/definitions/newPet' 70 responses: 71 '200': 72 description: pet response 73 schema: 74 $ref: '#/definitions/pet' 75 default: 76 description: unexpected error 77 schema: 78 $ref: '#/definitions/errorModel' 79 /pets/{id}: 80 get: 81 description: Returns a user based on a single ID, if the user does not have access to the pet 82 operationId: findPetById 83 produces: 84 - application/json 85 - application/xml 86 - text/xml 87 - text/html 88 parameters: 89 - name: id 90 in: path 91 description: ID of pet to fetch 92 required: true 93 type: integer 94 format: int64 95 responses: 96 '200': 97 description: pet response 98 schema: 99 $ref: '#/definitions/pet' 100 default: 101 description: unexpected error 102 schema: 103 $ref: '#/definitions/errorModel' 104 delete: 105 description: deletes a single pet based on the ID supplied 106 operationId: deletePet 107 parameters: 108 - name: id 109 in: path 110 description: ID of pet to delete 111 required: true 112 type: integer 113 format: int64 114 responses: 115 '204': 116 description: pet deleted 117 default: 118 description: unexpected error 119 schema: 120 $ref: '#/definitions/errorModel' 121 definitions: 122 pet: 123 type: object 124 required: 125 - id 126 - name 127 properties: 128 id: 129 type: integer 130 format: int64 131 name: 132 type: string 133 tag: 134 type: string 135 newPet: 136 type: object 137 required: 138 - name 139 properties: 140 id: 141 type: integer 142 format: int64 143 name: 144 type: string 145 tag: 146 type: string 147 errorModel: 148 type: object 149 required: 150 - code 151 - message 152 properties: 153 code: 154 type: integer 155 format: int32 156 message: 157 type: string