Guest User

Untitled

a guest
Mar 25th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.32 KB | None | 0 0
  1. openapi: 3.0.0
  2. # Added by API Auto Mocking Plugin
  3. servers:
  4. # Added by API Auto Mocking Plugin
  5. - description: SwaggerHub API Auto Mocking
  6. url: https://dev-virtserver.swaggerhub.com/bens-org/petstore_v3/1.0.0
  7. - description: SwaggerHub API Auto Mocking
  8. url: https://dev-virtserver.swaggerhub.com/editoroneorg/lazylazy/1.0.0
  9. info:
  10. description: |
  11. This is a sample Petstore server. You can find
  12. out more about Swagger at
  13. [http://swagger.io](http://swagger.io) or on
  14. [irc.freenode.net, #swagger](http://swagger.io/irc/).
  15. version: "1.0.0"
  16. title: Swagger Petstore
  17. termsOfService: 'http://swagger.io/terms/'
  18. contact:
  19. license:
  20. name: Apache 2.0
  21. url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
  22. tags:
  23. - name: pet
  24. description: Everything about your Pets
  25. externalDocs:
  26. description: Find out more
  27. url: 'http://swagger.io'
  28. - name: store
  29. description: Access to Petstore orders
  30. - name: user
  31. description: Operations about user
  32. externalDocs:
  33. description: Find out more about our store
  34. url: 'http://swagger.io'
  35. paths:
  36. /pet:
  37. post:
  38. tags:
  39. - pet
  40. summary: Add a new pet to the store h
  41. operationId: addPet
  42. responses:
  43. '405':
  44. description: Invalid input
  45. security:
  46. - petstore_auth:
  47. - 'write:pets'
  48. - 'read:pets'
  49. requestBody:
  50. $ref: 'https://dev-api.swaggerhub.com/domains/editoroneorg/SDES-729/1.0.0#/components/requestBodies/UserArray2'
  51. put:
  52. tags:
  53. - pet
  54. summary: Update an existing pet
  55. operationId: updatePet
  56. responses:
  57. '400':
  58. description: Invalid ID supplied
  59. '404':
  60. description: Pet not found
  61. '405':
  62. description: Validation exception
  63. security:
  64. - petstore_auth:
  65. - 'write:pets'
  66. - 'read:pets'
  67. requestBody:
  68. $ref: '#/components/requestBodies/Pet'
  69. /pet/findByStatus:
  70. $ref: 'https://dev-api.swaggerhub.com/domains/editoroneorg/linking2/1.0.3#/components/pathitems/GeneralRequest'
  71. get:
  72. tags:
  73. - pet
  74. summary: Finds Pets by status
  75. description: Multiple status values can be provided with comma separated strings
  76. operationId: findPetsByStatus
  77. parameters:
  78. - name: status
  79. in: query
  80. description: Status values that need to be considered for filter
  81. required: true
  82. explode: true
  83. schema:
  84. type: array
  85. items:
  86. type: string
  87. enum:
  88. - available
  89. - pending
  90. - sold
  91. default: available
  92. responses:
  93. '200':
  94. description: successful operation
  95. content:
  96. application/json:
  97. schema:
  98. type: array
  99. items:
  100. $ref: 'https://dev-api.swaggerhub.com/domains/editoroneorg/linking2/1.0.3#/components/schemas/ErrorModel'
  101. application/xml:
  102. schema:
  103. type: array
  104. items:
  105. $ref: '#/components/schemas/Pet'
  106. '400':
  107. description: Invalid status value
  108. security:
  109. - petstore_auth:
  110. - 'write:pets'
  111. - 'read:pets'
  112. /pet/findByTags:
  113. get:
  114. tags:
  115. - pet
  116. summary: Finds Pets by tags
  117. description: >-
  118. Muliple tags can be provided with comma separated strings. Use\ \ tag1,
  119. tag2, tag3 for testing.
  120. operationId: findPetsByTags
  121. parameters:
  122. - name: tags
  123. in: query
  124. description: Tags to filter by
  125. required: true
  126. explode: true
  127. schema:
  128. type: array
  129. items:
  130. type: string
  131. responses:
  132. '200':
  133. description: successful operation
  134. content:
  135. application/json:
  136. schema:
  137. type: array
  138. items:
  139. $ref: '#/components/schemas/Pet'
  140. application/xml:
  141. schema:
  142. type: array
  143. items:
  144. $ref: '#/components/schemas/Pet'
  145. '400':
  146. description: Invalid tag value
  147. security:
  148. - petstore_auth:
  149. - 'write:pets'
  150. - 'read:pets'
  151. deprecated: true
  152. '/pet/{petId}':
  153. get:
  154. tags:
  155. - pet
  156. summary: Find pet by ID
  157. description: Returns a single pet
  158. operationId: getPetById
  159. parameters:
  160. - name: petId
  161. in: path
  162. description: ID of pet to return
  163. required: true
  164. schema:
  165. type: integer
  166. format: int64
  167. responses:
  168. '200':
  169. description: successful operation
  170. content:
  171. application/json:
  172. schema:
  173. $ref: '#/components/schemas/Pet'
  174. application/xml:
  175. schema:
  176. $ref: '#/components/schemas/Pet'
  177. '400':
  178. description: Invalid ID supplied
  179. '404':
  180. description: Pet not found
  181. security:
  182. - api_key: []
  183. post:
  184. tags:
  185. - pet
  186. summary: Updates a pet in the store with form data
  187. operationId: updatePetWithForm
  188. parameters:
  189. - name: petId
  190. in: path
  191. description: ID of pet that needs to be updated
  192. required: true
  193. schema:
  194. type: integer
  195. format: int64
  196. responses:
  197. '405':
  198. description: Invalid input
  199. security:
  200. - petstore_auth:
  201. - 'write:pets'
  202. - 'read:pets'
  203. requestBody:
  204. content:
  205. application/x-www-form-urlencoded:
  206. schema:
  207. type: object
  208. properties:
  209. name:
  210. description: Updated name of the pet
  211. type: string
  212. status:
  213. description: Updated status of the pet
  214. type: string
  215. delete:
  216. tags:
  217. - pet
  218. summary: Deletes a pet
  219. operationId: deletePet
  220. parameters:
  221. - name: api_key
  222. in: header
  223. required: false
  224. schema:
  225. type: string
  226. - name: petId
  227. in: path
  228. description: Pet id to delete
  229. required: true
  230. schema:
  231. type: integer
  232. format: int64
  233. responses:
  234. '400':
  235. description: Invalid ID supplied
  236. '404':
  237. description: Pet not found
  238. security:
  239. - petstore_auth:
  240. - 'write:pets'
  241. - 'read:pets'
  242. '/pet/{petId}/uploadImage':
  243. post:
  244. tags:
  245. - pet
  246. summary: uploads an image
  247. operationId: uploadFile
  248. parameters:
  249. - name: petId
  250. in: path
  251. description: ID of pet to update
  252. required: true
  253. schema:
  254. type: integer
  255. format: int64
  256. responses:
  257. '200':
  258. description: successful operation
  259. content:
  260. application/json:
  261. schema:
  262. $ref: 'https://dev-api.swaggerhub.com/domains/editoroneorg/newtest/1.0#/components/schemas/ErrorModel'
  263. security:
  264. - petstore_auth:
  265. - 'write:pets'
  266. - 'read:pets'
  267. requestBody:
  268. content:
  269. application/octet-stream:
  270. schema:
  271. type: string
  272. format: binary
  273. /store/inventory:
  274. get:
  275. tags:
  276. - store
  277. summary: Returns pet inventories by status
  278. description: Returns a map of status codes to quantities
  279. operationId: getInventory
  280. responses:
  281. '200':
  282. description: successful operation
  283. content:
  284. application/json:
  285. schema:
  286. type: object
  287. additionalProperties:
  288. type: integer
  289. format: int32
  290. security:
  291. - api_key: []
  292. /store/order:
  293. post:
  294. tags:
  295. - store
  296. summary: Place an order for a pet
  297. operationId: placeOrder
  298. responses:
  299. '200':
  300. description: successful operation
  301. content:
  302. application/json:
  303. schema:
  304. $ref: '#/components/schemas/Order'
  305. application/xml:
  306. schema:
  307. $ref: '#/components/schemas/Order'
  308. '400':
  309. description: Invalid Order
  310. requestBody:
  311. content:
  312. application/json:
  313. schema:
  314. $ref: '#/components/schemas/Order'
  315. description: order placed for purchasing the pet
  316. required: true
  317. '/store/order/{orderId}':
  318. get:
  319. tags:
  320. - store
  321. summary: Find purchase order by ID
  322. description: >-
  323. For valid response try integer IDs with value >= 1 and <= 10.\ \ Other
  324. values will generated exceptions
  325. operationId: getOrderById
  326. parameters:
  327. - name: orderId
  328. in: path
  329. description: ID of pet that needs to be fetched
  330. required: true
  331. schema:
  332. type: integer
  333. format: int64
  334. minimum: 1
  335. maximum: 10
  336. responses:
  337. '200':
  338. description: successful operation
  339. content:
  340. application/json:
  341. schema:
  342. $ref: '#/components/schemas/Order'
  343. application/xml:
  344. schema:
  345. $ref: '#/components/schemas/Order'
  346. '400':
  347. description: Invalid ID supplied
  348. '404':
  349. description: Order not found
  350. delete:
  351. tags:
  352. - store
  353. summary: Delete purchase order by ID
  354. description: >-
  355. For valid response try integer IDs with positive integer value.\ \
  356. Negative or non-integer values will generate API errors
  357. operationId: deleteOrder
  358. parameters:
  359. - name: orderId
  360. in: path
  361. description: ID of the order that needs to be deleted
  362. required: true
  363. schema:
  364. type: integer
  365. format: int64
  366. minimum: 1
  367. responses:
  368. '400':
  369. description: Invalid ID supplied
  370. '404':
  371. description: Order not found
  372. /user:
  373. post:
  374. tags:
  375. - user
  376. summary: Create user
  377. description: This can only be done by the logged in user.
  378. operationId: createUser
  379. responses:
  380. default:
  381. description: successful operation
  382. requestBody:
  383. content:
  384. application/json:
  385. schema:
  386. $ref: '#/components/schemas/User'
  387. description: Created user object
  388. required: true
  389. /user/createWithArray:
  390. post:
  391. tags:
  392. - user
  393. summary: Creates list of users with given input array
  394. operationId: createUsersWithArrayInput
  395. responses:
  396. default:
  397. description: successful operation
  398. requestBody:
  399. $ref: '#/components/requestBodies/UserArray'
  400. /user/createWithList:
  401. post:
  402. tags:
  403. - user
  404. summary: Creates list of users with given input array
  405. operationId: createUsersWithListInput
  406. responses:
  407. default:
  408. description: successful operation
  409. requestBody:
  410. $ref: '#/components/requestBodies/UserArray'
  411. /user/login:
  412. get:
  413. tags:
  414. - user
  415. summary: Logs user into the system
  416. operationId: loginUser
  417. parameters:
  418. - name: username
  419. in: query
  420. description: The user name for login
  421. required: true
  422. schema:
  423. type: string
  424. - name: password
  425. in: query
  426. description: The password for login in clear text
  427. required: true
  428. schema:
  429. type: string
  430. responses:
  431. '200':
  432. description: successful operation
  433. headers:
  434. X-Rate-Limit:
  435. description: calls per hour allowed by the user
  436. schema:
  437. type: integer
  438. format: int32
  439. X-Expires-After:
  440. description: date in UTC when token expires
  441. schema:
  442. type: string
  443. format: date-time
  444. content:
  445. application/json:
  446. schema:
  447. type: string
  448. application/xml:
  449. schema:
  450. type: string
  451. '400':
  452. description: Invalid username/password supplied
  453. /user/logout:
  454. get:
  455. tags:
  456. - user
  457. summary: Logs out current logged in user session
  458. operationId: logoutUser
  459. responses:
  460. default:
  461. description: successful operation
  462. '/user/{username}':
  463. get:
  464. tags:
  465. - user
  466. summary: Get user by user name
  467. operationId: getUserByName
  468. parameters:
  469. - name: username
  470. in: path
  471. description: The name that needs to be fetched. Use user1 for testing.
  472. required: true
  473. schema:
  474. type: string
  475. responses:
  476. '200':
  477. description: successful operation
  478. content:
  479. application/json:
  480. schema:
  481. $ref: '#/components/schemas/User'
  482. application/xml:
  483. schema:
  484. $ref: '#/components/schemas/User'
  485. '400':
  486. description: Invalid username supplied
  487. '404':
  488. description: User not found
  489. put:
  490. tags:
  491. - user
  492. summary: Updated user
  493. description: This can only be done by the logged in user.
  494. operationId: updateUser
  495. parameters:
  496. - name: username
  497. in: path
  498. description: name that need to be updated
  499. required: true
  500. schema:
  501. type: string
  502. responses:
  503. '400':
  504. description: Invalid user supplied
  505. '404':
  506. description: User not found
  507. requestBody:
  508. content:
  509. application/json:
  510. schema:
  511. $ref: '#/components/schemas/Category'
  512. description: Updated user object
  513. required: true
  514. delete:
  515. tags:
  516. - user
  517. summary: Delete user
  518. description: This can only be done by the logged in user.
  519. operationId: deleteUser
  520. parameters:
  521. - name: username
  522. in: path
  523. description: The name that needs to be deleted
  524. required: true
  525. schema:
  526. type: string
  527. responses:
  528. '400':
  529. description: Invalid username supplied
  530. '404':
  531. description: User not found
  532. externalDocs:
  533. description: Find out more about Swagger
  534. url: 'http://swagger.io'
  535. components:
  536. schemas:
  537. Order:
  538. type: object
  539. properties:
  540. id:
  541. type: integer
  542. format: int64
  543. petId:
  544. type: integer
  545. format: int64
  546. quantity:
  547. type: integer
  548. format: int32
  549. shipDate:
  550. type: string
  551. format: date-time
  552. status:
  553. type: string
  554. description: Order Status
  555. enum:
  556. - placed
  557. - approved
  558. - delivered
  559. complete:
  560. type: boolean
  561. default: false
  562. xml:
  563. name: Order
  564. Category:
  565. type: object
  566. properties:
  567. id:
  568. type: integer
  569. format: int64
  570. name:
  571. type: string
  572. xml:
  573. name: Category
  574. User:
  575. type: object
  576. properties:
  577. id:
  578. type: integer
  579. format: int64
  580. username:
  581. type: string
  582. firstName:
  583. type: string
  584. lastName:
  585. type: string
  586. email:
  587. type: string
  588. password:
  589. type: string
  590. phone:
  591. type: string
  592. userStatus:
  593. type: integer
  594. format: int32
  595. description: User Status
  596. xml:
  597. name: User
  598. Tag:
  599. type: object
  600. properties:
  601. id:
  602. type: integer
  603. format: int64
  604. name:
  605. type: string
  606. xml:
  607. name: Tag
  608. Pet:
  609. type: object
  610. required:
  611. - name
  612. - photoUrls
  613. properties:
  614. id:
  615. type: integer
  616. format: int64
  617. category:
  618. $ref: '#/components/schemas/Category'
  619. name:
  620. type: string
  621. example: ?
  622. photoUrls:
  623. type: array
  624. xml:
  625. name: photoUrl
  626. wrapped: true
  627. items:
  628. type: string
  629. tags:
  630. type: array
  631. xml:
  632. name: tag
  633. wrapped: true
  634. items:
  635. $ref: '#/components/schemas/Tag'
  636. status:
  637. type: string
  638. description: pet status in the store
  639. enum:
  640. - available
  641. - pending
  642. - sold
  643. xml:
  644. name: Pet
  645. ApiResponse:
  646. type: object
  647. properties:
  648. code:
  649. type: integer
  650. format: int32
  651. type:
  652. type: string
  653. message:
  654. type: string
  655. requestBodies:
  656. Pet:
  657. content:
  658. application/json:
  659. schema:
  660. $ref: '#/components/schemas/Pet'
  661. application/xml:
  662. schema:
  663. $ref: '#/components/schemas/Pet'
  664. description: Pet object that needs to be added to the store
  665. required: true
  666. UserArray:
  667. content:
  668. application/json:
  669. schema:
  670. type: array
  671. items:
  672. $ref: '#/components/schemas/User'
  673. description: List of user object
  674. required: true
  675. securitySchemes:
  676. petstore_auth:
  677. type: oauth2
  678. flows:
  679. implicit:
  680. authorizationUrl: 'http://petstore.swagger.io/oauth/dialog'
  681. scopes:
  682. 'write:pets': modify pets in your account
  683. 'read:pets': read your pets
  684. api_key:
  685. type: apiKey
  686. name: api_key
  687. in: header
Advertisement
Add Comment
Please, Sign In to add comment