Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.40 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. RemoteSchema:
  804. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/RemoteSchema"
  805. VeryComplexType:
  806. type: integer
  807. format: int32
  808. ExtendedErrorModel:
  809. allOf:
  810. - type: object
  811. required:
  812. - rootCause
  813. properties:
  814. rootCause:
  815. type: string
  816. "$ref": "#/components/schemas/Category"
  817. Order:
  818. type: object
  819. not:
  820. type: integer
  821. format: int32
  822. additionalProperties:
  823. type: integer
  824. properties:
  825. id:
  826. type: integer
  827. format: int64
  828. petId:
  829. type: integer
  830. format: int64
  831. quantity:
  832. type: integer
  833. format: int32
  834. shipDate:
  835. type: string
  836. format: date-time
  837. status:
  838. type: string
  839. description: Order Status
  840. enum:
  841. - placed
  842. - approved
  843. - delivered
  844. complete:
  845. type: boolean
  846. default: false
  847. xml:
  848. name: Order
  849. OrderRef:
  850. type: object
  851. not:
  852. type: integer
  853. format: int32
  854. "$ref": "#/components/schemas/Category"
  855. additionalProperties:
  856. type: integer
  857. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  858. properties:
  859. id:
  860. type: integer
  861. format: int64
  862. petId:
  863. type: integer
  864. format: int64
  865. quantity:
  866. type: integer
  867. format: int32
  868. shipDate:
  869. type: string
  870. format: date-time
  871. status:
  872. type: string
  873. description: Order Status
  874. enum:
  875. - placed
  876. - approved
  877. - delivered
  878. complete:
  879. type: boolean
  880. default: false
  881. xml:
  882. name: Order
  883. Category:
  884. type: object
  885. properties:
  886. id:
  887. type: integer
  888. format: int64
  889. name:
  890. type: string
  891. xml:
  892. name: Category
  893. User:
  894. type: object
  895. properties:
  896. id:
  897. type: integer
  898. format: int64
  899. username:
  900. type: string
  901. firstName:
  902. type: string
  903. lastName:
  904. type: string
  905. email:
  906. type: string
  907. password:
  908. type: string
  909. phone:
  910. type: string
  911. userStatus:
  912. type: integer
  913. format: int32
  914. description: User Status
  915. xml:
  916. name: User
  917. Tag:
  918. type: object
  919. properties:
  920. id:
  921. type: integer
  922. format: int64
  923. name:
  924. type: string
  925. xml:
  926. name: Tag
  927. Pet:
  928. type: object
  929. required:
  930. - name
  931. - photoUrls
  932. properties:
  933. id:
  934. type: integer
  935. format: int64
  936. category:
  937. "$ref": "#/components/schemas/Category"
  938. user:
  939. type: string
  940. example: doggie
  941. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  942. photoUrls:
  943. type: array
  944. xml:
  945. name: photoUrl
  946. wrapped: true
  947. items:
  948. type: string
  949. tags:
  950. type: array
  951. xml:
  952. name: tag
  953. wrapped: true
  954. items:
  955. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/ExampleSchema"
  956. status:
  957. type: string
  958. description: pet status in the store
  959. enum:
  960. - available
  961. - pending
  962. - sold
  963. xml:
  964. name: Pet
  965. ApiResponse:
  966. type: object
  967. required:
  968. - name
  969. - photoUrls
  970. properties:
  971. code:
  972. type: integer
  973. format: int32
  974. type:
  975. type: string
  976. message:
  977. type: string
  978. responses:
  979. Found:
  980. description: Entity not found.
  981. "$ref": "http://localhost:${dynamicPort}/remote/response#/responses/RemoteResponse"
  982. NotFound:
  983. description: Entity not found.
  984. IllegalInput:
  985. description: Illegal input for operation.
  986. headers:
  987. X-Ref-Limit-Limit:
  988. "$ref": "#/components/headers/X-Rate-Limit-Reset"
  989. links:
  990. address:
  991. "$ref": "#/components/links/unsubscribe"
  992. GeneralError:
  993. description: General Error
  994. content:
  995. application/json:
  996. schema:
  997. $ref: '#/components/schemas/ExtendedErrorModel'
  998. parameters:
  999. contentParameter:
  1000. in: query
  1001. name: coordinates
  1002. content:
  1003. application/json:
  1004. schema:
  1005. $ref: '#/components/schemas/ExtendedErrorModel'
  1006. examples:
  1007. cat:
  1008. summary: An example of a cat
  1009. value:
  1010. name: Fluffy
  1011. petType: Cat
  1012. color: White
  1013. gender: male
  1014. breed: Persian
  1015. refParam:
  1016. "$ref": "#/components/parameters/limitParam"
  1017. remoteParameter:
  1018. "$ref": "http://localhost:${dynamicPort}/remote/parameter"
  1019. newParam:
  1020. name: skip
  1021. in: query
  1022. description: number of items to skip
  1023. required: true
  1024. schema:
  1025. type: integer
  1026. format: int32
  1027. "$ref": "#/components/schemas/Tag"
  1028. skipParam:
  1029. name: skip
  1030. in: query
  1031. description: number of items to skip
  1032. required: true
  1033. schema:
  1034. type: integer
  1035. format: int32
  1036. limitParam:
  1037. name: limit
  1038. in: query
  1039. description: max records to return
  1040. required: true
  1041. schema:
  1042. type: integer
  1043. format: int32
  1044. examples:
  1045. referenceCat:
  1046. "$ref": "http://localhost:${dynamicPort}/remote/example"
  1047. cat:
  1048. summary: An example of a cat
  1049. value:
  1050. name: Fluffy
  1051. petType: Cat
  1052. color: White
  1053. gender: male
  1054. breed: Persian
  1055. dog:
  1056. summary: An example of a dog with a cat's name
  1057. value:
  1058. name: Puma
  1059. petType: Dog
  1060. color: Black
  1061. gender: Female
  1062. breed: Mixed
  1063. frog:
  1064. $ref: "#/components/examples/cat"
  1065. requestBodies:
  1066. reference:
  1067. "$ref": "http://localhost:${dynamicPort}/remote/requestBody#/requestBodies/remote_requestBody"
  1068. requestBody1:
  1069. description: request body in components
  1070. content:
  1071. application/json:
  1072. description: Pet object that needs to be added to the store
  1073. schema:
  1074. "$ref": "#/components/schemas/Pet"
  1075. application/xml:
  1076. description: Pet object that needs to be added to the store
  1077. schema:
  1078. "$ref": "#/components/schemas/Pet"
  1079. requestBody2:
  1080. content:
  1081. application/json:
  1082. description: List of user object
  1083. schema:
  1084. type: array
  1085. items:
  1086. "$ref": "#/components/schemas/User"
  1087. requestBody3:
  1088. "$ref": "#/components/requestBodies/requestBody2"
  1089. securitySchemes:
  1090. reference:
  1091. "$ref": "#/components/securitySchemes/api_key"
  1092. remote_reference:
  1093. "$ref": 'http://localhost:${dynamicPort}/remote/security/petstore_remote'
  1094. petstore_auth:
  1095. type: oauth2
  1096. flows:
  1097. implicit:
  1098. authorizationUrl: http://petstore.swagger.io/oauth/dialog
  1099. scopes:
  1100. write:pets: modify pets in your account
  1101. read:pets: read your pets
  1102. api_key:
  1103. type: apiKey
  1104. name: api_key
  1105. in: header
  1106. headers:
  1107. X-Ref-Limit-Limit:
  1108. "$ref": "#/components/headers/X-Rate-Limit-Reset"
  1109. X-Rate-Limit-Limit:
  1110. description: The number of allowed requests in the current period
  1111. schema:
  1112. type: integer
  1113. example: "This is a header example"
  1114. X-Rate-Limit-Remaining:
  1115. description: The number of remaining requests in the current period
  1116. schema:
  1117. type: integer
  1118. "$ref": "http://localhost:${dynamicPort}/remote/schema#/components/schemas/User"
  1119. X-Rate-Limit-Reset:
  1120. description: The number of seconds left in the current period
  1121. content:
  1122. application/json:
  1123. schema:
  1124. $ref: '#/components/schemas/ExtendedErrorModel'
  1125. examples:
  1126. - $ref: "#/components/examples/dog"
  1127. links:
  1128. referenced:
  1129. "$ref": "#/components/links/unsubscribe"
  1130. unsubscribe:
  1131. operationId: cancelHookCallback
  1132. parameters:
  1133. id: $response.body#/hookId
  1134. x-link: link extension
  1135. subscribe:
  1136. "$ref": "http://localhost:${dynamicPort}/remote/link"
  1137. callbacks:
  1138. remoteCallback:
  1139. "$ref": "http://localhost:${dynamicPort}/remote/callback"
  1140. referenced:
  1141. "$ref": "#/components/callbacks/failed"
  1142. heartbeat:
  1143. '$request.query.heartbeat-url':
  1144. post:
  1145. requestBody:
  1146. $ref: '#/components/requestBodies/requestBody3'
  1147. responses:
  1148. '200':
  1149. description: Consumer acknowledged the callback
  1150. failed:
  1151. '$response.body#/failedUrl':
  1152. post:
  1153. requestBody:
  1154. $ref: '#/components/requestBodies/requestBody3'
  1155. responses:
  1156. '200':
  1157. description: Consumer acknowledged the callback failed
  1158. success:
  1159. '$response.body#/successUrl':
  1160. post:
  1161. requestBody:
  1162. $ref: '#/components/requestBodies/requestBody1'
  1163. responses:
  1164. '200':
  1165. description: Consumer acknowledged the callback
  1166. x-component:
  1167. - url: http://component.swagger.io/v2/swagger.json
  1168. format: OAS
  1169. version: '3.0'
  1170. converter:
  1171. url: https://github.com/mermade/oas3
  1172. version: 1.2.3
  1173. x-api-title: pet store test api in components
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement