Skip to content

Commit 5a8269f

Browse files
41044 - new OpenApi
1 parent 28cdf11 commit 5a8269f

22 files changed

+1066
-813
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Submit a request
4+
url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
5+
about: Submit any requests to Regula Support Team

.github/workflows/make-prs-for-client-repos.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,31 @@ jobs:
3030
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
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
33+
3334
java-webclient-pr:
3435
runs-on: ubuntu-latest
3536
steps:
3637
- name: Create PR for Java WebClient Repo
3738
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
3839
env:
3940
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
41+
4042
js-webclient-pr:
4143
runs-on: ubuntu-latest
4244
steps:
4345
- name: Create PR for JS WebClient Repo
4446
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
4547
env:
4648
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
49+
4750
csharp-webclient-pr:
4851
runs-on: ubuntu-latest
4952
steps:
5053
- name: Create PR for CSharp WebClient Repo
5154
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
5255
env:
5356
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
57+
5458
openapi-pr:
5559
runs-on: ubuntu-latest
5660
steps:

.github/workflows/release-web-page.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,21 @@ jobs:
1010
runs-on: ubuntu-20.04
1111
steps:
1212
- name: Checkout Specifications
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
with:
1515
path: 'master-branch'
1616
- name: Install redoc-cli
17-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v4
1818
with:
19-
node-version: 14
19+
node-version: 20
2020
registry-url: https://registry.npmjs.org/
2121
- name: Build html page
2222
working-directory: master-branch
2323
run: |
24-
npm install -g redoc-cli;
25-
npx redoc-cli build "./index.yml" --output doc.html \
26-
--options.maxDisplayedEnumValues=5 --options.theme.logo.gutter="20px" \
27-
--options.theme.colors.primary.main="#8a53cb" --options.expandResponses="all" \
28-
--options.expandSingleSchemaField --options.hideDownloadButton \
29-
--options.jsonSampleExpandLevel="6";
24+
npm install -g @redocly/cli;
25+
npx @redocly/cli build-docs index.yml -o=doc.html;
3026
- name: Checkout pages branch
31-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
3228
with:
3329
path: 'pages-branch'
3430
ref: 'gh-pages'
Lines changed: 128 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,177 @@
11
name: update clients
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
title:
7-
description: "Title for PR's"
8-
required: true
4+
push:
5+
branches: [develop]
6+
workflow_dispatch:
7+
inputs:
8+
title:
9+
description: "Title For PR's"
10+
required: true
11+
branch:
12+
description: "OpenAPI branch"
13+
required: true
14+
default: "develop"
915

1016
jobs:
17+
title:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
title: ${{ steps.get-title.outputs.fmt_title }}
21+
steps:
22+
- id: get-title
23+
run: |
24+
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
25+
echo "fmt_title=${{ github.event.inputs.title }}" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "fmt_title=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
28+
fi
29+
1130
update-js-client:
31+
needs: title
1232
runs-on: ubuntu-latest
1333
steps:
1434
- name: Checkout Specification Repo
15-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
1636
with:
17-
path: 'FaceSDK-web-openapi'
37+
path: "FaceSDK-web-openapi"
38+
ref: ${{ github.event.inputs.branch }}
39+
1840
- name: Checkout JS Client Repo
19-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
2042
with:
21-
repository: 'regulaforensics/FaceSDK-web-js-client'
43+
repository: "regulaforensics/FaceSDK-web-js-client"
2244
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
23-
path: 'js-client'
45+
path: "js-client"
46+
ref: "develop"
47+
2448
- name: Update Model According To Specification
2549
working-directory: js-client
2650
run: |
2751
npm install
2852
./update-models.sh
53+
2954
- name: Push Changes Back To Client Repo
3055
working-directory: js-client
3156
run: |
3257
git checkout -b ${GITHUB_SHA::8}
3358
git config --local user.email "action@github.com"
3459
git config --local user.name "GitHub Action"
60+
61+
if git diff-index --quiet HEAD --; then
62+
echo "No changes to commit."
63+
exit 0
64+
fi
65+
3566
git add --all
36-
git commit -m "${{ github.event.inputs.title }}" -a
37-
git push --set-upstream origin ${GITHUB_SHA::8}
38-
gh pr create --fill --draft
67+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
68+
69+
if [ $? -eq 0 ]; then
70+
git push --set-upstream origin ${GITHUB_SHA::8}
71+
gh pr create --fill --base develop
72+
else
73+
echo "Nothing to commit."
74+
fi
3975
env:
4076
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
4177

4278
update-java-client:
79+
needs: title
4380
runs-on: ubuntu-latest
4481
steps:
4582
- name: Specify Java Version
46-
uses: actions/setup-java@v1
83+
uses: actions/setup-java@v4
4784
with:
85+
distribution: "zulu"
4886
java-version: 11
4987
java-package: jdk
88+
5089
- name: Checkout Specification Repo
51-
uses: actions/checkout@v2
90+
uses: actions/checkout@v4
5291
with:
53-
path: 'FaceSDK-web-openapi'
92+
path: "FaceSDK-web-openapi"
93+
ref: ${{ github.event.inputs.branch }}
94+
5495
- name: Checkout Java Client Repo
55-
uses: actions/checkout@v2
96+
uses: actions/checkout@v4
5697
with:
57-
repository: 'regulaforensics/FaceSDK-web-java-client'
98+
repository: "regulaforensics/FaceSDK-web-java-client"
5899
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
59-
path: 'java-client'
100+
path: "java-client"
101+
ref: "develop"
102+
60103
- name: Update Model According To Specification
61104
working-directory: java-client
62105
run: |
63106
./update-models.sh
107+
64108
- name: Push Changes Back To Client Repo
65109
working-directory: java-client
66110
run: |
67111
git checkout -b ${GITHUB_SHA::8}
68112
git config --local user.email "action@github.com"
69113
git config --local user.name "GitHub Action"
114+
115+
if git diff-index --quiet HEAD --; then
116+
echo "No changes to commit."
117+
exit 0
118+
fi
119+
70120
git add --all
71-
git commit -m "${{ github.event.inputs.title }}" -a
72-
git push --set-upstream origin ${GITHUB_SHA::8}
73-
gh pr create --fill --draft
121+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
122+
123+
if [ $? -eq 0 ]; then
124+
git push --set-upstream origin ${GITHUB_SHA::8}
125+
gh pr create --fill --base develop
126+
else
127+
echo "Nothing to commit."
128+
fi
74129
env:
75130
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
76131

77132
update-python-client:
78133
runs-on: ubuntu-latest
79134
steps:
80135
- name: Checkout Specification Repo
81-
uses: actions/checkout@v2
136+
uses: actions/checkout@v4
82137
with:
83-
path: 'FaceSDK-web-openapi'
138+
path: "FaceSDK-web-openapi"
139+
ref: ${{ github.event.inputs.branch }}
140+
84141
- name: Checkout Python Client Repo
85-
uses: actions/checkout@v2
142+
uses: actions/checkout@v4
86143
with:
87-
repository: 'regulaforensics/FaceSDK-web-python-client'
144+
repository: "regulaforensics/FaceSDK-web-python-client"
88145
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
89-
path: 'python-client'
146+
path: "python-client"
147+
ref: "develop"
148+
90149
- name: Update Model According To Specification
91150
working-directory: python-client
92151
run: |
93152
./update-models.sh
153+
94154
- name: Push Changes Back To Client Repo
95155
working-directory: python-client
96156
run: |
97157
git checkout -b ${GITHUB_SHA::8}
98158
git config --local user.email "action@github.com"
99159
git config --local user.name "GitHub Action"
160+
161+
if git diff-index --quiet HEAD --; then
162+
echo "No changes to commit."
163+
exit 0
164+
fi
165+
100166
git add --all
101-
git commit -m "${{ github.event.inputs.title }}" -a
102-
git push --set-upstream origin ${GITHUB_SHA::8}
103-
gh pr create --fill --draft
167+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
168+
169+
if [ $? -eq 0 ]; then
170+
git push --set-upstream origin ${GITHUB_SHA::8}
171+
gh pr create --fill --base develop
172+
else
173+
echo "Nothing to commit."
174+
fi
104175
env:
105176
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
106177

@@ -110,31 +181,47 @@ jobs:
110181
- name: Specify Dotnet Version
111182
uses: actions/setup-dotnet@v1
112183
with:
113-
dotnet-version: '3.1.x'
184+
dotnet-version: "3.1.x"
185+
114186
- name: Checkout Specification Repo
115-
uses: actions/checkout@v2
187+
uses: actions/checkout@v4
116188
with:
117-
path: 'FaceSDK-web-openapi'
118-
- name: Checkout CSharp Client Repo
119-
uses: actions/checkout@v2
189+
path: "FaceSDK-web-openapi"
190+
ref: ${{ github.event.inputs.branch }}
191+
192+
- name: Checkout C# Client Repo
193+
uses: actions/checkout@v4
120194
with:
121-
repository: 'regulaforensics/FaceSDK-web-csharp-client'
195+
repository: "regulaforensics/FaceSDK-web-csharp-client"
122196
token: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
123-
path: 'csharp-client'
197+
path: "csharp-client"
198+
ref: "develop"
199+
124200
- name: Update Model According To Specification
125201
working-directory: csharp-client
126202
run: |
127203
./update-models.sh
204+
128205
- name: Push Changes Back To Client Repo
129206
working-directory: csharp-client
130207
run: |
131208
git checkout -b ${GITHUB_SHA::8}
132209
git config --local user.email "action@github.com"
133210
git config --local user.name "GitHub Action"
134-
git checkout src/Regula.FaceSDK.WebClient/Api/SearchApi.cs
211+
212+
if git diff-index --quiet HEAD --; then
213+
echo "No changes to commit."
214+
exit 0
215+
fi
216+
135217
git add --all
136-
git commit -m "${{ github.event.inputs.title }}" -a
137-
git push --set-upstream origin ${GITHUB_SHA::8}
138-
gh pr create --fill --draft
218+
git commit -m "Commit: ${{ needs.title.outputs.title }}" -a
219+
220+
if [ $? -eq 0 ]; then
221+
git push --set-upstream origin ${GITHUB_SHA::8}
222+
gh pr create --fill --base develop
223+
else
224+
echo "Nothing to commit."
225+
fi
139226
env:
140227
GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}

.github/workflows/validate-spec.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,29 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- develop
8+
- stable
79

810
jobs:
911
validate-specification:
1012
runs-on: ubuntu-latest
1113
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v4
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
1419
with:
1520
node-version: 20
1621
registry-url: https://registry.npmjs.org/
17-
- run: |
18-
npm install -g redoc-cli
19-
npx @redocly/cli build-docs index.yml
20-
- run: |
22+
23+
- name: Install redoc
24+
run: |
25+
npm install -g @redocly/cli
26+
redocly build-docs index.yml
27+
28+
- name: Revert changes
29+
if: ${{ false }}
30+
run: |
2131
npm install -g @openapitools/openapi-generator-cli
22-
openapi-generator-cli validate -i index.yml
32+
openapi-generator-cli validate --recommend -i index.yml

0 commit comments

Comments
 (0)