blob: 69a6de8dfd8c9755d453f91e2147656c7106b9ce [file] [log] [blame]
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +02001openapi: 3.0.1
2info:
3 title: OpenAPI definition for SDC Helm validator
4 description: Application for validating Helm charts.
5 version: v0
6servers:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +02007 - url: http://localhost:8080
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +02008 description: Generated server url
9tags:
10 - name: Actuator
11 description: Monitor and interact
12 externalDocs:
13 description: Spring Boot Actuator Web API Documentation
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020014 url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020015paths:
16 /validate:
17 post:
18 tags:
19 - ValidationService
20 summary: Validate chart
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020021 description: Web endpoint for Helm charts validation. Helm chart in .tgz format
22 is required.
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020023 operationId: validate
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020024 requestBody:
25 content:
26 multipart/form-data:
27 schema:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020028 $ref: '#/components/schemas/ValidationRequestParameters'
29 required: true
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020030 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020031 "500":
32 description: Something went wrong during validation execution
33 content:
34 application/json:
35 schema:
36 $ref: '#/components/schemas/ValidationErrorResponse'
37 "200":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020038 description: Helm chart successfully validated
39 content:
40 application/json:
41 schema:
42 $ref: '#/components/schemas/ValidationResult'
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020043 examples:
44 Simple Validation:
45 $ref: '#/components/examples/simpleValidation'
46 Lint Validation:
47 $ref: '#/components/examples/validationWithLint'
48 "400":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020049 description: Chart cannot be validated using selected version
50 content:
51 application/json:
52 schema:
53 $ref: '#/components/schemas/ValidationErrorResponse'
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020054 /versions:
55 get:
56 tags:
57 - VersionsService
58 summary: Show Helm versions
59 description: Web endpoint for showing supported Helm versions.
60 operationId: supportedVersions
61 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020062 "500":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020063 description: Something went wrong during getting Helm versions
64 content:
65 '*/*':
66 schema:
67 $ref: '#/components/schemas/ValidationErrorResponse'
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020068 "200":
69 description: Supported Helm versions successfully returned
70 content:
71 '*/*':
72 schema:
73 $ref: '#/components/schemas/VersionsResponse'
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020074 /actuator:
75 get:
76 tags:
77 - Actuator
78 summary: Actuator root web endpoint
79 operationId: links_0
80 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020081 "200":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020082 description: OK
83 content:
84 '*/*':
85 schema:
86 type: object
87 additionalProperties:
88 type: object
89 additionalProperties:
90 $ref: '#/components/schemas/Link'
91 /actuator/info:
92 get:
93 tags:
94 - Actuator
95 summary: Actuator web endpoint 'info'
96 operationId: handle_1
97 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +020098 "200":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +020099 description: OK
100 content:
101 '*/*':
102 schema:
103 type: object
104 /actuator/health:
105 get:
106 tags:
107 - Actuator
108 summary: Actuator web endpoint 'health'
109 operationId: handle_2
110 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +0200111 "200":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +0200112 description: OK
113 content:
114 '*/*':
115 schema:
116 type: object
117 /actuator/health/**:
118 get:
119 tags:
120 - Actuator
121 summary: Actuator web endpoint 'health-path'
122 operationId: handle_3
123 responses:
Tomasz Wrobel5bda3472021-04-26 11:28:57 +0200124 "200":
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +0200125 description: OK
126 content:
127 '*/*':
128 schema:
129 type: object
130components:
131 schemas:
132 VersionsResponse:
133 properties:
134 versions:
135 type: array
136 items:
137 type: string
Tomasz Wrobel5bda3472021-04-26 11:28:57 +0200138 ValidationRequestParameters:
139 required:
140 - file
141 type: object
142 properties:
143 versionDesired:
144 type: string
145 description: "Desired Helm version which should be used to validate the\
146 \ chart. If parameter is not provided validation is processing with version\
147 \ based on chart's apiVersion. Version could be provided in 'semantic\
148 \ version' or 'major version'.<br> Allowed formats: <br>- Semantic version\
149 \ [X.Y.Z] e.g. 3.5.2 <br>- Major version [vX] e.g. v3"
150 file:
151 type: string
152 format: binary
153 isLinted:
154 type: boolean
155 description: "If true, there will be an attempt to lint chart"
156 isStrictLinted:
157 type: boolean
158 description: Strict linting marks the chart as invalid if detect any warning
Piotr Marcinkiewicz85da74a2021-04-21 15:30:05 +0200159 ValidationErrorResponse:
160 type: object
161 properties:
162 message:
163 type: string
164 ValidationResult:
165 type: object
166 properties:
167 renderErrors:
168 type: array
169 items:
170 type: string
171 lintWarning:
172 type: array
173 items:
174 type: string
175 lintError:
176 type: array
177 items:
178 type: string
179 versionUsed:
180 type: string
181 valid:
182 type: boolean
183 deployable:
184 type: boolean
185 Link:
186 type: object
187 properties:
188 href:
189 type: string
190 templated:
191 type: boolean
Tomasz Wrobel5bda3472021-04-26 11:28:57 +0200192 examples:
193 simpleValidation:
194 description: Example response when parameter isLinted is set to false
195 value: "{\"renderErrors\":[],\"versionUsed\":\"3.5.2\",\"deployable\":true}"
196 validationWithLint:
197 description: Example response when parameter isLinted is set to true
198 value: "{\"renderErrors\":[],\"lintWarning\":[],\"lintError\":[],\"versionUsed\"\
199 :\"3.5.2\",\"valid\":true,\"deployable\":true}"