File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11generated /
22openapi.yaml
3+ html
Original file line number Diff line number Diff line change 66
77
88# the docker image used to generate the client code
9- docker_image=" swaggerapi/swagger-codegen-cli-v3"
9+ docker_image=" swaggerapi/swagger-codegen-cli-v3:3.0.41 "
1010# where to grab the definition file
1111openapi_yaml_url=" https://raw.githubusercontent.com/elabftw/elabftw/hypernext/apidoc/v2/openapi.yaml"
1212# folder with the generated python code
1313lib=" generated"
14+ html=" html"
1415
1516function cleanup {
1617 rm -rfv " $lib "
18+ rm -rfv " $html "
1719}
1820
1921# generate the lib from remote hypernext spec
@@ -22,6 +24,11 @@ function generate {
2224 docker run --user " $( id -u) " :" $( id -gn) " --rm -v " ${PWD} " :/local " $docker_image " generate -i " $openapi_yaml_url " -l python -o /local/" $lib " -c /local/config.json --git-user-id elabftw --git-repo-id elabapi-python
2325}
2426
27+ function generate-html {
28+ cleanup
29+ docker run --user " $( id -u) " :" $( id -gn) " --rm -v " ${PWD} " :/local " $docker_image " generate -i " $openapi_yaml_url " -l html2 -o /local/" $html " -c /local/config.json --git-user-id elabftw --git-repo-id elabapi-python
30+ }
31+
2532# don't use user/group ids in GH actions
2633function generate-ci {
2734 docker run --rm -v " ${PWD} " :/local " $docker_image " generate -i " $openapi_yaml_url " -l python -o /local/" $lib " -c /local/config.json --git-user-id elabftw --git-repo-id elabapi-python
You can’t perform that action at this time.
0 commit comments