Platinum2d

Configuration files

Apr 9th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. ----- App.yaml -----
  2.  
  3. runtime: python
  4. env: flex
  5. entrypoint: gunicorn api:app
  6.  
  7. endpoints_api_service:
  8. name: sac-music-catalog-manicardi.appspot.com
  9. rollout_strategy: managed
  10.  
  11. runtime_config:
  12. python_version: 3
  13.  
  14.  
  15.  
  16. ----- openapi.yaml -----
  17. swagger: "2.0"
  18.  
  19. info:
  20. title: "Music Catalog"
  21. description: "An application for the management of a musical catalog"
  22. version: "1.0.0"
  23.  
  24. host: "sac-music-catalog-manicardi.appspot.com"
  25. basePath: "/api/v1"
  26.  
  27. schemes:
  28. - "https"
  29. paths:
  30. /artist/{artist_id}:
  31. parameters:
  32. - name: artist_id
  33. in: path
  34. required: true
  35. description: 'uuid of the artist.'
  36. type: string
  37. format: uuid
  38. post:
  39. description: "Insert a new artist in the catalog."
  40. operationId: "postArtist"
  41. consumes:
  42. - application/json
  43. parameters:
  44. - in: body
  45. name: ArtistInfo
  46. description: "Infos about the artist."
  47. schema:
  48. type: object
  49. properties:
  50. name:
  51. type: string
  52. required: true
  53. responses:
  54. 201:
  55. description: "Success."
  56. 409:
  57. description: "Invalid input data."
  58. get:
  59. description: "Fetch infos of the artist."
  60. operationId: "getArtist"
  61. responses:
  62. 200:
  63. description: "Success."
  64. schema:
  65. $ref: '#/definitions/ArtistInfo'
  66. 404:
  67. description: "The artist does not exists"
  68. /disc/{artist_id}/{disc_id}:
  69. parameters:
  70. - name: artist_id
  71. in: path
  72. required: true
  73. description: 'uuid of the artist.'
  74. type: string
  75. format: uuid
  76. - name: disc_id
  77. in: path
  78. required: true
  79. description: 'uuid of the disc.'
  80. type: string
  81. format: uuid
  82. post:
  83. description: "Insert the disc of the artist."
  84. operationId: "postDisc"
  85. consumes:
  86. - application/json
  87. parameters:
  88. - in: body
  89. name: DiscInfo
  90. description: "Infos of the disc."
  91. schema:
  92. $ref: '#/definitions/DiscInfo'
  93. responses:
  94. 201:
  95. description: "Success."
  96. 400:
  97. description: "Invalid input data."
  98. 409:
  99. description: "The artist does not exists"
  100. get:
  101. description: "Fetch infos of the disc."
  102. operationId: "getDisc"
  103. responses:
  104. 200:
  105. description: "Success."
  106. schema:
  107. $ref: '#/definitions/DiscInfo'
  108. definitions:
  109. ArtistID:
  110. type: string
  111. format: uuid
  112. DiscID:
  113. type: string
  114. format: uuid
  115. Genre:
  116. type: string
  117. enum:
  118. - rock
  119. - pop
  120. - electronic
  121. - dance
  122. Year:
  123. type: integer
  124. format: int32
  125. minimum: 1990
  126. maximum: 2020
  127. ArtistInfo:
  128. type: object
  129. properties:
  130. id:
  131. $ref: '#/definitions/ArtistID'
  132. name:
  133. type: string
  134. example:
  135. id: "b735b474-be1c-4a3c-9316-c39a45192998"
  136. name: "Daft Punk"
  137. DiscInfo:
  138. type: object
  139. properties:
  140. id:
  141. $ref: '#/definitions/DiscID'
  142. name:
  143. type: string
  144. genre:
  145. $ref: '#/definitions/Genre'
  146. year:
  147. $ref: '#/definitions/Year'
  148. example:
  149. name: "Random Access Memories"
  150. genre: electronic
  151. year: 2013
Advertisement
Add Comment
Please, Sign In to add comment