Skip to content

Commit

Permalink
Merge pull request #1454 from nickgros/fix-openapi-generate
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros authored Dec 9, 2024
2 parents 9cb7ad9 + 876aecd commit 9d046a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/synapse-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version-number>`.
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:
Expand Down
3 changes: 1 addition & 2 deletions packages/synapse-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9d046a4

Please sign in to comment.