Skip to content

Commit 4adbe20

Browse files
alshundAleksey Shundrik
andauthored
rl-492/openapi-generator OpenapiGenerator: (#14)
* 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: - add DOCS_DEFINITION_FOLDER variable into update-models.sh * rl-492/openapi-generator OpenapiGenerator: - rm {} for DOCS_DEFINITION_FOLDER variable into update-models.sh * 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 38e49d0 commit 4adbe20

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
@@ -1,11 +1,7 @@
11
# Development
22

33
To regenerate models, clone [latest OpenAPI definitions](https://github.com/regulaforensics/DocumentReader-web-openapi)
4-
and set `DEFINITION_FOLDER` as path to cloned directory, for example:
5-
```bash
6-
export DOCS_DEFINITION_FOLDER="/home/user/projects/DocumentReader-web-openapi"
7-
```
8-
Then use next command from the project root:
4+
and use next command from the project root:
95
```bash
106
./update-models.sh
117
```

update-models.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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 python \
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 python \
57
-i /definitions/index.yml -o /client -c /client/generator-config.json \
68
-t /client/generator-templates

0 commit comments

Comments
 (0)