Advertisement
zhemant

reusable_Enum

Nov 13th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  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. For this sample, you can use the api key
  7. `special-key` to test the authorization filters.
  8. version: 1.0.0
  9. title: OpenAPI Petstore
  10. license:
  11. name: Apache-2.0
  12. url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
  13. tags:
  14. - name: pet
  15. description: Everything about your Pets
  16.  
  17. paths:
  18. '/pet/{petId}':
  19. get:
  20. tags:
  21. - pet
  22. summary: Find pet by ID
  23. description: Returns a single pet
  24. operationId: getPetById
  25. parameters:
  26. - name: petId
  27. in: path
  28. description: ID of pet to return
  29. required: true
  30. schema:
  31. type: integer
  32. format: int64
  33. responses:
  34. '200':
  35. description: successful operation
  36. content:
  37. application/json:
  38. schema:
  39. $ref: '#/components/schemas/Pet'
  40. '400':
  41. description: Invalid ID supplied
  42. '404':
  43. description: Pet not found
  44. security:
  45. - api_key: []
  46. post:
  47. tags:
  48. - pet
  49. summary: Updates a pet in the store with form data
  50. description: ''
  51. operationId: updatePetWithForm
  52. parameters:
  53. - name: petId
  54. in: path
  55. description: ID of pet that needs to be updated
  56. required: true
  57. schema:
  58. type: integer
  59. format: int64
  60. responses:
  61. '405':
  62. description: Invalid input
  63. security:
  64. - petstore_auth:
  65. - 'write:pets'
  66. - 'read:pets'
  67. requestBody:
  68. content:
  69. application/x-www-form-urlencoded:
  70. schema:
  71. type: object
  72. properties:
  73. name:
  74. description: Updated name of the pet
  75. type: string
  76. status:
  77. description: Updated status of the pet
  78. type: string
  79. delete:
  80. tags:
  81. - pet
  82. summary: Deletes a pet
  83. description: ''
  84. operationId: deletePet
  85. parameters:
  86. - name: api_key
  87. in: header
  88. required: false
  89. schema:
  90. type: string
  91. - name: petId
  92. in: path
  93. description: Pet id to delete
  94. required: true
  95. schema:
  96. type: integer
  97. format: int64
  98. responses:
  99. '400':
  100. description: Invalid pet value
  101. security:
  102. - petstore_auth:
  103. - 'write:pets'
  104. - 'read:pets'
  105. externalDocs:
  106. description: Find out more about Swagger
  107. url: 'http://swagger.io'
  108. components:
  109. requestBodies:
  110. Pet:
  111. content:
  112. application/json:
  113. schema:
  114. $ref: '#/components/schemas/Pet'
  115. description: Pet object that needs to be added to the store
  116. required: true
  117. securitySchemes:
  118. petstore_auth:
  119. type: oauth2
  120. flows:
  121. implicit:
  122. authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
  123. scopes:
  124. 'write:pets': modify pets in your account
  125. 'read:pets': read your pets
  126. api_key:
  127. type: apiKey
  128. name: api_key
  129. in: header
  130. schemas:
  131. Category:
  132. title: Category
  133. description: A category for a pet
  134. type: object
  135. properties:
  136. id:
  137. type: integer
  138. format: int64
  139. name:
  140. type: string
  141. Tag:
  142. title: Tag
  143. description: A tag for a pet
  144. type: object
  145. properties:
  146. id:
  147. type: integer
  148. format: int64
  149. name:
  150. type: string
  151. Pet:
  152. title: Pet
  153. description: A pet for sale in the pet store
  154. type: object
  155. required:
  156. - name
  157. - photoUrls
  158. properties:
  159. id:
  160. type: integer
  161. format: int64
  162. category:
  163. $ref: '#/components/schemas/Category'
  164. name:
  165. type: string
  166. example: doggie
  167. photoUrls:
  168. type: array
  169. items:
  170. type: string
  171. tags:
  172. type: array
  173. items:
  174. $ref: '#/components/schemas/Tag'
  175. status:
  176. $ref: '#/components/schemas/Status'
  177. Status:
  178. type: string
  179. enum:
  180. - available
  181. - pending
  182. - sold
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement