diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 32d179445..ace84d7f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -103,6 +103,7 @@ jobs: with: generator: typescript-axios openapi-file: swagger.yml + command-args: -c swagger-codegen.json - name: Update package.json run: python3 .github/workflows/scripts/update-package.py typescript-axios-client/package.json ${{ steps.get_version.outputs.version-without-v }} - name: Publish package diff --git a/.github/workflows/scripts/update-package.py b/.github/workflows/scripts/update-package.py index 24d6ce295..20f3b8add 100644 --- a/.github/workflows/scripts/update-package.py +++ b/.github/workflows/scripts/update-package.py @@ -1,15 +1,12 @@ import json import sys -package_json_path = sys.argv[1] -package_version = sys.argv[2] +package_version = sys.argv[1] -package_json = json.load(open(package_json_path)) +configuration = { + "npmName": "@namada/indexer-client", + "npmVersion": package_version +} -package_json['name'] = "namada-indexer-client" -package_json['version'] = package_version -package_json['description'] = "Set of API to interact with a namada indexer." -package_json['license'] = "GPL-3.0 license" - -with open(package_json_path, 'w', encoding='utf-8') as f: - json.dump(package_json, f, ensure_ascii=False, indent=4) \ No newline at end of file +with open("swagger-codegen.json", 'w', encoding='utf-8') as f: + json.dump(configuration, f, ensure_ascii=False, indent=4) \ No newline at end of file diff --git a/swagger-codegen.json b/swagger-codegen.json deleted file mode 100644 index dfb784369..000000000 --- a/swagger-codegen.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "npmName": "@namada/indexer-client", - "npmVersion": "0.0.30" -} -