-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
99 lines (99 loc) · 2.47 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
openapi: "3.0.0"
info:
version: 1.0.0
title: Template Swagger Docs
description: This API is used for Template Service
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/LieAlbertTriAdrian/todos-service/template/1.0.0
- url: http://template.swagger.io/v1
paths:
/healthcheck:
get:
tags:
- healthcheck
responses:
'200':
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/Healthcheck'
/todos:
post:
tags:
- todos
operationId: createTodo
summary: 'Create a Todo item'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Todo'
responses:
'200':
description: 'Todo created successfully'
content:
application/json:
schema:
$ref: '#/components/schemas/Todo'
get:
tags:
- todos
operationId: fetchTodos
summary: 'Fetch Todo list items'
parameters:
- name: cursor
in: query
schema:
type: string
description: 'Cursor used for pagination to fetch the next pages'
- name: limit
in: query
schema:
type: integer
description: 'Limit used for to limit the number of item to be fetched'
responses:
'200':
description: 'Todo list fetched successfully'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Todo'
components:
schemas:
Healthcheck:
type: object
properties:
status:
type: string
example: 'OK'
dependencies:
type: array
items:
type: object
properties:
name:
type: string
example: 'postgresql'
status:
type: string
example: 'OK'
Todo:
properties:
id:
type: string
readOnly: true
example: 'abcd-3254fsd-3242'
status:
type: string
example: 'IN-PROGRESS'
text:
type: string
example: 'Feeding the Hamster'
createdAt:
type: string
format: date-time