Skip to content

Commit

Permalink
Update swagger-codegen to 3.0.54
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Feb 19, 2024
1 parent 66c7140 commit 6ee7a45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# elabapi-python changelog

## 5.0.2 - February 19th 2024

* Update swagger-codegen to 3.0.54 (see https://github.com/elabftw/elabftw/discussions/3930)
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"packageName": "elabapi_python",
"pythonPackageName": "elabapi_python",
"projectName": "elabapi-python",
"packageVersion": "5.0.1",
"packageVersion": "5.0.2",
"packageUrl": "https://github.com/elabftw/elabapi-python"
}
10 changes: 5 additions & 5 deletions helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@


# the docker image used to generate the client code
# not running latest version because of https://github.com/swagger-api/swagger-codegen/issues/12321
# FIXME update to latest once this issue is fixed
docker_image="swaggerapi/swagger-codegen-cli-v3:3.0.41"
# pinning version to avoid unexpected bugs
# see https://github.com/swagger-api/swagger-codegen/releases for updating version below
docker_image="swaggerapi/swagger-codegen-cli-v3:3.0.54"
# where to grab the definition file
openapi_yaml_url="https://raw.githubusercontent.com/elabftw/elabftw/hypernext/apidoc/v2/openapi.yaml"
# folder with the generated python code
Expand All @@ -23,12 +23,12 @@ function cleanup {
# generate the lib from remote hypernext spec
function generate {
cleanup
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
docker run --user "$(id -u)":"$(id -u)" --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
}

function generate-html {
cleanup
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
docker run --user "$(id -u)":"$(id -u)" --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
}

# don't use user/group ids in GH actions
Expand Down

0 comments on commit 6ee7a45

Please sign in to comment.