-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi3.yaml
171 lines (165 loc) · 3.88 KB
/
openapi3.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
openapi: "3.0.0"
info:
version: 1.0.0
title: actix-web demo
description: actix-web server and client demo
termsOfService: http://example.com/terms/
contact:
name: Richard Gomes
email: [email protected]
url: http://example.com
license:
name: Proprietary
servers:
- url: http://127.0.0.1/api
security:
- bearer: []
- cookie: []
paths:
/table/update:
post:
summary: Request for updating one or more records.
operationId: table_update
security:
- bearer: []
- cookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TableUpdateRequest'
responses:
'200':
description: OK.
content:
application/json:
schema:
$ref: '#/components/schemas/TableUpdateResponse'
default:
description: "Error response"
content:
application/json:
schema:
$ref: '#/components/schemas/TableUpdateResponse'
# See: https://swagger.io/docs/specification/authentication/
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
cookieAuth:
type: apiKey
in: cookie
name: JSESSIONID
schemas:
Error:
description: Contains an error code and its description.
type: object
required:
- code
- message
properties:
code:
description: error code
type: integer
format: int32
message:
description: error message
type: string
Version:
description: Semantic versioning information (MAJOR.MINOR.PATCH).
type: string
minimum: 5
maximum: 20
example: "1.0.0"
DataTable:
description: Data table.
type: object
properties:
name:
description: Table name.
type: string
cells:
description: List of cells.
type: array
minItems: 0
items:
$ref: '#/components/schemas/DataCell'
required:
- name
- cells
DataCell:
description: Data cell.
type: object
properties:
coord:
$ref: '#/components/schemas/Coord'
value:
description: value represented as string.
type: string
required:
- coord
- value
ErrorTable:
description: Error table.
type: object
properties:
name:
description: Table name.
type: string
cells:
description: List of cells.
type: array
minItems: 0
items:
$ref: '#/components/schemas/ErrorCell'
required:
- name
- cells
ErrorCell:
description: Error cell.
type: object
properties:
coord:
$ref: '#/components/schemas/Coord'
error:
$ref: '#/components/schemas/Error'
required:
- coord
- error
Coord:
description: Coordinates
type: object
properties:
row:
description: row number
type: integer
col:
description: column number
type: integer
required:
- row
- col
TableUpdateRequest:
description: Request for updating a table.
type: object
properties:
version:
$ref: '#/components/schemas/Version'
table:
$ref: '#/components/schemas/DataTable'
required:
- version
- table
TableUpdateResponse:
description: Response for a TableUpdateRequest.
type: object
properties:
version:
$ref: '#/components/schemas/Version'
table:
$ref: '#/components/schemas/ErrorTable'
required:
- version
- table