aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAPI.yaml
diff options
context:
space:
mode:
authorPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>2021-04-21 15:30:05 +0200
committerPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>2021-04-23 09:17:39 +0200
commit85da74a2400f92d26605ce1da5fef2bd8783d654 (patch)
tree6dc50e721356c82cf56ea1f2937adf0966fc98f4 /OpenAPI.yaml
parentcd1fa6fcf91b8f233bd911446aad47fbc6ec70f6 (diff)
Add Swagger and OpenAPI description
Issue-ID: SDC-3185 Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> Change-Id: Ib6371ec21ad8331124efd1fd15d2e82364c10e39
Diffstat (limited to 'OpenAPI.yaml')
-rw-r--r--OpenAPI.yaml191
1 files changed, 191 insertions, 0 deletions
diff --git a/OpenAPI.yaml b/OpenAPI.yaml
new file mode 100644
index 0000000..686d3e6
--- /dev/null
+++ b/OpenAPI.yaml
@@ -0,0 +1,191 @@
+openapi: 3.0.1
+info:
+ title: OpenAPI definition for SDC Helm validator
+ description: Application for validating Helm charts.
+ version: v0
+servers:
+ - url: 'http://localhost:8080'
+ description: Generated server url
+tags:
+ - name: Actuator
+ description: Monitor and interact
+ externalDocs:
+ description: Spring Boot Actuator Web API Documentation
+ url: 'https://docs.spring.io/spring-boot/docs/current/actuator-api/html/'
+paths:
+ /validate:
+ post:
+ tags:
+ - ValidationService
+ summary: Validate chart
+ description: Web endpoint for Helm charts validation.
+ operationId: validate
+ parameters:
+ - name: versionDesired
+ in: query
+ description: Desired Helm version which should be used to validate the chart
+ required: false
+ schema:
+ type: string
+ - name: isLinted
+ in: query
+ description: 'If false, there will be an attempt to render the chart without linting it first'
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: isStrictLinted
+ in: query
+ description: Linting should be strict or not
+ required: false
+ schema:
+ type: boolean
+ default: false
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ type: string
+ description: Helm chart that should be validated (packed in .tgz format)
+ format: binary
+ responses:
+ '200':
+ description: Helm chart successfully validated
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ValidationResult'
+ '400':
+ description: Chart cannot be validated using selected version
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ValidationErrorResponse'
+ '500':
+ description: Something went wrong during validation execution
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ValidationErrorResponse'
+ /versions:
+ get:
+ tags:
+ - VersionsService
+ summary: Show Helm versions
+ description: Web endpoint for showing supported Helm versions.
+ operationId: supportedVersions
+ responses:
+ '200':
+ description: Supported Helm versions successfully returned
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/VersionsResponse'
+ '500':
+ description: Something went wrong during getting Helm versions
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/ValidationErrorResponse'
+ /actuator:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator root web endpoint
+ operationId: links_0
+ responses:
+ '200':
+ description: OK
+ content:
+ '*/*':
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Link'
+ /actuator/info:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'info'
+ operationId: handle_1
+ responses:
+ '200':
+ description: OK
+ content:
+ '*/*':
+ schema:
+ type: object
+ /actuator/health:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'health'
+ operationId: handle_2
+ responses:
+ '200':
+ description: OK
+ content:
+ '*/*':
+ schema:
+ type: object
+ /actuator/health/**:
+ get:
+ tags:
+ - Actuator
+ summary: Actuator web endpoint 'health-path'
+ operationId: handle_3
+ responses:
+ '200':
+ description: OK
+ content:
+ '*/*':
+ schema:
+ type: object
+components:
+ schemas:
+ VersionsResponse:
+ properties:
+ versions:
+ type: array
+ items:
+ type: string
+ ValidationErrorResponse:
+ type: object
+ properties:
+ message:
+ type: string
+ ValidationResult:
+ type: object
+ properties:
+ renderErrors:
+ type: array
+ items:
+ type: string
+ lintWarning:
+ type: array
+ items:
+ type: string
+ lintError:
+ type: array
+ items:
+ type: string
+ versionUsed:
+ type: string
+ valid:
+ type: boolean
+ deployable:
+ type: boolean
+ Link:
+ type: object
+ properties:
+ href:
+ type: string
+ templated:
+ type: boolean