Advertisement
Guest User

Untitled

a guest
Oct 19th, 2022
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.14 KB | None | 0 0
  1. openapi: 3.0.0
  2. info:
  3. title: ttt
  4. version: 1.0.0
  5. description:
  6. API for using the GO-powered backend, containing <b>/todos</b> and
  7. <b>/todos/{id}</b> paths.
  8. contact:
  9. email: apiteam@swagger.io
  10. externalDocs:
  11. description: Find out more about our API
  12. url: https://raw.githubusercontent.com/kubeshop/kusk-gateway/main/examples/todomvc/kusk-backend-api.yaml
  13. x-kusk:
  14. mocking:
  15. enabled: true
  16. paths:
  17. "/todos/{id}":
  18. get:
  19. responses:
  20. "200":
  21. content:
  22. application/json:
  23. schema:
  24. type: object
  25. properties:
  26. title:
  27. type: string
  28. description: Description of what to do
  29. completed:
  30. type: boolean
  31. order:
  32. type: integer
  33. format: int32
  34. url:
  35. type: string
  36. required:
  37. - title
  38. - completed
  39. - order
  40. - url
  41. "400":
  42. description: Client error
  43. content:
  44. application/json:
  45. schema:
  46. $ref: "#/components/schemas/endpoints.Errors"
  47. "500":
  48. description: Server error
  49. content:
  50. application/json:
  51. schema:
  52. $ref: "#/components/schemas/endpoints.Errors"
  53. summary: Shows a single Todo
  54. parameters:
  55. - name: id
  56. in: path
  57. schema:
  58. type: integer
  59. required: true
  60. tags:
  61. - Todo
  62. delete:
  63. responses:
  64. "400":
  65. description: Client error
  66. content:
  67. application/json:
  68. schema:
  69. $ref: "#/components/schemas/endpoints.Errors"
  70. "500":
  71. description: Server error
  72. content:
  73. application/json:
  74. schema:
  75. $ref: "#/components/schemas/endpoints.Errors"
  76. summary: Deletes this Todo
  77. parameters:
  78. - name: id
  79. in: path
  80. schema:
  81. type: integer
  82. required: true
  83. tags:
  84. - Todo
  85. patch:
  86. responses:
  87. "200":
  88. content:
  89. application/json:
  90. schema:
  91. type: object
  92. properties:
  93. title:
  94. type: string
  95. description: Description of what to do
  96. completed:
  97. type: boolean
  98. order:
  99. type: integer
  100. format: int32
  101. url:
  102. type: string
  103. required:
  104. - title
  105. - completed
  106. - order
  107. - url
  108. "400":
  109. description: Client error
  110. content:
  111. application/json:
  112. schema:
  113. $ref: "#/components/schemas/endpoints.Errors"
  114. "500":
  115. description: Server error
  116. content:
  117. application/json:
  118. schema:
  119. $ref: "#/components/schemas/endpoints.Errors"
  120. summary: Modifies this Todo
  121. parameters:
  122. - name: id
  123. in: path
  124. schema:
  125. type: integer
  126. required: true
  127. requestBody:
  128. content:
  129. application/json:
  130. schema:
  131. type: object
  132. additionalProperties: false
  133. properties:
  134. title:
  135. type: string
  136. completed:
  137. type: boolean
  138. order:
  139. type: integer
  140. format: int32
  141. tags:
  142. - Todo
  143. /todos:
  144. x-kusk:
  145. hidden: true
  146. get:
  147. responses:
  148. "200":
  149. description: The full list of todos
  150. content:
  151. application/json:
  152. schema:
  153. type: array
  154. items:
  155. type: object
  156. properties:
  157. title:
  158. type: string
  159. description: Description of what to do
  160. completed:
  161. type: boolean
  162. order:
  163. type: integer
  164. format: int32
  165. url:
  166. type: string
  167. required:
  168. - title
  169. - completed
  170. - order
  171. - url
  172. "400":
  173. description: Client error
  174. content:
  175. application/json:
  176. schema:
  177. $ref: "#/components/schemas/endpoints.Errors"
  178. "500":
  179. description: Server error
  180. content:
  181. application/json:
  182. schema:
  183. $ref: "#/components/schemas/endpoints.Errors"
  184. summary: Lists all Todos
  185. description: The returned Todos are ordered by 'order' and then 'title'
  186. post:
  187. responses:
  188. "201":
  189. content:
  190. application/json:
  191. schema:
  192. type: object
  193. properties:
  194. title:
  195. type: string
  196. description: Description of what to do
  197. completed:
  198. type: boolean
  199. order:
  200. type: integer
  201. format: int32
  202. url:
  203. type: string
  204. required:
  205. - title
  206. - completed
  207. - order
  208. - url
  209. "400":
  210. description: Client error
  211. content:
  212. application/json:
  213. schema:
  214. $ref: "#/components/schemas/endpoints.Errors"
  215. "500":
  216. description: Server error
  217. content:
  218. application/json:
  219. schema:
  220. $ref: "#/components/schemas/endpoints.Errors"
  221. summary: Creates a new, uncompleted Todo
  222. requestBody:
  223. content:
  224. application/json:
  225. schema:
  226. type: object
  227. properties:
  228. title:
  229. type: string
  230. description: Description of what to do
  231. order:
  232. type: integer
  233. format: int32
  234. required:
  235. - title
  236. tags:
  237. - Todo
  238. delete:
  239. responses:
  240. "400":
  241. description: Client error
  242. content:
  243. application/json:
  244. schema:
  245. $ref: "#/components/schemas/endpoints.Errors"
  246. "500":
  247. description: Server error
  248. content:
  249. application/json:
  250. schema:
  251. $ref: "#/components/schemas/endpoints.Errors"
  252. summary: Deletes all Todos
  253. tags:
  254. - Todo
  255. components:
  256. schemas:
  257. endpoints.Errors:
  258. type: array
  259. items:
  260. type: string
  261.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement