Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.0
- info:
- title: ttt
- version: 1.0.0
- description:
- API for using the GO-powered backend, containing <b>/todos</b> and
- <b>/todos/{id}</b> paths.
- contact:
- email: apiteam@swagger.io
- externalDocs:
- description: Find out more about our API
- url: https://raw.githubusercontent.com/kubeshop/kusk-gateway/main/examples/todomvc/kusk-backend-api.yaml
- x-kusk:
- mocking:
- enabled: true
- paths:
- "/todos/{id}":
- get:
- responses:
- "200":
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: Description of what to do
- completed:
- type: boolean
- order:
- type: integer
- format: int32
- url:
- type: string
- required:
- - title
- - completed
- - order
- - url
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Shows a single Todo
- parameters:
- - name: id
- in: path
- schema:
- type: integer
- required: true
- tags:
- - Todo
- delete:
- responses:
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Deletes this Todo
- parameters:
- - name: id
- in: path
- schema:
- type: integer
- required: true
- tags:
- - Todo
- patch:
- responses:
- "200":
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: Description of what to do
- completed:
- type: boolean
- order:
- type: integer
- format: int32
- url:
- type: string
- required:
- - title
- - completed
- - order
- - url
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Modifies this Todo
- parameters:
- - name: id
- in: path
- schema:
- type: integer
- required: true
- requestBody:
- content:
- application/json:
- schema:
- type: object
- additionalProperties: false
- properties:
- title:
- type: string
- completed:
- type: boolean
- order:
- type: integer
- format: int32
- tags:
- - Todo
- /todos:
- x-kusk:
- hidden: true
- get:
- responses:
- "200":
- description: The full list of todos
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- title:
- type: string
- description: Description of what to do
- completed:
- type: boolean
- order:
- type: integer
- format: int32
- url:
- type: string
- required:
- - title
- - completed
- - order
- - url
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Lists all Todos
- description: The returned Todos are ordered by 'order' and then 'title'
- post:
- responses:
- "201":
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: Description of what to do
- completed:
- type: boolean
- order:
- type: integer
- format: int32
- url:
- type: string
- required:
- - title
- - completed
- - order
- - url
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Creates a new, uncompleted Todo
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: Description of what to do
- order:
- type: integer
- format: int32
- required:
- - title
- tags:
- - Todo
- delete:
- responses:
- "400":
- description: Client error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- "500":
- description: Server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/endpoints.Errors"
- summary: Deletes all Todos
- tags:
- - Todo
- components:
- schemas:
- endpoints.Errors:
- type: array
- items:
- type: string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement