-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release swagger documentation and postman collection for version 1.0.0
- Loading branch information
0 parents
commit c1b8c56
Showing
3 changed files
with
431 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Passive Liveness Service | ||
version: 1.0.0 | ||
paths: | ||
/api/v1/health: | ||
get: | ||
summary: Get Health Status | ||
description: Returns the health status of the application | ||
operationId: getResult | ||
responses: | ||
"200": | ||
description: OK response | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
description: Health check response | ||
/api/v1/liveness/passive/evaluation: | ||
post: | ||
tags: | ||
- Liveness | ||
summary: Evaluate passive liveness | ||
operationId: evaluatePassiveLiveness | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/PassiveLivenessEvaluationRequest' | ||
required: true | ||
responses: | ||
"200": | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/PassiveLivenessEvaluationResponse' | ||
"400": | ||
description: |- | ||
Bad request | ||
Possible error codes: | ||
- INVALID_IMAGE | ||
- INVALID_REQUEST_BODY | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
"500": | ||
description: |- | ||
Internal Server Error | ||
Possible error codes: | ||
- UNEXPECTED_ERROR | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
security: | ||
- BearerAuthorization: [] | ||
components: | ||
schemas: | ||
Error: | ||
type: string | ||
enum: | ||
- NO_FACE_DETECTED | ||
ErrorCode: | ||
type: string | ||
enum: | ||
- NOT_FOUND | ||
- INTERNAL_SERVER_ERROR | ||
- UNAUTHORIZED | ||
- METHOD_NOT_ALLOWED | ||
- INVALID_IMAGE | ||
- BAD_REQUEST | ||
ErrorResponse: | ||
required: | ||
- errorCode | ||
- errorMessage | ||
type: object | ||
properties: | ||
errorCode: | ||
allOf: | ||
- $ref: '#/components/schemas/ErrorCode' | ||
- description: Error code | ||
readOnly: true | ||
errorMessage: | ||
type: string | ||
description: Error detailed description. It's only informative. | ||
readOnly: true | ||
description: Error response | ||
readOnly: true | ||
PassiveLivenessEvaluationRequest: | ||
required: | ||
- selfie | ||
type: object | ||
properties: | ||
selfie: | ||
allOf: | ||
- $ref: '#/components/schemas/PassiveLivenessEvaluationRequest.SelfieDTO' | ||
- readOnly: false | ||
writeOnly: true | ||
PassiveLivenessEvaluationRequest.ImageDTO: | ||
required: | ||
- data | ||
type: object | ||
properties: | ||
data: | ||
minItems: 1 | ||
type: string | ||
description: The data bytes as Base64 encoded string. | ||
readOnly: false | ||
writeOnly: true | ||
description: Image provided as Base64 encoded string. | ||
writeOnly: true | ||
PassiveLivenessEvaluationRequest.SelfieDTO: | ||
required: | ||
- image | ||
type: object | ||
properties: | ||
image: | ||
allOf: | ||
- $ref: '#/components/schemas/PassiveLivenessEvaluationRequest.ImageDTO' | ||
- readOnly: false | ||
writeOnly: true | ||
PassiveLivenessEvaluationResponse: | ||
type: object | ||
properties: | ||
score: | ||
maximum: 1 | ||
minimum: 0 | ||
type: number | ||
description: The liveness score. | ||
format: float | ||
readOnly: true | ||
example: 0.8 | ||
errors: | ||
nullable: true | ||
allOf: | ||
- $ref: '#/components/schemas/PassiveLivenessEvaluationResponse.PassiveLivenessErrors' | ||
- readOnly: true | ||
warnings: | ||
nullable: true | ||
allOf: | ||
- $ref: '#/components/schemas/PassiveLivenessEvaluationResponse.PassiveLivenessWarnings' | ||
- readOnly: true | ||
description: Response. | ||
readOnly: true | ||
PassiveLivenessEvaluationResponse.PassiveLivenessErrors: | ||
required: | ||
- selfie | ||
type: object | ||
properties: | ||
selfie: | ||
type: array | ||
description: The error | ||
readOnly: true | ||
items: | ||
$ref: '#/components/schemas/Error' | ||
readOnly: true | ||
PassiveLivenessEvaluationResponse.PassiveLivenessWarnings: | ||
required: | ||
- selfie | ||
type: object | ||
properties: | ||
selfie: | ||
type: array | ||
description: The warnings | ||
readOnly: true | ||
items: | ||
$ref: '#/components/schemas/Warning' | ||
readOnly: true | ||
Warning: | ||
type: string | ||
enum: | ||
- MULTIPLE_FACES_DETECTED | ||
- LOW_QUALITY | ||
securitySchemes: | ||
BearerAuthorization: | ||
type: http | ||
scheme: bearer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Passive Liveness Service API</title> | ||
<!-- needed for adaptive design --> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> | ||
|
||
<!-- | ||
Redoc doesn't change outer page styles | ||
--> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<redoc spec-url='https://raw.githubusercontent.com/innovatrics/dot-passive-liveness-service/master/api/swagger.json'></redoc> | ||
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script> | ||
</body> | ||
</html> |
Oops, something went wrong.