From 6ee7a45ba947ec1d3c5a86a05f80b571538577b7 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Mon, 19 Feb 2024 20:37:23 +0100 Subject: [PATCH] Update swagger-codegen to 3.0.54 (see https://github.com/elabftw/elabftw/discussions/3930) --- CHANGELOG.md | 5 +++++ config.json | 2 +- helper.sh | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d252245 --- /dev/null +++ b/CHANGELOG.md @@ -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) diff --git a/config.json b/config.json index 3338a44..ae8ece8 100644 --- a/config.json +++ b/config.json @@ -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" } diff --git a/helper.sh b/helper.sh index 578b972..18c10e8 100755 --- a/helper.sh +++ b/helper.sh @@ -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 @@ -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