From bfbb30ef47cae2083db90fb3d3d6efde4d6b6f19 Mon Sep 17 00:00:00 2001 From: Ashutosh Ukey Date: Tue, 10 Jan 2023 09:54:46 -0500 Subject: [PATCH] chore: gen sdk command cleanup (#56) * chore: prettier cmd ignore md files * chore: rm version from gen-sdk command * docs: add detail to codegen command descrip --- .prettierignore | 4 +++- README.md | 4 ++-- build-utils/gen-sdk.sh | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 307968a..627e482 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,6 @@ dist node_modules templates -coverage \ No newline at end of file +coverage + +*.md \ No newline at end of file diff --git a/README.md b/README.md index ddab7a5..d607fe9 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,10 @@ Clone this repo and install dependencies using yarn install ``` -1. Run the codegen: +1. Run the codegen command to generate the source code for this SDK from the `sdk.json` OpenAPI specification file: ```sh - yarn gen-sdk # e.g. yarn gen-sdk 0.1.1-beta.0 + yarn gen-sdk ``` 2. Run all tests: diff --git a/build-utils/gen-sdk.sh b/build-utils/gen-sdk.sh index 85d8370..b8ef6ec 100644 --- a/build-utils/gen-sdk.sh +++ b/build-utils/gen-sdk.sh @@ -4,7 +4,7 @@ npx openapi-generator-cli generate -g typescript-axios \ -i sdk.json \ -o ./src/generated/ \ -p npmName=circle,supportsES6=true,modelPropertyNaming=original,apiPackage=apis,modelPackage=models \ --t ./templates/typescript-axios --additional-properties=npmVersion=$1,withSeparateModelsAndApi=true +-t ./templates/typescript-axios --additional-properties=withSeparateModelsAndApi=true npx ts-node build-utils/mustache-camelize.ts src/generated/index.ts > src/generated/index-temp.ts