-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
100 lines (100 loc) · 2.5 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
100
---
openapi: 3.0.2
info:
title: GYG OpenAPI validator example
version: 1.0.0
paths:
"/":
get:
description: Get index
operationId: getIndex
parameters:
- description: From date
example: '2022-12-24'
in: query
name: fromDate
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
"$ref": "#/components/schemas/IndexResponse"
'400':
description: Bad request response
content:
application/json:
schema:
"$ref": "#/components/schemas/BadRequestResponse"
'500':
description: Internal server error
post:
description: Update index
operationId: postIndex
requestBody:
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/IndexRequest"
responses:
'200':
description: The resource was update successfully
content:
application/json:
schema:
"$ref": "#/components/schemas/IndexResponse"
'400':
description: Bad request response
content:
application/json:
schema:
"$ref": "#/components/schemas/BadRequestResponse"
'500':
description: Internal server error
delete:
description: Delete index
operationId: deleteIndex
responses:
'204':
description: The resource was deleted successfully
'500':
description: Internal server error
components:
schemas:
IndexRequest:
description: Index request
type: object
properties:
name:
description: Name
example: some name
nullable: false
type: string
required:
- name
IndexResponse:
description: Index response
type: object
properties:
name:
description: Name
example: some name
nullable: false
type: string
required:
- name
BadRequestResponse:
description: Bad request response
type: object
properties:
error:
description: Description of the error
example: Missing query parameter fromDate
nullable: false
type: string
required:
- error