Skip to content

Commit 6503b20

Browse files
authored
misc: fixing swagger openapi.yaml (#6751)
* resolved application.yaml * resolved application.yaml * resolved applisting.yaml * resolved charts.yaml helm-apps list * resolved jobs.yaml jobs list * removed unrequired server * renamed the x-displayName * resolved app-labels.yaml * resolved merge-conflict * resolved merge-conflict - 02 * added Get Deployment History (ENT) spec
1 parent 9c95a07 commit 6503b20

File tree

6 files changed

+1955
-299
lines changed

6 files changed

+1955
-299
lines changed

specs/app-labels.yaml

Lines changed: 74 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,32 @@ openapi: "3.0.0"
22
info:
33
version: 1.0.0
44
title: Devtron Labs
5+
license:
6+
name: Apache 2.0
7+
url: https://www.apache.org/licenses/LICENSE-2.0.html
8+
servers:
9+
- url: http://localhost/orchestrator
10+
description: Local development server
11+
security:
12+
- ApiKeyAuth: []
513
paths:
614
/orchestrator/app/labels/list:
715
get:
8-
description: this api will return all the labels available in database.
16+
summary: List all app labels
17+
description: This API will return all the labels available in the database.
18+
operationId: listAppLabels
19+
security:
20+
- ApiKeyAuth: []
921
parameters: [ ]
1022
responses:
23+
'400':
24+
description: Bad request
25+
'401':
26+
description: Unauthorized
27+
'404':
28+
description: Not found
29+
'500':
30+
description: Internal server error
1131
'200':
1232
description: list response
1333
content:
@@ -39,7 +59,11 @@ paths:
3959

4060
/orchestrator/app/meta/info/{appId}:
4161
get:
42-
description: application basic info, projects and labels
62+
summary: Get application meta info
63+
description: Application basic info, projects and labels
64+
operationId: getAppMetaInfo
65+
security:
66+
- ApiKeyAuth: []
4367
parameters:
4468
- name: appId
4569
in: path
@@ -65,6 +89,14 @@ paths:
6589
type: object
6690
description: meta info project name and labels
6791
$ref: '#/components/schemas/AppMetaInfo'
92+
'400':
93+
description: Bad request
94+
'401':
95+
description: Unauthorized
96+
'404':
97+
description: Not found
98+
'500':
99+
description: Internal server error
68100
default:
69101
description: unexpected error
70102
content:
@@ -73,7 +105,11 @@ paths:
73105
$ref: '#/components/schemas/ErrorResponse'
74106
/orchestrator/helm/meta/info/{appId}:
75107
get:
76-
description: application info for all types of helm apps
108+
summary: Get Helm application meta info
109+
description: Application info for all types of Helm apps
110+
operationId: getHelmAppMetaInfo
111+
security:
112+
- ApiKeyAuth: []
77113
parameters:
78114
- name: appId
79115
in: path
@@ -98,9 +134,28 @@ paths:
98134
type: object
99135
description: meta info project name and labels
100136
$ref: '#/components/schemas/AppMetaInfo'
137+
'400':
138+
description: Bad request
139+
'401':
140+
description: Unauthorized
141+
'404':
142+
description: Not found
143+
'500':
144+
description: Internal server error
145+
default:
146+
description: unexpected error
147+
content:
148+
application/json:
149+
schema:
150+
$ref: '#/components/schemas/ErrorResponse'
101151

102152
# components mentioned below
103153
components:
154+
securitySchemes:
155+
ApiKeyAuth:
156+
type: apiKey
157+
in: header
158+
name: Authorization
104159
schemas:
105160
AppLabel:
106161
type: object
@@ -167,35 +222,36 @@ components:
167222
description: app created by
168223

169224
ErrorResponse:
170-
required:
171-
- code
172-
- status
225+
type: object
173226
properties:
174227
code:
175228
type: integer
176229
format: int32
177-
description: Error code
178230
status:
179231
type: string
180-
description: Error message
232+
result:
233+
type: object
234+
nullable: true
181235
errors:
182236
type: array
183-
description: errors
184237
items:
185-
$ref: '#/components/schemas/Error'
238+
type: object
239+
properties:
240+
userMessage:
241+
type: string
242+
nullable: true
243+
internalMessage:
244+
type: string
245+
nullable: true
186246

187247
Error:
188248
required:
189249
- code
190-
- status
250+
- message
191251
properties:
192252
code:
193253
type: integer
194-
format: int32
195-
description: Error internal code
196-
internalMessage:
197-
type: string
198-
description: Error internal message
199-
userMessage:
254+
description: Error code
255+
message:
200256
type: string
201-
description: Error user message
257+
description: Error message

specs/application.yaml

Lines changed: 69 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@ openapi: "3.0.0"
22
info:
33
version: 1.0.0
44
title: Devtron Labs
5+
license:
6+
name: Apache 2.0
7+
url: https://www.apache.org/licenses/LICENSE-2.0.html
8+
servers:
9+
- url: https://api.yourdomain.com
10+
description: Production server
11+
security:
12+
- ApiKeyAuth: []
513
paths:
614
/orchestrator/app:
715
post:
16+
summary: Create a new application
17+
operationId: createApplication
818
description: create new application
19+
security:
20+
- ApiKeyAuth: []
921
requestBody:
1022
description: json as request body
1123
required: true
@@ -38,6 +50,12 @@ paths:
3850
required:
3951
- id
4052
- $ref: '#/components/schemas/App'
53+
'400':
54+
description: Bad request
55+
content:
56+
application/json:
57+
schema:
58+
$ref: '#/components/schemas/ErrorResponse'
4159
default:
4260
description: unexpected error
4361
content:
@@ -46,7 +64,11 @@ paths:
4664
$ref: '#/components/schemas/ErrorResponse'
4765
/orchestrator/app/edit:
4866
post:
67+
summary: Update application projects and labels
68+
operationId: updateApplicationProjectsAndLabels
4969
description: update application projects and labels
70+
security:
71+
- ApiKeyAuth: []
5072
requestBody:
5173
description: json as request body
5274
required: true
@@ -79,6 +101,12 @@ paths:
79101
required:
80102
- id
81103
- $ref: '#/components/schemas/App'
104+
'400':
105+
description: Bad request
106+
content:
107+
application/json:
108+
schema:
109+
$ref: '#/components/schemas/ErrorResponse'
82110
default:
83111
description: unexpected error
84112
content:
@@ -88,7 +116,11 @@ paths:
88116

89117
/orchestrator/app/list:
90118
post:
119+
summary: List applications
120+
operationId: listApplications
91121
description: app listing, collection of deployed applications or undeployed or incomplete configured apps.
122+
security:
123+
- ApiKeyAuth: []
92124
requestBody:
93125
description: json as request body
94126
required: true
@@ -129,6 +161,12 @@ paths:
129161
type: object
130162
description: deployment group
131163
$ref: '#/components/schemas/DeploymentGroup'
164+
'400':
165+
description: Bad request
166+
content:
167+
application/json:
168+
schema:
169+
$ref: '#/components/schemas/ErrorResponse'
132170
default:
133171
description: unexpected error
134172
content:
@@ -138,7 +176,11 @@ paths:
138176

139177
/orchestrator/app/edit/projects:
140178
post:
179+
summary: Update project for app
180+
operationId: updateProjectForApp
141181
description: update project for app
182+
security:
183+
- ApiKeyAuth: []
142184
requestBody:
143185
description: json as request body
144186
required: true
@@ -163,7 +205,12 @@ paths:
163205
type: object
164206
description: string
165207
$ref: '#/components/schemas/AppProjectUpdateRequest'
166-
208+
'400':
209+
description: Bad request
210+
content:
211+
application/json:
212+
schema:
213+
$ref: '#/components/schemas/ErrorResponse'
167214
default:
168215
description: unexpected error
169216
content:
@@ -172,6 +219,11 @@ paths:
172219
$ref: '#/components/schemas/ErrorResponse'
173220
# components mentioned below
174221
components:
222+
securitySchemes:
223+
ApiKeyAuth:
224+
type: apiKey
225+
in: header
226+
name: Authorization
175227
schemas:
176228
AppLabel:
177229
type: object
@@ -363,35 +415,36 @@ components:
363415

364416

365417
ErrorResponse:
366-
required:
367-
- code
368-
- status
418+
type: object
369419
properties:
370420
code:
371421
type: integer
372422
format: int32
373-
description: Error code
374423
status:
375424
type: string
376-
description: Error message
425+
result:
426+
type: object
427+
nullable: true
377428
errors:
378429
type: array
379-
description: errors
380430
items:
381-
$ref: '#/components/schemas/Error'
431+
type: object
432+
properties:
433+
userMessage:
434+
type: string
435+
nullable: true
436+
internalMessage:
437+
type: string
438+
nullable: true
382439

383440
Error:
384441
required:
385442
- code
386-
- status
443+
- message
387444
properties:
388445
code:
389446
type: integer
390-
format: int32
391-
description: Error internal code
392-
internalMessage:
393-
type: string
394-
description: Error internal message
395-
userMessage:
447+
description: Error code
448+
message:
396449
type: string
397-
description: Error user message
450+
description: Error message

0 commit comments

Comments
 (0)