Skip to content

Commit 86f8c45

Browse files
committed
Merge branch 'develop' of github.com:regulaforensics/FaceSDK-web-openapi into 75-master-to-develop-fix-conflicts
2 parents 01e68ed + e0c75e8 commit 86f8c45

11 files changed

Lines changed: 237 additions & 83 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ikliashchou
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Back Merge handler
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- stable
8+
9+
jobs:
10+
pr_master_to_stable:
11+
runs-on: ubuntu-latest
12+
if: github.ref_name == 'master'
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Check if PR exists
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
prs=$(gh pr list \
23+
--repo "$GITHUB_REPOSITORY" \
24+
--json baseRefName,headRefName \
25+
--jq '
26+
map(select(.baseRefName == "stable" and .headRefName == "master"))
27+
| length
28+
')
29+
if ((prs > 0)); then
30+
echo "Pull Request already exists"
31+
echo "SKIP=true" >> $GITHUB_ENV
32+
fi
33+
34+
- name: Check if stable is ahead
35+
run: |
36+
commits=$(git rev-list origin/stable..origin/master --count)
37+
if ((commits == 0)); then
38+
echo "No diffs was found between branches"
39+
echo "SKIP=true" >> $GITHUB_ENV
40+
fi
41+
42+
- name: Create Pull Request
43+
if: env.SKIP != 'true'
44+
run: gh pr create -B stable -H master --title '[GitHub Actions] Merge master -> stable' --label back-merge --body 'Autogenerated Pull Request for `back-merge` triggered by Github Actions'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
pr_stable_to_develop:
49+
runs-on: ubuntu-latest
50+
if: github.ref_name == 'stable'
51+
steps:
52+
- uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
56+
- name: Check if PR exists
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
run: |
60+
prs=$(gh pr list \
61+
--repo "$GITHUB_REPOSITORY" \
62+
--json baseRefName,headRefName \
63+
--jq '
64+
map(select(.baseRefName == "develop" and .headRefName == "stable"))
65+
| length
66+
')
67+
if ((prs > 0)); then
68+
echo "Pull Request already exists"
69+
echo "SKIP=true" >> $GITHUB_ENV
70+
fi
71+
72+
- name: Check if stable is ahead
73+
run: |
74+
commits=$(git rev-list origin/develop..origin/stable --count)
75+
if ((commits == 0)); then
76+
echo "No diffs was found between branches"
77+
echo "SKIP=true" >> $GITHUB_ENV
78+
fi
79+
80+
- name: Create Pull Request
81+
if: env.SKIP != 'true'
82+
run: gh pr create -B develop -H stable --title '[GitHub Actions] Merge stable -> develop' --label back-merge --body 'Autogenerated Pull Request for `back-merge` triggered by Github Actions'
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Make PRs for OpenAPI and client repositories
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
source_branch:
7+
description: "Source branch"
8+
default: "develop"
9+
type: choice
10+
required: true
11+
options:
12+
- develop
13+
- master
14+
- stable
15+
target_branch:
16+
description: "Target branch"
17+
default: "master"
18+
type: choice
19+
required: true
20+
options:
21+
- develop
22+
- master
23+
- stable
24+
25+
jobs:
26+
python-webclient-pr:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Create PR for Python WebClient Repo
30+
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-python-client
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
33+
java-webclient-pr:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Create PR for Java WebClient Repo
37+
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-java-client
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
40+
js-webclient-pr:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Create PR for JS WebClient Repo
44+
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-js-client
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
47+
csharp-webclient-pr:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Create PR for CSharp WebClient Repo
51+
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-csharp-client
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
54+
openapi-pr:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Create PR for OpenAPI Repo
58+
run: gh pr create --base ${{ inputs.target_branch }} --head ${{ inputs.source_branch }} --title '[GitHub Actions] Merge ${{ inputs.source_branch }} -> ${{ inputs.target_branch }}' --label OpenAPI --body 'Autogenerated Pull Request triggered by Github Actions in OpenAPI repository' --repo regulaforensics/FaceSDK-web-openapi
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

detect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ paths:
55
- $ref: './common.yml#/components/parameters/x-request'
66
post:
77
tags:
8-
- matching
8+
- match
99
summary: "detect and check quality"
1010
description: "Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people.
1111

diagnostics.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

healthcheck.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
openapi: 3.0.3
2+
3+
paths:
4+
/healthz:
5+
parameters:
6+
- $ref: "./common.yml#/components/parameters/x-request"
7+
get:
8+
summary: "Server healthcheck"
9+
operationId: healthz
10+
tags:
11+
- healthcheck
12+
responses:
13+
200:
14+
description: "Device info."
15+
content:
16+
application/json:
17+
schema:
18+
$ref: "#/components/schemas/DeviceInfo"
19+
/readyz:
20+
parameters:
21+
- $ref: "./common.yml#/components/parameters/x-request"
22+
get:
23+
summary: "License healthcheck"
24+
operationId: readyz
25+
tags:
26+
- healthcheck
27+
responses:
28+
200:
29+
description: "The license is valid."
30+
400:
31+
description: "The license is not valid."
32+
33+
components:
34+
schemas:
35+
DeviceInfo:
36+
type: object
37+
required: [app, licenseId, licenseSerial, licenseValidUntil, version]
38+
properties:
39+
app:
40+
description: Application name.
41+
type: string
42+
licenseId:
43+
description: Unique license identifier.
44+
type: string
45+
nullable: true
46+
licenseSerial:
47+
description: License serial number.
48+
type: string
49+
nullable: true
50+
licenseValidUntil:
51+
description: License validity date.
52+
type: string
53+
format: date-time
54+
nullable: true
55+
version:
56+
description: Product version.
57+
type: string
58+
nullable: true
59+
example:
60+
app: "Regula Face Recognition Web API"
61+
licenseId: "4D43A2AF-E321-496C-9A4E-5A8F3D26DF0E"
62+
licenseSerial: "OL70786"
63+
licenseValidUntil: "9999-12-31T23:59:59Z"
64+
version: "7.5.297907.1721"

identification.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,9 @@ components:
7474
items:
7575
type: string
7676
format: uuid
77-
ttl:
78-
type: integer
79-
description: "The lifespan of the Person's records, seconds. Optional."
80-
nullable: true
81-
default: null
77+
expireAt:
78+
type: string
79+
description: "Person expiration date."
8280
PersonToUpdateFields:
8381
type: object
8482
description: "Person Request body: name and metadata."
@@ -124,7 +122,7 @@ components:
124122
outputImageParams:
125123
$ref: "./common.yml#/components/schemas/OutputImageParams"
126124
detectAll:
127-
$ref: "./matching.yml#/components/schemas/detectAll"
125+
$ref: "./match.yml#/components/schemas/detectAll"
128126
threshold:
129127
type: number
130128
format: float

index.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,18 @@ info:
2222
* [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android
2323
* [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client
2424
* [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
25-
x-tagGroups:
26-
name: liveness
25+
26+
x-tagGroups:
27+
- name: Core
2728
tags:
28-
- liveness
2929
- match
30+
- person
31+
- group
32+
- search
33+
- liveness 2.0
34+
- name: Requests
35+
tags:
36+
- healthcheck
3037

3138
servers:
3239
- url: http://localhost:41101/
@@ -37,7 +44,7 @@ servers:
3744
# ~1 means '/'
3845
paths:
3946
/api/match:
40-
$ref: './matching.yml#/paths/~1match'
47+
$ref: './match.yml#/paths/~1match'
4148
/api/match_and_search:
4249
$ref: './match_and_search.yml#/paths/~1match_and_search'
4350
/api/detect:
@@ -62,5 +69,7 @@ paths:
6269
$ref: './search.yml#/paths/~1search'
6370
/api/v2/liveness:
6471
$ref: './liveness.yml#/paths/~1v2~1liveness'
65-
/api/readiness:
66-
$ref: './diagnostics.yml#/paths/~1readiness'
72+
/api/healthz:
73+
$ref: "./healthcheck.yml#/paths/~1healthz"
74+
/api/readyz:
75+
$ref: "./healthcheck.yml#/paths/~1readyz"

matching.yml renamed to match.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ paths:
55
- $ref: './common.yml#/components/parameters/x-request'
66
post:
77
tags:
8-
- matching
8+
- match
99
summary: "compare faces (1:1)"
1010
description: "To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It's possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field.
1111

match_and_search.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ paths:
55
- $ref: './common.yml#/components/parameters/x-request'
66
post:
77
tags:
8-
- matching
8+
- match
99
summary: 'match and search (1:1 + 1:N)'
10-
description: "To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, matching is not performed and only search is carried out."
10+
description: "To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, match is not performed and only search is carried out."
1111
operationId: match_and_search
1212
requestBody:
1313
required: true
@@ -42,7 +42,7 @@ components:
4242
content:
4343
$ref: './common.yml#/components/schemas/ImageData'
4444
type:
45-
$ref: './matching.yml#/components/schemas/ImageSource'
45+
$ref: './match.yml#/components/schemas/ImageSource'
4646
groupIds:
4747
type: array
4848
description: "IDs of the groups in which the search is performed."
@@ -59,7 +59,7 @@ components:
5959
type: array
6060
description: "The match and search results."
6161
items:
62-
$ref: './matching.yml#/components/schemas/MatchImageResult'
62+
$ref: './match.yml#/components/schemas/MatchImageResult'
6363
elapsedTime:
6464
type: number
6565
description: "Server processing time, ms. Does not include the time taken to receive the request or deliver the response."
@@ -81,7 +81,7 @@ components:
8181
items:
8282
$ref: '#/components/schemas/FacesResponse'
8383
imageIndex:
84-
$ref: './matching.yml#/components/schemas/MatchImageIndex'
84+
$ref: './match.yml#/components/schemas/MatchImageIndex'
8585
status:
8686
$ref: './common.yml#/components/schemas/FaceSDKResultCode'
8787
PersonWithImages:
@@ -97,7 +97,7 @@ components:
9797

9898
FacesResponse:
9999
allOf:
100-
- $ref: './matching.yml#/components/schemas/DetectionFace'
100+
- $ref: './match.yml#/components/schemas/DetectionFace'
101101
- type: object
102102
properties:
103103
persons:

0 commit comments

Comments
 (0)