There was an error while loading. Please reload this page.
Install the tool
npm install -g @openapitools/openapi-generator-cli
or using yarn
yarn add -g @openapitools/openapi-generator-cli
Merge the spec files using openapi-generator-cli
openapi-generator-cli generate -i <entry point> -g <format> -o <output dir>
so my command is:
openapi-generator-cli generate -i doc\api.yml -g openapi-yaml -o outDir
Generate ts-axios client using swagger editor
yml
Generate client
typescript-axios
Put generated api.ts, base.ts, configuration.ts, index.ts, apis, models in gen/bpClient
api.ts
base.ts
configuration.ts
index.ts
apis
models
gen/bpClient
Change the BASE_PATH in base.ts as follows
export const BASE_PATH = (process.env.REACT_APP_BPARTNERS_API_URL || '').replace(/\/+$/, '');