Advertisement
Guest User

Untitled

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