Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ servers:
- url: http://localhost:8080/
description: Local on-premise installation


paths:
/api/process:
$ref: "./p-process.yml#/paths/~1process"
Expand All @@ -40,6 +39,10 @@ paths:
$ref: "./p-transaction.yml#/paths/~1tag~1{tagId}~1transactions"
/api/ping:
$ref: "./p-ping.yml#/paths/~1ping"
/api/healthz:
$ref: "./p-healthcheck.yml#/paths/~1healthz"
/api/readyz:
$ref: "./p-healthcheck.yml#/paths/~1readyz"

tags:
- name: process
Expand Down Expand Up @@ -77,6 +80,7 @@ x-tagGroups:
tags:
- process
- transaction
- healthcheck
- name: Models
tags:
- status_model
Expand Down
62 changes: 62 additions & 0 deletions p-healthcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
openapi: 3.0.3

paths:
/healthz:
parameters:
- $ref: "./common.yml#/components/parameters/x-request"
get:
summary: "Server healthcheck"
operationId: healthz
tags:
- healthcheck
responses:
200:
description: "Device info"
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceInfo"
/readyz:
parameters:
- $ref: "./common.yml#/components/parameters/x-request"
get:
summary: "License healthcheck"
operationId: readyz
tags:
- healthcheck
responses:
200:
description: "License is valid"
400:
description: "License is not valid"

components:
schemas:
DeviceInfo:
type: object
properties:
app:
type: string
licenseId:
type: string
licenseType:
type: string
licenseSerial:
type: string
licenseValidUntil:
type: string
format: date-time
scenarios:
type: array
items:
type: string
version:
type: string
example:
app: "Regula Document Reader Web API"
licenseId: "4D43A2AF-E321-496C-9A4E-5A8F3D26DF0E"
licenseType: "Transactional"
licenseSerial: "OL70786"
licenseValidUntil: "9999-12-31T23:59:59Z"
scenarios: ["Mrz", "Barcode", "Locate"]
version: "7.5.297907.1721"
5 changes: 4 additions & 1 deletion p-ping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ paths:
parameters:
- $ref: "./common.yml#/components/parameters/x-request"
get:
deprecated: true
summary: "Server health check"
operationId: ping
tags:
- healthcheck
responses:
200:
description: "Device info"
Expand Down Expand Up @@ -40,4 +43,4 @@ components:
license-id: "4d43a2af-e321-496c-9a4e-5a8f3d26df0e"
license-serial: "OL70786"
valid-until: "9999-12-31T23:59:59Z"
server-time: "2020-10-16 09:42:08.080713+00:00"
server-time: "2020-10-16 09:42:08.080713+00:00"