From 876aecdc8cd642b2d05f49093ceee51b45ea7473 Mon Sep 17 00:00:00 2001 From: Nick Grosenbacher Date: Mon, 9 Dec 2024 13:38:18 -0500 Subject: [PATCH] Remove openapi-generator version configuration step Fetching the list of versions queries search.maven.org, which can experience downtime. This request is unnecessary to run unless changing the version of the generator tool. --- packages/synapse-client/README.md | 2 +- packages/synapse-client/package.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/synapse-client/README.md b/packages/synapse-client/README.md index ae97a06dfa..6ed03748a6 100644 --- a/packages/synapse-client/README.md +++ b/packages/synapse-client/README.md @@ -19,7 +19,7 @@ Once you have new models built, tests and type-checking on the full project shou ## Upgrading the openapi-generator version and overriding templates -The current version of openapi-generator can be set by changing the version number set in the `pnpm configure` script. +The current version of openapi-generator can be set by running `openapi-generator-cli version-manager set `. When the version is changed, our template overrides should be updated. To copy all the base template files into the `./out` directory, run the following command: diff --git a/packages/synapse-client/package.json b/packages/synapse-client/package.json index 0cf4d6d21f..cbc2e765f9 100644 --- a/packages/synapse-client/package.json +++ b/packages/synapse-client/package.json @@ -37,8 +37,7 @@ "get-spec:staging": "npx tsx src/codegen/downloadSpec.ts --stack staging && pnpm format-spec", "get-spec:production": "npx tsx src/codegen/downloadSpec.ts --stack production && pnpm format-spec", "get-spec": "pnpm get-spec:production", - "configure": "openapi-generator-cli version-manager set 7.8.0", - "generate": "MODEL_NAME_MAPPINGS=$(npx tsx src/codegen/generateModelNameMappings.ts); pnpm configure && rimraf src/generated && openapi-generator-cli generate -i src/spec/openapispecification.json -c config.json -o src/generated -t out/ --model-name-mappings $MODEL_NAME_MAPPINGS", + "generate": "MODEL_NAME_MAPPINGS=$(npx tsx src/codegen/generateModelNameMappings.ts); rimraf src/generated && openapi-generator-cli generate -i src/spec/openapispecification.json -c config.json -o src/generated -t out/ --model-name-mappings $MODEL_NAME_MAPPINGS", "build": "pnpm tsc --build", "test": "vitest", "lint": "eslint src"