Skip to content

Commit 8c38935

Browse files
alshundAleksey Shundrik
andauthored
rl-492/openapi-generator OpenapiGenerator: (#9)
* rl-492/openapi-generator OpenapiGenerator: - add ability to run v5.0.0-beta openapi generator version - add ability to run update-models.sh without DOCS_DEFINITION_FOLDER environment * rl-492/openapi-generator OpenapiGenerator: - change openapi generator tag: v5.0.0-beta -> v5.0.0-beta2 Co-authored-by: Aleksey Shundrik <al.shundrik@insspring.com>
1 parent 7ec38d3 commit 8c38935

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

dev.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ All custom logic, on top of generated files, should be places in `/src/ext` fold
66

77
To regenerate models from openapi definition,
88
clone [latest open api definitions](https://github.com/regulaforensics/DocumentReader-api-openapi)
9-
and set `DEFINITION_FOLDER` as path to cloned directory, for example:
10-
```bash
11-
export DOCS_DEFINITION_FOLDER="/home/user/projects/DocumentReader-api-openapi"
12-
```
13-
Then use next command from the project root:
9+
and use next command from the project root:
1410
```bash
1511
./update-models.sh
1612
```

update-models.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/sh
22

3-
docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "${DOCS_DEFINITION_FOLDER}:/definitions" \
4-
openapitools/openapi-generator-cli generate -g typescript-axios \
3+
DOCS_DEFINITION_FOLDER="${PWD}/../DocumentReader-web-openapi" \
4+
\
5+
&& docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "$DOCS_DEFINITION_FOLDER:/definitions" \
6+
openapitools/openapi-generator-cli:v5.0.0-beta2 generate -g typescript-axios \
57
-i /definitions/index.yml -o /client/src -c /client/ts-generator-config.json \
68
-t /client/generator-templates/ || exit 1
79

0 commit comments

Comments
 (0)