Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.09 KB | None | 0 0
  1. ---
  2. openapi: 3.0.0-RC1
  3. servers:
  4. - url: http://petstore.swagger.io/v2
  5. - url: https://development.gigantic-server.com/v1
  6. description: Development server
  7. - url: https://{username}.gigantic-server.com:{port}/{basePath}
  8. x-server: server extension
  9. description: The production API server
  10. variables:
  11. username:
  12. # note! no enum here means it is an open value
  13. default: demo
  14. description: this value is assigned by the service provider, in this example `gigantic-server.com`
  15. port:
  16. enum:
  17. - 8443
  18. - 443
  19. default: 8443
  20. basePath:
  21. # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
  22. default: v2
  23. description: testing overwriting
  24. enum:
  25. - 2222
  26. - 333
  27. x-origin:
  28. - url: http://petstore.swagger.io/v2/swagger.json
  29. format: swagger
  30. version: '2.0'
  31. converter:
  32. url: https://github.com/mermade/swagger2openapi
  33. version: 1.2.1
  34. x-api-title: pet store test api
  35. security:
  36. - api_key: []
  37. - tokenAuth: []
  38. info:
  39. description: 'This is a sample server Petstore'
  40. version: 1.0.0
  41. title: Sample Pet Store App
  42. termsOfService: http://swagger.io/terms/
  43. x-info: info extension
  44. contact:
  45. name: API Support
  46. url: http://www.example.com/support
  47. email: support@example.com
  48. x-contact: contact extension
  49. license:
  50. name: Apache 2.0
  51. url: http://www.apache.org/licenses/LICENSE-2.0.html
  52. x-license: license extension
  53. version: 1.0.1
  54. tags:
  55. - name: pet
  56. description: Everything about your Pets
  57. externalDocs:
  58. description: Find out more
  59. url: http://swagger.io
  60. - name: store
  61. description: Access to Petstore orders
  62. - name: user
  63. description: Operations about user
  64. externalDocs:
  65. description: Find out more about our store
  66. url: http://swagger.io
  67. paths:
  68. "/pathItemRef":
  69. "$ref": 'http://localhost:${dynamicPort}/remote/path'
  70. "/pathItemRef2":
  71. "$ref": '#/paths/~1pet'
  72. "/pet":
  73. summary: summary
  74. description: description
  75. post:
  76. externalDocs:
  77. description: Find out more
  78. url: http://swagger.io
  79. tags:
  80. - pet
  81. summary: Add a new pet to the store
  82. description: ''
  83. operationId: addPet
  84. parameters: []
  85. responses:
  86. '405':
  87. description: Invalid input
  88. headers:
  89. X-Rate-Limit:
  90. description: calls per hour allowed by the user
  91. schema:
  92. title: header schema
  93. type: integer
  94. format: int32
  95. X-Expires-After:
  96. description: date in UTC when token expires
  97. schema:
  98. type: string
  99. format: date-time
  100. security:
  101. - petstore_auth:
  102. - write:pets
  103. - read:pets
  104. requestBody:
  105. "$ref": "#/components/requestBodies/requestBody1"
  106. description: user to add to the system
  107. required: true
  108. content:
  109. 'application/json':
  110. schema:
  111. $ref: '#/components/schemas/User'
  112. examples:
  113. user:
  114. summary: User Example
  115. externalValue: 'http://foo.bar/examples/user-example.json'
  116. 'application/xml':
  117. schema:
  118. $ref: '#/components/schemas/User'
  119. examples:
  120. user:
  121. summary: User Example in XML
  122. externalValue: 'http://foo.bar/examples/user-example.xml'
  123. 'text/plain':
  124. examples:
  125. user:
  126. summary: User example in text plain format
  127. externalValue: 'http://foo.bar/examples/user-example.txt'
  128. '*/*':
  129. examples:
  130. user:
  131. summary: User example in other format
  132. externalValue: 'http://foo.bar/examples/user-example.whatever'
  133. servers:
  134. - url: http://petstore.swagger.io/v2
  135. parameters:
  136. - name: status
  137. in: query
  138. description: Status values that need to be considered for filter
  139. required: true
  140. schema:
  141. type: array
  142. items:
  143. type: string
  144. enum:
  145. - available
  146. - pending
  147. - sold
  148. default: available
  149. - "$ref": "#/components/parameters/skipParam"
  150. put:
  151. tags:
  152. - pet
  153. summary: Update an existing pet
  154. description: ''
  155. operationId: updatePet
  156. parameters: []
  157. responses:
  158. '400':
  159. description: A complex object array response
  160. content:
  161. application/json:
  162. schema:
  163. type: array
  164. items:
  165. $ref: '#/components/schemas/VeryComplexType'
  166. '404':
  167. description: Pet not found
  168. '405':
  169. description: Validation exception
  170. security:
  171. - petstore_auth:
  172. - write:pets
  173. - read:pets
  174. requestBody:
  175. "$ref": "#/components/requestBodies/requestBody1"
  176. "/pet/findByStatus":
  177. get:
  178. tags:
  179. - pet
  180. summary: Finds Pets by status
  181. description: Multiple status values can be provided with comma separated strings
  182. operationId: findPetsByStatus
  183. parameters:
  184. - name: status
  185. in: query
  186. description: Status values that need to be considered for filter
  187. required: true
  188. example: "example"
  189. schema:
  190. title: title test
  191. format: int64
  192. minimum: 1
  193. maximum: 10
  194. allOf:
  195. - $ref: '#/components/schemas/Pet'
  196. - type: object
  197. properties:
  198. huntingSkill:
  199. type: string
  200. description: The measured skill for hunting
  201. enum:
  202. - clueless
  203. - lazy
  204. - adventurous
  205. - aggressive
  206. xml:
  207. namespace: http://example.com/schema/sample
  208. prefix: sample
  209. enum:
  210. - available
  211. - pending
  212. - sold
  213. type: object
  214. properties:
  215. id:
  216. type: integer
  217. format: int64
  218. name:
  219. type: string
  220. xml:
  221. namespace: http://inside/properties/schema
  222. prefix: inside properties schema
  223. required:
  224. - name
  225. - pet
  226. example:
  227. name: Puma
  228. id: 1
  229. externalDocs:
  230. description: External Docs Inside Schema
  231. url: http://swagger.io inside Schema
  232. items:
  233. type: string
  234. enum:
  235. - available
  236. - pending
  237. - sold
  238. default: available
  239. content:
  240. 'application/json':
  241. schema:
  242. type: array
  243. items:
  244. type: string
  245. example: example string
  246. examples:
  247. list:
  248. summary: List of Names
  249. value:
  250. - Bob
  251. - Diane
  252. - Mary
  253. - Bill
  254. empty:
  255. summary: Empty
  256. value: {}
  257. encoding:
  258. historyMetadata:
  259. # require XML Content-Type in utf-8 encoding
  260. contentType: application/xml; charset=utf-8
  261. profileImage:
  262. # only accept png/jpeg
  263. contentType: image/png, image/jpeg
  264. headers:
  265. X-Rate-Limit:
  266. description: calls per hour allowed by the user
  267. schema:
  268. type: integer
  269. format: int32
  270. 'application/xml':
  271. examples:
  272. list:
  273. summary: List of names
  274. value: "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
  275. empty:
  276. summary: Empty list
  277. value: "<Users/>"
  278. 'text/plain':
  279. examples:
  280. list:
  281. summary: List of names
  282. value: "Bob,Diane,Mary,Bill"
  283. empty:
  284. summary: Empty
  285. value: ""
  286. responses:
  287. '200':
  288. description: successful operation
  289. content:
  290. application/xml:
  291. schema:
  292. type: array
  293. items:
  294. "$ref": "#/components/schemas/Pet"
  295. application/json:
  296. schema:
  297. type: array
  298. items:
  299. "$ref": "#/components/schemas/Pet"
  300. '400':
  301. description: Invalid status value
  302. security:
  303. - petstore_auth:
  304. - write:pets
  305. - read:pets
  306. requestBody:
  307. description: pet store to add to the system
  308. required: true
  309. content:
  310. multipart/mixed:
  311. schema:
  312. type: object
  313. properties:
  314. id:
  315. # default is text/plain
  316. type: string
  317. format: uuid
  318. "$ref": "#/components/schemas/Pet"
  319. address:
  320. # default is application/json
  321. type: object
  322. properties: {}
  323. historyMetadata:
  324. # need to declare XML format!
  325. description: metadata in XML format
  326. type: object
  327. properties: {}
  328. profileImage:
  329. # default is application/octet-stream, need to declare an image type only!
  330. type: string
  331. format: binary
  332. encoding:
  333. historyMetadata:
  334. # require XML Content-Type in utf-8 encoding
  335. contentType: application/xml; charset=utf-8
  336. profileImage:
  337. # only accept png/jpeg
  338. contentType: image/png, image/jpeg
  339. headers:
  340. X-Rate-Limit:
  341. description: calls per hour allowed by the user
  342. schema:
  343. type: integer
  344. format: int32
  345. X-Expires-After:
  346. description: date in UTC when token expires
  347. schema:
  348. type: string
  349. format: date-time
  350. callbacks:
  351. mainHook:
  352. '$request.body#/url':
  353. post:
  354. responses:
  355. '200':
  356. description: webhook successfully processed operation
  357. "/pet/findByTags":
  358. get:
  359. tags:
  360. - pet
  361. summary: Finds Pets by tags
  362. description: Muliple tags can be provided with comma separated strings. Use
  363. tag1, tag2, tag3 for testing.
  364. operationId: findPetsByTags
  365. parameters:
  366. - name: tags
  367. in: query
  368. description: Tags to filter by
  369. required: true
  370. schema:
  371. type: array
  372. items:
  373. type: string
  374. responses:
  375. '200':
  376. description: successful operation
  377. content:
  378. application/xml:
  379. schema:
  380. type: array
  381. items:
  382. "$ref": "#/components/schemas/Pet"
  383. application/json:
  384. schema:
  385. type: array
  386. items:
  387. "$ref": "#/components/schemas/Pet"
  388. '400':
  389. description: Invalid tag value
  390. callbacks:
  391. mainHook:
  392. '$ref': "#/components/callbacks/failed"
  393. security:
  394. - petstore_auth:
  395. - write:pets
  396. - read:pets
  397. deprecated: true
  398. "/pet/{petId}":
  399. get:
  400. tags:
  401. - pet
  402. summary: Find pet by ID
  403. description: Returns a single pet
  404. operationId: getPetById
  405. parameters:
  406. - name: petId
  407. in: path
  408. description: ID of pet to return
  409. required: true
  410. schema:
  411. type: integer
  412. format: int64
  413. responses:
  414. '200':
  415. description: successful operation
  416. content:
  417. application/xml:
  418. schema:
  419. "$ref": "#/components/schemas/Pet"
  420. application/json:
  421. schema:
  422. "$ref": "#/components/schemas/Pet"
  423. callbacks:
  424. mainHook:
  425. '$request.body#/url':
  426. post:
  427. responses:
  428. '200':
  429. description: successful operation
  430. content:
  431. application/xml:
  432. schema:
  433. "$ref": "#/components/schemas/Pet"
  434. security:
  435. - api_key: []
  436. post:
  437. tags:
  438. - pet
  439. summary: Updates a pet in the store with form data
  440. description: ''
  441. operationId: updatePetWithForm
  442. parameters:
  443. - name: petId
  444. in: path
  445. description: ID of pet that needs to be updated
  446. required: true
  447. schema:
  448. type: integer
  449. format: int64
  450. responses:
  451. '405':
  452. description: Invalid input
  453. security:
  454. - petstore_auth:
  455. - write:pets
  456. - read:pets
  457. requestBody:
  458. content:
  459. application/x-www-form-urlencoded:
  460. schema:
  461. type: object
  462. properties:
  463. name:
  464. description: Updated name of the pet
  465. type: string
  466. required: false
  467. status:
  468. description: Updated status of the pet
  469. type: string
  470. required: false
  471. delete:
  472. tags:
  473. - pet
  474. summary: Deletes a pet
  475. description: ''
  476. operationId: deletePet
  477. parameters:
  478. - name: api_key
  479. in: header
  480. required: false
  481. schema:
  482. type: string
  483. - name: petId
  484. in: path
  485. description: Pet id to delete
  486. required: true
  487. schema:
  488. type: integer
  489. format: int64
  490. responses:
  491. '400':
  492. description: Invalid ID supplied
  493. '404':
  494. description: Pet not found
  495. security:
  496. - petstore_auth:
  497. - write:pets
  498. - read:pets
  499. "/pet/{petId}/uploadImage":
  500. post:
  501. tags:
  502. - pet
  503. summary: uploads an image
  504. description: ''
  505. operationId: uploadFile
  506. parameters:
  507. - name: petId
  508. in: path
  509. description: ID of pet to update
  510. required: true
  511. schema:
  512. type: integer
  513. format: int64
  514. responses:
  515. '200':
  516. description: successful operation
  517. content:
  518. application/json:
  519. schema:
  520. "$ref": "#/components/schemas/ApiResponse"
  521. security:
  522. - petstore_auth:
  523. - write:pets
  524. - read:pets
  525. requestBody:
  526. content:
  527. application/octet-stream:
  528. schema:
  529. type: string
  530. format: binary
  531. "/store/inventory":
  532. get:
  533. tags:
  534. - store
  535. summary: Returns pet inventories by status
  536. description: Returns a map of status codes to quantities
  537. operationId: getInventory
  538. parameters: []
  539. responses:
  540. '200':
  541. description: successful operation
  542. content:
  543. application/json:
  544. schema:
  545. type: object
  546. additionalProperties:
  547. type: integer
  548. format: int32
  549. security:
  550. - api_key: []
  551. "/store/order":
  552. post:
  553. tags:
  554. - store
  555. summary: Place an order for a pet
  556. description: ''
  557. operationId: placeOrder
  558. parameters: []
  559. responses:
  560. '200':
  561. description: successful operation
  562. content:
  563. application/xml:
  564. schema:
  565. "$ref": "#/components/schemas/Order"
  566. application/json:
  567. schema:
  568. "$ref": "#/components/schemas/Order"
  569. '400':
  570. description: Invalid Order
  571. requestBody:
  572. content:
  573. application/json:
  574. description: order placed for purchasing the pet
  575. schema:
  576. "$ref": "#/components/schemas/Order"
  577. "/store/order/{orderId}":
  578. get:
  579. tags:
  580. - store
  581. summary: Find purchase order by ID
  582. description: For valid response try integer IDs with value >= 1 and <= 10. Other
  583. values will generated exceptions
  584. operationId: getOrderById
  585. parameters:
  586. - name: orderId
  587. in: path
  588. description: ID of pet that needs to be fetched
  589. required: true
  590. schema:
  591. type: integer
  592. format: int64
  593. minimum: 1
  594. maximum: 10
  595. responses:
  596. '200':
  597. description: successful operation
  598. content:
  599. application/xml:
  600. schema:
  601. "$ref": "#/components/schemas/Order"
  602. application/json:
  603. schema:
  604. "$ref": "#/components/schemas/Order"
  605. '400':
  606. description: Invalid ID supplied
  607. '404':
  608. description: Order not found
  609. delete:
  610. tags:
  611. - store
  612. summary: Delete purchase order by ID
  613. description: For valid response try integer IDs with positive integer value.
  614. Negative or non-integer values will generate API errors
  615. operationId: deleteOrder
  616. parameters:
  617. - name: orderId
  618. in: path
  619. description: ID of the order that needs to be deleted
  620. required: true
  621. schema:
  622. type: integer
  623. format: int64
  624. minimum: 1
  625. responses:
  626. '400':
  627. description: Invalid ID supplied
  628. '404':
  629. description: Order not found
  630. "/user":
  631. post:
  632. tags:
  633. - user
  634. summary: Create user
  635. description: This can only be done by the logged in user.
  636. operationId: createUser
  637. parameters: []
  638. responses:
  639. default:
  640. description: successful operation
  641. requestBody:
  642. content:
  643. application/json:
  644. description: Created user object
  645. schema:
  646. "$ref": "#/components/schemas/User"
  647. "/user/createWithArray":
  648. post:
  649. tags:
  650. - user
  651. summary: Creates list of users with given input array
  652. description: ''
  653. operationId: createUsersWithArrayInput
  654. parameters: []
  655. responses:
  656. default:
  657. description: successful operation
  658. requestBody:
  659. "$ref": "#/components/requestBodies/requestBody2"
  660. "/user/createWithList":
  661. post:
  662. tags:
  663. - user
  664. summary: Creates list of users with given input array
  665. description: ''
  666. operationId: createUsersWithListInput
  667. parameters: []
  668. responses:
  669. default:
  670. description: successful operation
  671. requestBody:
  672. "$ref": "#/components/requestBodies/requestBody2"
  673. "/user/login":
  674. get:
  675. tags:
  676. - user
  677. summary: Logs user into the system
  678. description: ''
  679. operationId: loginUser
  680. parameters:
  681. - name: username
  682. in: query
  683. description: The user name for login
  684. required: true
  685. schema:
  686. type: string
  687. - name: password
  688. in: query
  689. description: The password for login in clear text
  690. required: true
  691. schema:
  692. type: string
  693. format: password
  694. responses:
  695. '200':
  696. description: successful operation
  697. headers:
  698. X-Rate-Limit:
  699. description: calls per hour allowed by the user
  700. schema:
  701. type: integer
  702. format: int32
  703. X-Expires-After:
  704. description: date in UTC when token expires
  705. schema:
  706. type: string
  707. format: date-time
  708. content:
  709. application/xml:
  710. schema:
  711. type: string
  712. application/json:
  713. schema:
  714. type: string
  715. '400':
  716. description: Invalid username/password supplied
  717. "/user/logout":
  718. get:
  719. tags:
  720. - user
  721. summary: Logs out current logged in user session
  722. description: ''
  723. operationId: logoutUser
  724. parameters: []
  725. responses:
  726. default:
  727. description: successful operation
  728. "/user/{username}":
  729. get:
  730. tags:
  731. - user
  732. summary: Get user by user name
  733. description: ''
  734. operationId: getUserByName
  735. parameters:
  736. - name: username
  737. in: path
  738. description: 'The name that needs to be fetched. Use user1 for testing. '
  739. required: true
  740. schema:
  741. type: string
  742. responses:
  743. '200':
  744. description: successful operation
  745. content:
  746. application/xml:
  747. schema:
  748. "$ref": "#/components/schemas/User"
  749. application/json:
  750. schema:
  751. "$ref": "#/components/schemas/User"
  752. '400':
  753. description: Invalid username supplied
  754. '404':
  755. description: User not found
  756. put:
  757. tags:
  758. - user
  759. summary: Updated user
  760. description: This can only be done by the logged in user.
  761. operationId: updateUser
  762. parameters:
  763. - name: username
  764. in: path
  765. description: name that need to be updated
  766. required: true
  767. schema:
  768. type: string
  769. responses:
  770. '400':
  771. description: Invalid user supplied
  772. '404':
  773. description: User not found
  774. requestBody:
  775. content:
  776. application/json:
  777. description: Updated user object
  778. schema:
  779. "$ref": "#/components/schemas/User"
  780. delete:
  781. tags:
  782. - user
  783. summary: Delete user
  784. description: This can only be done by the logged in user.
  785. operationId: deleteUser
  786. parameters:
  787. - name: username
  788. in: path
  789. description: The name that needs to be deleted
  790. required: true
  791. schema:
  792. type: string
  793. responses:
  794. '400':
  795. description: Invalid username supplied
  796. '404':
  797. description: User not found
  798. externalDocs:
  799. description: Find out more about Swagger
  800. url: http://swagger.io
  801. components:
  802. schemas:
  803. VeryComplexType:
  804. type: integer
  805. format: int32
  806. ExtendedErrorModel:
  807. allOf:
  808. - type: object
  809. required:
  810. - rootCause
  811. properties:
  812. rootCause:
  813. type: string
  814. "$ref": "#/components/schemas/Category"
  815. Order:
  816. type: object
  817. not:
  818. type: integer
  819. format: int32
  820. additionalProperties:
  821. type: integer
  822. properties:
  823. id:
  824. type: integer
  825. format: int64
  826. petId:
  827. type: integer
  828. format: int64
  829. quantity:
  830. type: integer
  831. format: int32
  832. shipDate:
  833. type: string
  834. format: date-time
  835. status:
  836. type: string
  837. description: Order Status
  838. enum:
  839. - placed
  840. - approved
  841. - delivered
  842. complete:
  843. type: boolean
  844. default: false
  845. xml:
  846. name: Order
  847. OrderRef:
  848. type: object
  849. not:
  850. type: integer
  851. format: int32
  852. "$ref": "#/components/schemas/Category"
  853. additionalProperties:
  854. type: integer
  855. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  856. properties:
  857. id:
  858. type: integer
  859. format: int64
  860. petId:
  861. type: integer
  862. format: int64
  863. quantity:
  864. type: integer
  865. format: int32
  866. shipDate:
  867. type: string
  868. format: date-time
  869. status:
  870. type: string
  871. description: Order Status
  872. enum:
  873. - placed
  874. - approved
  875. - delivered
  876. complete:
  877. type: boolean
  878. default: false
  879. xml:
  880. name: Order
  881. Category:
  882. type: object
  883. properties:
  884. id:
  885. type: integer
  886. format: int64
  887. name:
  888. type: string
  889. xml:
  890. name: Category
  891. User:
  892. type: object
  893. properties:
  894. id:
  895. type: integer
  896. format: int64
  897. username:
  898. type: string
  899. firstName:
  900. type: string
  901. lastName:
  902. type: string
  903. email:
  904. type: string
  905. password:
  906. type: string
  907. phone:
  908. type: string
  909. userStatus:
  910. type: integer
  911. format: int32
  912. description: User Status
  913. xml:
  914. name: User
  915. Tag:
  916. type: object
  917. properties:
  918. id:
  919. type: integer
  920. format: int64
  921. name:
  922. type: string
  923. xml:
  924. name: Tag
  925. Pet:
  926. type: object
  927. required:
  928. - name
  929. - photoUrls
  930. properties:
  931. id:
  932. type: integer
  933. format: int64
  934. category:
  935. "$ref": "#/components/schemas/Category"
  936. user:
  937. type: string
  938. example: doggie
  939. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  940. photoUrls:
  941. type: array
  942. xml:
  943. name: photoUrl
  944. wrapped: true
  945. items:
  946. type: string
  947. tags:
  948. type: array
  949. xml:
  950. name: tag
  951. wrapped: true
  952. items:
  953. "$ref": "#/components/schemas/Tag"
  954. status:
  955. type: string
  956. description: pet status in the store
  957. enum:
  958. - available
  959. - pending
  960. - sold
  961. xml:
  962. name: Pet
  963. ApiResponse:
  964. type: object
  965. required:
  966. - name
  967. - photoUrls
  968. properties:
  969. code:
  970. type: integer
  971. format: int32
  972. type:
  973. type: string
  974. message:
  975. type: string
  976. responses:
  977. Found:
  978. description: Entity not found.
  979. "$ref": "http://localhost:${dynamicPort}/remote/response#/responses/NotFound"
  980. NotFound:
  981. description: Entity not found.
  982. IllegalInput:
  983. description: Illegal input for operation.
  984. headers:
  985. X-Ref-Limit-Limit:
  986. "$ref": "#/components/headers/X-Rate-Limit-Reset"
  987. links:
  988. address:
  989. "$ref": "#/components/links/unsubscribe"
  990. GeneralError:
  991. description: General Error
  992. content:
  993. application/json:
  994. schema:
  995. $ref: '#/components/schemas/ExtendedErrorModel'
  996. parameters:
  997. contentParameter:
  998. in: query
  999. name: coordinates
  1000. content:
  1001. application/json:
  1002. schema:
  1003. $ref: '#/components/schemas/ExtendedErrorModel'
  1004. examples:
  1005. cat:
  1006. summary: An example of a cat
  1007. value:
  1008. name: Fluffy
  1009. petType: Cat
  1010. color: White
  1011. gender: male
  1012. breed: Persian
  1013. refParam:
  1014. "$ref": "#/components/parameters/limitParam"
  1015. remoteParameter:
  1016. "$ref": "http://localhost:${dynamicPort}/remote/parameter"
  1017. newParam:
  1018. name: skip
  1019. in: query
  1020. description: number of items to skip
  1021. required: true
  1022. schema:
  1023. type: integer
  1024. format: int32
  1025. "$ref": "#/components/schemas/Tag"
  1026. skipParam:
  1027. name: skip
  1028. in: query
  1029. description: number of items to skip
  1030. required: true
  1031. schema:
  1032. type: integer
  1033. format: int32
  1034. limitParam:
  1035. name: limit
  1036. in: query
  1037. description: max records to return
  1038. required: true
  1039. schema:
  1040. type: integer
  1041. format: int32
  1042. examples:
  1043. referenceCat:
  1044. "$ref": "http://localhost:${dynamicPort}/remote/example"
  1045. cat:
  1046. summary: An example of a cat
  1047. value:
  1048. name: Fluffy
  1049. petType: Cat
  1050. color: White
  1051. gender: male
  1052. breed: Persian
  1053. dog:
  1054. summary: An example of a dog with a cat's name
  1055. value:
  1056. name: Puma
  1057. petType: Dog
  1058. color: Black
  1059. gender: Female
  1060. breed: Mixed
  1061. frog:
  1062. $ref: "#/components/examples/cat"
  1063. requestBodies:
  1064. reference:
  1065. "$ref": "http://localhost:${dynamicPort}/remote/requestBody"
  1066. requestBody1:
  1067. description: request body in components
  1068. content:
  1069. application/json:
  1070. description: Pet object that needs to be added to the store
  1071. schema:
  1072. "$ref": "#/components/schemas/Pet"
  1073. application/xml:
  1074. description: Pet object that needs to be added to the store
  1075. schema:
  1076. "$ref": "#/components/schemas/Pet"
  1077. requestBody2:
  1078. content:
  1079. application/json:
  1080. description: List of user object
  1081. schema:
  1082. type: array
  1083. items:
  1084. "$ref": "#/components/schemas/User"
  1085. requestBody3:
  1086. "$ref": "#/components/requestBodies/requestBody2"
  1087. securitySchemes:
  1088. reference:
  1089. "$ref": "#/components/securitySchemes/api_key"
  1090. petstore_auth:
  1091. type: oauth2
  1092. flows:
  1093. implicit:
  1094. authorizationUrl: http://petstore.swagger.io/oauth/dialog
  1095. scopes:
  1096. write:pets: modify pets in your account
  1097. read:pets: read your pets
  1098. api_key:
  1099. type: apiKey
  1100. name: api_key
  1101. in: header
  1102. headers:
  1103. X-Ref-Limit-Limit:
  1104. "$ref": "#/components/headers/X-Rate-Limit-Reset"
  1105. X-Rate-Limit-Limit:
  1106. description: The number of allowed requests in the current period
  1107. schema:
  1108. type: integer
  1109. example: "This is a header example"
  1110. X-Rate-Limit-Remaining:
  1111. description: The number of remaining requests in the current period
  1112. schema:
  1113. type: integer
  1114. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  1115. X-Rate-Limit-Reset:
  1116. description: The number of seconds left in the current period
  1117. content:
  1118. application/json:
  1119. schema:
  1120. $ref: '#/components/schemas/ExtendedErrorModel'
  1121. examples:
  1122. - $ref: "#/components/examples/dog"
  1123. links:
  1124. referenced:
  1125. "$ref": "#/components/links/unsubscribe"
  1126. unsubscribe:
  1127. operationId: cancelHookCallback
  1128. parameters:
  1129. id: $response.body#/hookId
  1130. x-link: link extension
  1131. subscribe:
  1132. "$ref": "http://localhost:${dynamicPort}/remote/link"
  1133. callbacks:
  1134. remoteCallback:
  1135. "$ref": "http://localhost:${dynamicPort}/remote/callback"
  1136. referenced:
  1137. "$ref": "#/components/callbacks/failed"
  1138. heartbeat:
  1139. '$request.query.heartbeat-url':
  1140. post:
  1141. requestBody:
  1142. $ref: '#/components/requestBodies/requestBody3'
  1143. responses:
  1144. '200':
  1145. description: Consumer acknowledged the callback
  1146. failed:
  1147. '$response.body#/failedUrl':
  1148. post:
  1149. requestBody:
  1150. $ref: '#/components/requestBodies/requestBody3'
  1151. responses:
  1152. '200':
  1153. description: Consumer acknowledged the callback failed
  1154. success:
  1155. '$response.body#/successUrl':
  1156. post:
  1157. requestBody:
  1158. $ref: '#/components/requestBodies/requestBody1'
  1159. responses:
  1160. '200':
  1161. description: Consumer acknowledged the callback
  1162. x-component:
  1163. - url: http://component.swagger.io/v2/swagger.json
  1164. format: OAS
  1165. version: '3.0'
  1166. converter:
  1167. url: https://github.com/mermade/oas3
  1168. version: 1.2.3
  1169. x-api-title: pet store test api in components
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement