4374.yaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. ---
  2. openapi: 3.0.0
  3. servers:
  4. - url: http://localhost:3204/
  5. info:
  6. description: '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, #swagger](http://swagger.io/irc/). For
  8. this sample, you can use the api key `special-key` to test the authorization filters.'
  9. version: 1.0.0
  10. title: Swagger Petstore
  11. termsOfService: http://swagger.io/terms/
  12. contact:
  13. email: apiteam@swagger.io
  14. license:
  15. name: Apache 2.0
  16. url: http://www.apache.org/licenses/LICENSE-2.0.html
  17. tags:
  18. - name: pet
  19. description: Everything about your Pets
  20. externalDocs:
  21. description: Find out more
  22. url: http://swagger.io
  23. - name: store
  24. description: Access to Petstore orders
  25. - name: user
  26. description: Operations about user
  27. externalDocs:
  28. description: Find out more about our store
  29. url: http://swagger.io
  30. paths:
  31. "/pet/findByStatus":
  32. get:
  33. tags:
  34. - pet
  35. summary: Finds Pets by status
  36. description: Multiple status values can be provided with comma separated strings
  37. operationId: findPetsByStatus
  38. parameters:
  39. - name: status
  40. in: query
  41. description: Status values that need to be considered for filter
  42. required: true
  43. explode: true
  44. schema:
  45. type: array
  46. items:
  47. type: string
  48. enum:
  49. - available
  50. - pending
  51. - sold
  52. default: available
  53. responses:
  54. '200':
  55. description: successful operation
  56. content:
  57. application/xml:
  58. schema:
  59. type: array
  60. items:
  61. "$ref": "#/components/schemas/Pet"
  62. application/json:
  63. schema:
  64. type: array
  65. items:
  66. "$ref": "#/components/schemas/Pet"
  67. '400':
  68. description: Invalid status value
  69. security:
  70. - petstore_auth:
  71. - write:pets
  72. - read:pets
  73. externalDocs:
  74. description: Find out more about Swagger
  75. url: http://swagger.io
  76. components:
  77. schemas:
  78. Order:
  79. type: object
  80. properties:
  81. id:
  82. type: integer
  83. format: int64
  84. petId:
  85. type: integer
  86. format: int64
  87. quantity:
  88. type: integer
  89. format: int32
  90. shipDate:
  91. type: string
  92. format: date-time
  93. status:
  94. type: string
  95. description: Order Status
  96. enum:
  97. - placed
  98. - approved
  99. - delivered
  100. complete:
  101. type: boolean
  102. default: false
  103. xml:
  104. name: Order
  105. Category:
  106. type: object
  107. properties:
  108. id:
  109. type: integer
  110. format: int64
  111. name:
  112. type: string
  113. xml:
  114. name: Category
  115. User:
  116. type: object
  117. properties:
  118. id:
  119. type: integer
  120. format: int64
  121. username:
  122. type: string
  123. firstName:
  124. type: string
  125. lastName:
  126. type: string
  127. email:
  128. type: string
  129. password:
  130. type: string
  131. phone:
  132. type: string
  133. userStatus:
  134. type: integer
  135. format: int32
  136. description: User Status
  137. xml:
  138. name: User
  139. Tag:
  140. type: object
  141. properties:
  142. id:
  143. type: integer
  144. format: int64
  145. name:
  146. type: string
  147. xml:
  148. name: Tag
  149. Pet:
  150. type: object
  151. required:
  152. - name
  153. - photoUrls
  154. properties:
  155. id:
  156. type: integer
  157. format: int64
  158. category:
  159. "$ref": "#/components/schemas/Category"
  160. name:
  161. type: string
  162. example: doggie
  163. photoUrls:
  164. type: array
  165. xml:
  166. name: photoUrl
  167. wrapped: true
  168. items:
  169. type: string
  170. tags:
  171. type: array
  172. xml:
  173. name: tag
  174. wrapped: true
  175. items:
  176. "$ref": "#/components/schemas/Tag"
  177. status:
  178. type: string
  179. description: pet status in the store
  180. enum:
  181. - available
  182. - pending
  183. - sold
  184. xml:
  185. name: Pet
  186. ApiResponse:
  187. type: object
  188. properties:
  189. code:
  190. type: integer
  191. format: int32
  192. type:
  193. type: string
  194. message:
  195. type: string
  196. requestBodies:
  197. Pet:
  198. content:
  199. application/json:
  200. schema:
  201. "$ref": "#/components/schemas/Pet"
  202. application/xml:
  203. schema:
  204. "$ref": "#/components/schemas/Pet"
  205. description: Pet object that needs to be added to the store
  206. required: true
  207. UserArray:
  208. content:
  209. application/json:
  210. schema:
  211. type: array
  212. items:
  213. "$ref": "#/components/schemas/User"
  214. description: List of user object
  215. required: true
  216. securitySchemes:
  217. petstore_auth:
  218. type: oauth2
  219. flows:
  220. implicit:
  221. authorizationUrl: http://petstore.swagger.io/oauth/dialog
  222. scopes:
  223. write:pets: modify pets in your account
  224. read:pets: read your pets
  225. api_key:
  226. type: apiKey
  227. name: api_key
  228. in: header