Skip to content

Commit 7196cb0

Browse files
Merge pull request #252 from regulaforensics/resolve
Resolve conflicts
2 parents 5d115e5 + 2ad4541 commit 7196cb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4427
-1519
lines changed
File renamed without changes.

.github/workflows/update-clients.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
title:
99
description: "Title For PR's"
1010
required: true
11+
branch:
12+
description: "OpenAPI branch"
13+
required: true
14+
default: "develop"
1115

1216
jobs:
1317
title:
@@ -31,7 +35,7 @@ jobs:
3135
uses: actions/checkout@v4
3236
with:
3337
path: "DocumentReader-web-openapi"
34-
ref: "develop"
38+
ref: ${{ github.event.inputs.branch }}
3539

3640
- name: Checkout JS Client Repo
3741
uses: actions/checkout@v4
@@ -75,7 +79,7 @@ jobs:
7579
uses: actions/checkout@v4
7680
with:
7781
path: "DocumentReader-web-openapi"
78-
ref: "develop"
82+
ref: ${{ github.event.inputs.branch }}
7983

8084
- name: Checkout Java Client Repo
8185
uses: actions/checkout@v4
@@ -111,7 +115,7 @@ jobs:
111115
uses: actions/checkout@v4
112116
with:
113117
path: "DocumentReader-web-openapi"
114-
ref: "develop"
118+
ref: ${{ github.event.inputs.branch }}
115119

116120
- name: Checkout Python Client Repo
117121
uses: actions/checkout@v4
@@ -147,7 +151,7 @@ jobs:
147151
uses: actions/checkout@v4
148152
with:
149153
path: "DocumentReader-web-openapi"
150-
ref: "develop"
154+
ref: ${{ github.event.inputs.branch }}
151155

152156
- name: Checkout C# Client Repo
153157
uses: actions/checkout@v4

.github/workflows/validate-spec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
- name: Setup Node
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 14
20+
node-version: 20
2121
registry-url: https://registry.npmjs.org/
2222

2323
- name: Install redoc
2424
run: |
25-
npm install -g redoc-cli
26-
redoc-cli bundle index.yml
25+
npm install -g @redocly/cli
26+
redocly build-docs index.yml
2727
2828
- name: Revert changes
2929
if: ${{ false }}
3030
run: |
3131
npm install -g @openapitools/openapi-generator-cli
32-
openapi-generator-cli validate -i index.yml
32+
openapi-generator-cli validate --recommend -i index.yml

.github/workflows/verify-clients.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
working-directory: python-client
2727
run: |
2828
./update-models.sh
29+
./setup.sh
2930
3031
verify-csharp:
3132
runs-on: ubuntu-latest
@@ -45,6 +46,7 @@ jobs:
4546
working-directory: csharp-client
4647
run: |
4748
./update-models.sh
49+
./setup.sh
4850
4951
verify-js:
5052
runs-on: ubuntu-latest
@@ -63,9 +65,8 @@ jobs:
6365
- name: Verify update JS client
6466
working-directory: js-client
6567
run: |
66-
npm install
6768
./update-models.sh
68-
npm run check-types
69+
./setup.sh
6970
7071
verify-java:
7172
runs-on: ubuntu-latest

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,31 @@
2323
* **rt - \*.yml** - files describing results types
2424
* **p - \*.yml** - files describing endpoints
2525

26-
2726
## Updating clients according to the current spec
2827

29-
To update clients, use `update clients` GitHub action. Specify title PR and press run. For each client **PR** with changes will be created.
30-
31-
:warning: NOTE: Static typed clients, such as Java or C#, require adding all new **enums** to `update-models.sh` ENUM_MAPPINGS section.
28+
When changes are added, the `update clients` action is automatically triggered. For each client **PR** with changes will be created.
3229

33-
:warning: NOTE: For some clients generator produces not-valid client code. See `update-models.sh` for ad-hocks fixing generator issues.
30+
:warning: NOTE: Before working with a client, read `dev.md` which is available in each client repository.
3431

35-
:warning: NOTE: Do **not edit** generated code. Create wrappers, decorators, etc in ext folder.
32+
:warning: NOTE: Do **not edit** generated code. Create wrappers, decorators, etc. in ext folder.
3633

37-
:bulb: All clients have RawResultItem container that is used for deserialization for undescribed types. This container is a simple map/dict.
34+
:bulb: All clients have RawResultItem and AuthenticityCheckResultItem containers that are used for deserialization oneOf schemas. These containers are a simple map/dict.
3835

3936

4037
## Spec validation
41-
```
42-
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli validate --recommend -i /local/index.yml
38+
39+
```bash
40+
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli validate --recommend -i /local/index.yml
4341
```
4442

4543
## Building Redoc single page html documentation
4644

47-
Edit **rt.yml** - remove **components.schemas.ResultItem.discriminator** node
48-
49-
Edit **rt-authenticity.yml** - remove **components.schemas.AuthenticityCheckResultItem.discriminator**
50-
51-
Then run next command:
52-
```
45+
```bash
5346
npx @redocly/cli build-docs index.yml -o=document-reader-static-doc.html
5447
```
5548

5649
## Bundle scheme to single .json file
50+
5751
```bash
58-
npx openapi-generator-cli generate -i index.yml -g openapi --skip-validate-spec
52+
npx @openapitools/openapi-generator-cli generate -i index.yml -g openapi --skip-validate-spec
5953
```

authenticity/e-check-diagnose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
openapi: 3.0.3
1+
openapi: 3.0.4
22
components:
33
schemas:
44
CheckDiagnose:
5+
title: "CheckDiagnose"
56
type: integer
67
description: "Enumeration contains identifiers which determinate the single document element authenticity check outcome reason: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/check-diagnose/"
78
enum:

authenticity/e-critical.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
openapi: 3.0.3
1+
openapi: 3.0.4
22
components:
33
schemas:
44
Critical:
5+
title: "Critical"
56
type: integer
67
description: "Enumeration contains identifiers determining the criticality of the security element"
78
enum:

authenticity/e-result-type.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
openapi: 3.0.3
1+
openapi: 3.0.4
22
components:
33
schemas:
44
AuthenticityResultType:
5+
title: "AuthenticityResultType"
56
type: integer
7+
format: int64
68
description: "Enumeration describes available authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/."
79
enum:
810
- 1

authenticity/e-visibility.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
openapi: 3.0.3
1+
openapi: 3.0.4
22
components:
33
schemas:
44
Visibility:
5+
title: "Visibility"
56
type: integer
67
description: "Enumeration contains visibility status of the security element"
78
enum:

authenticity/rt-fiber.yml

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
1-
openapi: 3.0.3
1+
openapi: 3.0.4
22
components:
33
schemas:
4-
5-
FiberResult:
6-
title: "Fibers Check"
7-
allOf:
8-
- $ref: "../rt-authenticity.yml#/components/schemas/AuthenticityCheckResultItem"
9-
- type: object
10-
properties:
11-
RectCount:
12-
description: "For UV_Fibers authenticity result type"
13-
type: integer
14-
ExpectedCount:
15-
description: "Expected fibers number. For UV_Fibers authentication result type"
16-
type: integer
17-
LightValue:
18-
description: "For UV_Background authentication result type"
19-
$ref: "../common.yml#/components/schemas/Light"
20-
LightDisp:
21-
description: "For UV_Background authentication result type"
22-
type: integer
23-
RectArray:
24-
description: "Coordinates of located areas for defined fibers type"
25-
type: array
26-
items:
27-
$ref: "../common.yml#/components/schemas/RectangleCoordinates"
28-
Width:
29-
description: "Fibers width value for located areas (in pixels)"
30-
type: array
31-
items:
32-
type: integer
33-
Length:
34-
description: "Fibers length value for located areas (in pixels)"
35-
type: array
36-
items:
37-
type: integer
38-
Area:
39-
description: "Fibers value for areas (in pixels)"
40-
type: array
41-
items:
42-
type: integer
43-
ColorValues:
44-
description: "Fibers color value"
45-
example: [BLUE, GREEN, RED]
46-
type: array
47-
items:
48-
type: integer
4+
FiberItem:
5+
title: "FiberItem"
6+
type: object
7+
required:
8+
- RectCount
9+
- ExpectedCount
10+
- RectArray
11+
- Width
12+
- Length
13+
- Area
14+
- ColorValues
15+
properties:
16+
RectCount:
17+
description: "For UV_Fibers authenticity result type"
18+
type: integer
19+
ExpectedCount:
20+
description: "Expected fibers number. For UV_Fibers authentication result type"
21+
type: integer
22+
LightValue: # For UV_Background authentication result type
23+
$ref: "../common.yml#/components/schemas/Light"
24+
LightDisp:
25+
description: "For UV_Background authentication result type"
26+
type: integer
27+
RectArray:
28+
description: "Coordinates of located areas for defined fibers type"
29+
type: array
30+
items:
31+
$ref: "../common.yml#/components/schemas/RectangleCoordinates"
32+
Width:
33+
description: "Fibers width value for located areas (in pixels)"
34+
type: array
35+
items:
36+
type: integer
37+
Length:
38+
description: "Fibers length value for located areas (in pixels)"
39+
type: array
40+
items:
41+
type: integer
42+
Area:
43+
description: "Fibers value for areas (in pixels)"
44+
type: array
45+
items:
46+
type: integer
47+
ColorValues:
48+
description: "Fibers color value"
49+
example: [BLUE, GREEN, RED]
50+
type: array
51+
items:
52+
type: integer

0 commit comments

Comments
 (0)