openapi-typescript-codegen icon indicating copy to clipboard operation
openapi-typescript-codegen copied to clipboard

Ability to provide custom path to the core directory

Open mbraint opened this issue 4 years ago • 0 comments

Describe the solution you'd like In my case, I want to extract the core once and use it for the newly generated artifacts with --exportCore false are based on different open API specifications

It requires the new cli option e.g. --corePath <value> it may be relative path or npm package variants:

  • external npm package --corePath @my-company/httpClient is based on core from this lib
  • path to dir with ts aliases --corePath shared/httpClient
  • relative path --corePath ../../shared/httpClient

How I want to use that:

  1. extract only core in some app directory e.g. app/shared/httpClient or generate and publish a package with core only functionality
  2. generate new artifacts for userManagement into app/api/userManagement with --corePath ../../shared/httpClient
  3. repeat step 2 for others APIs

mbraint avatar Nov 10 '21 07:11 mbraint