petstore-3.0.json 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  1. {
  2. "openapi": "3.0.0",
  3. "info": {
  4. "title": "Swagger Petstore",
  5. "description": "This is a sample Petstore server. You can find\nout more about Swagger at\n[http://swagger.io](http://swagger.io) or on\n[irc.freenode.net, #swagger](http://swagger.io/irc/).",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "email": "apiteam@swagger.io"
  9. },
  10. "license": {
  11. "name": "Apache 2.0",
  12. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  13. },
  14. "version": "1.0.0"
  15. },
  16. "servers": [
  17. {
  18. "url": "https://virtserver.swaggerhub.com/swagger/Petstore/1.0.0",
  19. "description": "SwaggerHUB API Mocking"
  20. }
  21. ],
  22. "paths": {
  23. "/pet": {
  24. "put": {
  25. "tags": [
  26. "pet"
  27. ],
  28. "summary": "Update an existing pet",
  29. "operationId": "updatePet",
  30. "requestBody": {
  31. "$ref": "#/components/requestBodies/Pet"
  32. },
  33. "responses": {
  34. "400": {
  35. "description": "Invalid ID supplied"
  36. },
  37. "404": {
  38. "description": "Pet not found"
  39. },
  40. "405": {
  41. "description": "Validation exception"
  42. }
  43. },
  44. "security": [
  45. {
  46. "petstore_auth": [
  47. "write:pets",
  48. "read:pets"
  49. ]
  50. }
  51. ]
  52. },
  53. "post": {
  54. "tags": [
  55. "pet"
  56. ],
  57. "summary": "Add a new pet to the store",
  58. "operationId": "addPet",
  59. "requestBody": {
  60. "$ref": "#/components/requestBodies/Pet"
  61. },
  62. "responses": {
  63. "405": {
  64. "description": "Invalid input"
  65. }
  66. },
  67. "security": [
  68. {
  69. "petstore_auth": [
  70. "write:pets",
  71. "read:pets"
  72. ]
  73. }
  74. ]
  75. }
  76. },
  77. "/pet/findByStatus": {
  78. "get": {
  79. "tags": [
  80. "pet"
  81. ],
  82. "summary": "Finds Pets by status",
  83. "description": "Multiple status values can be provided with comma separated string",
  84. "operationId": "findPetsByStatus",
  85. "parameters": [
  86. {
  87. "name": "status",
  88. "in": "query",
  89. "description": "Status values that needed to be considered for filter",
  90. "required": true,
  91. "explode": true,
  92. "schema": {
  93. "type": "array",
  94. "items": {
  95. "type": "string",
  96. "enum": [
  97. "available",
  98. "pending",
  99. "sold"
  100. ]
  101. },
  102. "default": "available"
  103. }
  104. }
  105. ],
  106. "responses": {
  107. "200": {
  108. "description": "successful operation",
  109. "content": {
  110. "application/json": {
  111. "schema": {
  112. "type": "array",
  113. "items": {
  114. "$ref": "#/components/schemas/Pet"
  115. }
  116. }
  117. },
  118. "application/xml": {
  119. "schema": {
  120. "type": "array",
  121. "items": {
  122. "$ref": "#/components/schemas/Pet"
  123. }
  124. }
  125. }
  126. }
  127. },
  128. "400": {
  129. "description": "Invalid status value"
  130. }
  131. },
  132. "deprecated": true,
  133. "security": [
  134. {
  135. "petstore_auth": [
  136. "write:pets",
  137. "read:pets"
  138. ]
  139. }
  140. ]
  141. }
  142. },
  143. "/pet/findByTags": {
  144. "get": {
  145. "tags": [
  146. "pet"
  147. ],
  148. "summary": "Finds Pets by tags",
  149. "description": ">-\n Muliple tags can be provided with comma separated strings. Use\\ \\ tag1,\n tag2, tag3 for testing.",
  150. "operationId": "findByTags",
  151. "parameters": [
  152. {
  153. "name": "tags",
  154. "in": "query",
  155. "description": "Tags to filter by",
  156. "required": true,
  157. "explode": true,
  158. "schema": {
  159. "type": "array",
  160. "items": {
  161. "type": "string"
  162. }
  163. }
  164. }
  165. ],
  166. "responses": {
  167. "200": {
  168. "description": "successful operation",
  169. "content": {
  170. "application/json": {
  171. "schema": {
  172. "type": "array",
  173. "items": {
  174. "$ref": "#/components/schemas/Pet"
  175. }
  176. }
  177. },
  178. "application/xml": {
  179. "schema": {
  180. "type": "array",
  181. "items": {
  182. "$ref": "#/components/schemas/Pet"
  183. }
  184. }
  185. }
  186. }
  187. },
  188. "400": {
  189. "description": "Invalid status value"
  190. }
  191. },
  192. "security": [
  193. {
  194. "petstore_auth": [
  195. "write:pets",
  196. "read:pets"
  197. ]
  198. }
  199. ]
  200. }
  201. },
  202. "/pet/{petId}": {
  203. "get": {
  204. "tags": [
  205. "pet"
  206. ],
  207. "summary": "Find pet by ID",
  208. "description": "Returns a single pet",
  209. "operationId": "getPetById",
  210. "parameters": [
  211. {
  212. "name": "petId",
  213. "in": "path",
  214. "description": "ID of pet to return",
  215. "required": true,
  216. "schema": {
  217. "type": "integer",
  218. "format": "int64"
  219. }
  220. }
  221. ],
  222. "responses": {
  223. "200": {
  224. "description": "successful operation",
  225. "content": {
  226. "application/json": {
  227. "schema": {
  228. "$ref": "#/components/schemas/Pet"
  229. }
  230. },
  231. "application/xml": {
  232. "schema": {
  233. "$ref": "#/components/schemas/Pet"
  234. }
  235. }
  236. }
  237. },
  238. "400": {
  239. "description": "Invalid ID supplier"
  240. },
  241. "404": {
  242. "description": "Pet not found"
  243. }
  244. },
  245. "security": [
  246. {
  247. "api_key": []
  248. }
  249. ]
  250. },
  251. "post": {
  252. "tags": [
  253. "pet"
  254. ],
  255. "summary": "Updates a pet in the store with form data",
  256. "operationId": "updatePetWithForm",
  257. "parameters": [
  258. {
  259. "name": "petId",
  260. "in": "path",
  261. "description": "ID of pet that needs to be updated",
  262. "required": true,
  263. "schema": {
  264. "type": "integer",
  265. "format": "int64"
  266. }
  267. }
  268. ],
  269. "requestBody": {
  270. "description": "Input data format",
  271. "content": {
  272. "application/x-www-form-urlencoded": {
  273. "schema": {
  274. "properties": {
  275. "name": {
  276. "description": "Updated name of the pet",
  277. "type": "string"
  278. },
  279. "status": {
  280. "description": "Updated status of the pet",
  281. "type": "string"
  282. }
  283. },
  284. "type": "object"
  285. }
  286. }
  287. }
  288. },
  289. "responses": {
  290. "405": {
  291. "description": "Invalid input"
  292. }
  293. },
  294. "security": [
  295. {
  296. "petstore_auth": [
  297. "write:pets",
  298. "read:pets"
  299. ]
  300. }
  301. ]
  302. },
  303. "delete": {
  304. "tags": [
  305. "pet"
  306. ],
  307. "summary": "Deletes a pet",
  308. "operationId": "deletePet",
  309. "parameters": [
  310. {
  311. "name": "api_key",
  312. "in": "header",
  313. "required": false,
  314. "schema": {
  315. "type": "string"
  316. }
  317. },
  318. {
  319. "name": "petId",
  320. "in": "path",
  321. "description": "Pet id to delete",
  322. "required": true,
  323. "schema": {
  324. "type": "integer",
  325. "format": "int64"
  326. }
  327. }
  328. ],
  329. "responses": {
  330. "400": {
  331. "description": "Invalid ID supplied"
  332. },
  333. "404": {
  334. "description": "Pet not found"
  335. }
  336. },
  337. "security": [
  338. {
  339. "petstore_auth": [
  340. "write:pets",
  341. "read:pets"
  342. ]
  343. }
  344. ]
  345. }
  346. },
  347. "/pet/{petId}/uploadImage": {
  348. "post": {
  349. "tags": [
  350. "pet"
  351. ],
  352. "summary": "uploads an image",
  353. "operationId": "uploadFile",
  354. "parameters": [
  355. {
  356. "name": "petId",
  357. "in": "path",
  358. "description": "ID of pet to update",
  359. "required": true,
  360. "schema": {
  361. "type": "integer",
  362. "format": "int64",
  363. "example": 1
  364. }
  365. }
  366. ],
  367. "requestBody": {
  368. "description": "Upload images request body",
  369. "content": {
  370. "application/octet-stream": {
  371. "schema": {
  372. "type": "string",
  373. "format": "binary"
  374. }
  375. }
  376. }
  377. },
  378. "responses": {
  379. "200": {
  380. "description": "successful operation",
  381. "content": {
  382. "application/json": {
  383. "schema": {
  384. "$ref": "#/components/schemas/ApiResponse"
  385. }
  386. }
  387. }
  388. }
  389. },
  390. "security": [
  391. {
  392. "petstore_auth": [
  393. "write:pets",
  394. "read:pets"
  395. ]
  396. }
  397. ]
  398. }
  399. },
  400. "/store": {
  401. "get": {
  402. "tags": [
  403. "store"
  404. ],
  405. "summary": "Returns pet inventories by status",
  406. "description": "Returns a map of status codes to quantities",
  407. "operationId": "getInventory",
  408. "responses": {
  409. "200": {
  410. "description": "successful operation",
  411. "content": {
  412. "application/json": {
  413. "schema": {
  414. "additionalProperties": {
  415. "type": "integer",
  416. "format": "int32"
  417. }
  418. }
  419. }
  420. }
  421. }
  422. },
  423. "security": [
  424. {
  425. "api_key": []
  426. }
  427. ]
  428. }
  429. },
  430. "/store/order": {
  431. "post": {
  432. "tags": [
  433. "store"
  434. ],
  435. "summary": "Place an order for a pet",
  436. "operationId": "placeOrder",
  437. "requestBody": {
  438. "description": "order placed for purchasing th pet",
  439. "required": true,
  440. "content": {
  441. "application/json": {
  442. "schema": {
  443. "$ref": "#/components/schemas/Order"
  444. }
  445. }
  446. }
  447. },
  448. "responses": {
  449. "200": {
  450. "description": "successful operation",
  451. "content": {
  452. "application/json": {
  453. "schema": {
  454. "$ref": "#/components/schemas/Order"
  455. }
  456. },
  457. "application/xml": {
  458. "schema": {
  459. "$ref": "#/components/schemas/Order"
  460. }
  461. }
  462. }
  463. }
  464. }
  465. }
  466. },
  467. "/store/order/{orderId}": {
  468. "get": {
  469. "tags": [
  470. "store"
  471. ],
  472. "description": ">-\n For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other\n values will generated exceptions",
  473. "operationId": "getOrderById",
  474. "parameters": [
  475. {
  476. "name": "orderId",
  477. "in": "path",
  478. "description": "ID of pet that needs to be fetched",
  479. "required": true,
  480. "schema": {
  481. "type": "integer",
  482. "format": "int64",
  483. "maximum": 1,
  484. "minimum": 10
  485. }
  486. }
  487. ],
  488. "responses": {
  489. "200": {
  490. "description": "successful operation",
  491. "content": {
  492. "application/xml": {
  493. "schema": {
  494. "$ref": "#/components/schemas/Order"
  495. }
  496. },
  497. "application/json": {
  498. "schema": {
  499. "$ref": "#/components/schemas/Order"
  500. }
  501. }
  502. }
  503. },
  504. "400": {
  505. "description": "Invalid ID supplied"
  506. },
  507. "404": {
  508. "description": "Order not found"
  509. }
  510. }
  511. },
  512. "delete": {
  513. "tags": [
  514. "store"
  515. ],
  516. "summary": "Delete purchase order by ID",
  517. "description": ">-\n For valid response try integer IDs with positive integer value.\\ \\\n Negative or non-integer values will generate API errors",
  518. "operationId": "deleteOrder",
  519. "parameters": [
  520. {
  521. "name": "orderId",
  522. "in": "path",
  523. "description": "ID of the order that needs to be deleted",
  524. "required": true,
  525. "schema": {
  526. "type": "integer",
  527. "format": "int64",
  528. "minimum": 1
  529. }
  530. }
  531. ],
  532. "responses": {
  533. "400": {
  534. "description": "Invalid ID supplied"
  535. },
  536. "404": {
  537. "description": "Order not found"
  538. }
  539. }
  540. }
  541. },
  542. "/user": {
  543. "post": {
  544. "tags": [
  545. "user"
  546. ],
  547. "summary": "Create user",
  548. "description": "This can only be done by the logged in user.",
  549. "operationId": "createUser",
  550. "requestBody": {
  551. "description": "Create user object",
  552. "required": true,
  553. "content": {
  554. "application/json": {
  555. "schema": {
  556. "$ref": "#/components/schemas/User"
  557. }
  558. }
  559. }
  560. },
  561. "responses": {
  562. "default": {
  563. "description": "successful operation"
  564. }
  565. }
  566. }
  567. },
  568. "/user/createWithArray": {
  569. "post": {
  570. "tags": [
  571. "user"
  572. ],
  573. "summary": "Create list of users with given input array",
  574. "operationId": "createUsersWithListInput",
  575. "requestBody": {
  576. "$ref": "#/components/requestBodies/UserArray"
  577. },
  578. "responses": {
  579. "default": {
  580. "description": "successful operation"
  581. }
  582. }
  583. }
  584. },
  585. "/user/login": {
  586. "get": {
  587. "tags": [
  588. "user"
  589. ],
  590. "summary": "Logs user into system",
  591. "operationId": "loginUser",
  592. "parameters": [
  593. {
  594. "name": "username",
  595. "in": "query",
  596. "description": "The user name for login",
  597. "required": true,
  598. "schema": {
  599. "type": "string"
  600. }
  601. },
  602. {
  603. "name": "password",
  604. "in": "query",
  605. "required": true,
  606. "schema": {
  607. "type": "string"
  608. }
  609. }
  610. ],
  611. "responses": {
  612. "200": {
  613. "description": "successful operation",
  614. "headers": {
  615. "X-Rate-Limit": {
  616. "description": "calls per hour allowed by the user",
  617. "schema": {
  618. "type": "integer",
  619. "format": "int32"
  620. }
  621. },
  622. "X-Expires-After": {
  623. "description": "date in UTC when token expires",
  624. "schema": {
  625. "type": "string",
  626. "format": "datetime"
  627. }
  628. }
  629. },
  630. "content": {
  631. "application/xml": {
  632. "schema": {
  633. "type": "string"
  634. }
  635. },
  636. "application/json": {
  637. "schema": {
  638. "type": "string"
  639. }
  640. }
  641. }
  642. },
  643. "400": {
  644. "description": "Invalid username/password supplied"
  645. }
  646. }
  647. }
  648. },
  649. "/user/logout": {
  650. "get": {
  651. "tags": [
  652. "user"
  653. ],
  654. "summary": "Logs out current logged in user session",
  655. "operationId": "logoutUser",
  656. "responses": {
  657. "default": {
  658. "description": "successful operation"
  659. }
  660. }
  661. }
  662. },
  663. "/user/{username}": {
  664. "get": {
  665. "summary": "Get user by user name",
  666. "operationId": "getUserByName",
  667. "parameters": [
  668. {
  669. "name": "username",
  670. "in": "path",
  671. "required": true,
  672. "schema": {
  673. "type": "string"
  674. }
  675. }
  676. ],
  677. "responses": {
  678. "200": {
  679. "description": "successful operation",
  680. "content": {
  681. "application/xml": {
  682. "schema": {
  683. "$ref": "#/components/schemas/User"
  684. }
  685. },
  686. "application/json": {
  687. "schema": {
  688. "$ref": "#/components/schemas/User"
  689. }
  690. }
  691. }
  692. },
  693. "400": {
  694. "description": "Invalid username supplied"
  695. },
  696. "404": {
  697. "description": "User not found"
  698. }
  699. }
  700. },
  701. "put": {
  702. "summary": "Updated user",
  703. "description": "This can pnly be done by the logged in user.",
  704. "operationId": "updateUser",
  705. "parameters": [
  706. {
  707. "name": "username",
  708. "in": "path",
  709. "description": "name that to be updated",
  710. "required": true,
  711. "schema": {
  712. "type": "string"
  713. }
  714. }
  715. ],
  716. "requestBody": {
  717. "description": "Updated user object",
  718. "required": true,
  719. "content": {
  720. "application/json": {
  721. "schema": {
  722. "$ref": "#/components/schemas/User"
  723. }
  724. }
  725. }
  726. },
  727. "responses": {
  728. "400": {
  729. "description": "Invalid user supplied"
  730. },
  731. "404": {
  732. "description": "User not found"
  733. }
  734. }
  735. },
  736. "delete": {
  737. "summary": "Delete user",
  738. "description": "This can only be done by the logged in user.",
  739. "operationId": "deleteUser",
  740. "parameters": [
  741. {
  742. "name": "username",
  743. "in": "path",
  744. "description": "The name that needs to be deleted",
  745. "required": true,
  746. "schema": {
  747. "type": "string"
  748. }
  749. }
  750. ],
  751. "responses": {
  752. "400": {
  753. "description": "Invalid username supplied"
  754. },
  755. "404": {
  756. "description": "User not found"
  757. }
  758. }
  759. }
  760. }
  761. },
  762. "components": {
  763. "schemas": {
  764. "ApiResponse": {
  765. "title": "Api response",
  766. "description": "Api response",
  767. "properties": {
  768. "code": {
  769. "title": "Code",
  770. "description": "Code",
  771. "type": "integer",
  772. "format": "int32"
  773. },
  774. "message": {
  775. "title": "Message",
  776. "description": "Message",
  777. "type": "string"
  778. }
  779. },
  780. "type": "object"
  781. },
  782. "Category": {
  783. "title": "Pets Category",
  784. "description": "Pets Category",
  785. "properties": {
  786. "id": {
  787. "title": "ID",
  788. "description": "ID",
  789. "type": "integer",
  790. "format": "int64"
  791. },
  792. "name": {
  793. "title": "Category name",
  794. "description": "Category name",
  795. "type": "string"
  796. }
  797. },
  798. "type": "object",
  799. "xml": {
  800. "name": "Category"
  801. }
  802. },
  803. "Order": {
  804. "title": "Order model",
  805. "description": "Order model",
  806. "properties": {
  807. "id": {
  808. "title": "ID",
  809. "description": "ID",
  810. "type": "integer",
  811. "format": "int64",
  812. "default": 1
  813. },
  814. "petId": {
  815. "title": "Pet ID",
  816. "description": "Pet ID",
  817. "type": "integer",
  818. "format": "int64",
  819. "default": 1
  820. },
  821. "quantity": {
  822. "title": "Quantity",
  823. "description": "Quantity",
  824. "type": "integer",
  825. "format": "in32",
  826. "default": 12
  827. },
  828. "shipDate": {
  829. "title": "Shipping date",
  830. "description": "Shipping date",
  831. "type": "string",
  832. "format": "datetime",
  833. "default": "2017-02-02 18:31:45"
  834. },
  835. "status": {
  836. "title": "Order status",
  837. "description": "Order status",
  838. "type": "string",
  839. "default": "placed",
  840. "enum": [
  841. "placed",
  842. "approved",
  843. "delivered"
  844. ]
  845. },
  846. "complete": {
  847. "title": "Complete status",
  848. "description": "Complete status",
  849. "type": "boolean",
  850. "format": "int64",
  851. "default": "false"
  852. }
  853. },
  854. "type": "object"
  855. },
  856. "Pet": {
  857. "title": "Pet model",
  858. "description": "Pet model",
  859. "required": [
  860. "name",
  861. "photoUrls"
  862. ],
  863. "properties": {
  864. "id": {
  865. "title": "ID",
  866. "description": "ID",
  867. "type": "integer",
  868. "format": "int64"
  869. },
  870. "category": {
  871. "title": "Category",
  872. "description": "Category relation",
  873. "$ref": "#/components/schemas/Category"
  874. },
  875. "name": {
  876. "title": "Pet name",
  877. "description": "Pet name",
  878. "type": "integer",
  879. "format": "int64"
  880. },
  881. "photoUrls": {
  882. "title": "Photo urls",
  883. "description": "Photo urls",
  884. "type": "array",
  885. "items": {
  886. "type": "string",
  887. "default": "images/image-1.png"
  888. },
  889. "xml": {
  890. "name": "photoUrl",
  891. "wrapped": true
  892. }
  893. },
  894. "tags": {
  895. "title": "Pet tags",
  896. "description": "Pet tags",
  897. "type": "array",
  898. "items": {
  899. "$ref": "#/components/schemas/Tag"
  900. },
  901. "xml": {
  902. "name": "tag",
  903. "wrapped": true
  904. }
  905. }
  906. },
  907. "type": "object",
  908. "xml": {
  909. "name": "Pet"
  910. }
  911. },
  912. "Tag": {
  913. "title": "Tag",
  914. "description": "Tag",
  915. "properties": {
  916. "id": {
  917. "title": "ID",
  918. "description": "ID",
  919. "type": "integer",
  920. "format": "int64"
  921. },
  922. "name": {
  923. "title": "Name",
  924. "description": "Name",
  925. "type": "string"
  926. }
  927. },
  928. "type": "object",
  929. "xml": {
  930. "name": "Tag"
  931. }
  932. },
  933. "User": {
  934. "title": "User model",
  935. "description": "User model",
  936. "properties": {
  937. "id": {
  938. "title": "ID",
  939. "description": "ID",
  940. "type": "integer",
  941. "format": "int64"
  942. },
  943. "username": {
  944. "title": "Username",
  945. "description": "Username",
  946. "type": "string"
  947. },
  948. "firstName": {
  949. "title": "First name",
  950. "description": "First name",
  951. "type": "string"
  952. },
  953. "lastName": {
  954. "title": "Last name",
  955. "description": "Last name",
  956. "type": "string"
  957. },
  958. "email": {
  959. "title": "Email",
  960. "description": "Email",
  961. "type": "string",
  962. "format": "email"
  963. },
  964. "password": {
  965. "title": "Password",
  966. "description": "Password",
  967. "type": "string",
  968. "format": "int64",
  969. "maximum": 255
  970. },
  971. "phone": {
  972. "title": "Phone",
  973. "description": "Phone",
  974. "type": "string",
  975. "format": "msisdn"
  976. },
  977. "userStatus": {
  978. "title": "User status",
  979. "description": "User status",
  980. "type": "integer",
  981. "format": "int32"
  982. }
  983. },
  984. "type": "object"
  985. }
  986. },
  987. "requestBodies": {
  988. "Pet": {
  989. "description": "Pet object that needs to be added to the store",
  990. "required": true,
  991. "content": {
  992. "application/xml": {
  993. "schema": {
  994. "$ref": "#/components/schemas/Pet"
  995. }
  996. },
  997. "application/json": {
  998. "schema": {
  999. "$ref": "#/components/schemas/Pet"
  1000. }
  1001. }
  1002. }
  1003. },
  1004. "UserArray": {
  1005. "description": "List of user object",
  1006. "required": true,
  1007. "content": {
  1008. "application/json": {
  1009. "schema": {
  1010. "type": "array",
  1011. "items": {
  1012. "$ref": "#/components/schemas/User"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. }
  1018. },
  1019. "securitySchemes": {
  1020. "petstore_auth": {
  1021. "type": "oauth2",
  1022. "flows": {
  1023. "implicit": {
  1024. "authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
  1025. "scopes": {
  1026. "write:pets": "modify pets in your account",
  1027. "read:pets": "read your pets"
  1028. }
  1029. }
  1030. }
  1031. },
  1032. "api_key": {
  1033. "type": "apiKey",
  1034. "name": "api_key",
  1035. "in": "header"
  1036. }
  1037. }
  1038. },
  1039. "tags": [
  1040. {
  1041. "name": "pet",
  1042. "description": "Everything about your Pets",
  1043. "externalDocs": {
  1044. "description": "Find out more",
  1045. "url": "http://swagger.io"
  1046. }
  1047. },
  1048. {
  1049. "name": "store",
  1050. "description": "Access to Petstore orders"
  1051. },
  1052. {
  1053. "name": "user",
  1054. "description": "Operations about user",
  1055. "externalDocs": {
  1056. "description": "Find out more about store",
  1057. "url": "http://swagger.io"
  1058. }
  1059. }
  1060. ],
  1061. "externalDocs": {
  1062. "description": "Find out more about Swagger",
  1063. "url": "http://swagger.io"
  1064. }
  1065. }