Compare commits

...

1 commit

Author SHA1 Message Date
8555c8a0f9 Add endpoint for validation 2020-11-05 20:55:22 +01:00

View file

@ -200,6 +200,36 @@ paths:
'404': '404':
$ref: '#/components/responses/NotFound' $ref: '#/components/responses/NotFound'
/validate:
parameters:
- in: header
name: Authentication
schema:
type: string
description: Authentication token
post:
summary: Validate an entity
tags:
- entities
requestBody:
content:
application/json:
schema:
type: object
description: Entity JSON
responses:
'200':
description: Validation result
content:
application/json:
schema:
$ref: '#/components/schemas/validation'
'400':
$ref: '#/components/responses/InvalidInput'
'401':
$ref: '#/components/responses/AuthenticationRequired'
'403':
$ref: '#/components/responses/NotAllowed'
components: components:
schemas: schemas:
health: health:
@ -215,6 +245,20 @@ components:
uptime: uptime:
type: string type: string
example: ISO8601 conforming timespan example: ISO8601 conforming timespan
validation:
type: object
properties:
valid:
type: boolean
findings:
type: array
items:
type: object
properties:
field:
type: string
message:
type: string
responses: responses:
AuthenticationRequired: AuthenticationRequired:
description: Authentication is required (401) description: Authentication is required (401)