Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating client with multiple files as input #665

Open
uc-asa opened this issue Sep 26, 2022 · 2 comments
Open

Generating client with multiple files as input #665

uc-asa opened this issue Sep 26, 2022 · 2 comments

Comments

@uc-asa
Copy link

uc-asa commented Sep 26, 2022

Multiple file input and input with ref in YAML doesn't support.

@minh-thai
Copy link

minh-thai commented Nov 29, 2022

Hi @uc-asa , I found a solution as follows:
1/ Create openapitools.json with the following configuration

{
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "5.3.0",
    "generators": {
      "publicApi": { // This name is arbitrary string 
        "generatorName": "typescript-angular",
        "glob": "./openapi_spec/publicApi.yaml",
        "output": "./src/app/openapi_codegen/publicApi",
      },
      "privateApi": { // This name is arbitrary string 
        "generatorName": "typescript-angular",
        "glob": "./openapi_spec/privateApi.yaml",
        "output": "./src/app/openapi_codegen/privateApi",
      },
     ... // add configurations for other spec files as expected
    }
  }
}

2/ Run the command: openapi-generator-cli generate --generator-key publicApi privateApi

@bodograumann
Copy link

Turning off useDocker seems to work for us. Unfortunately this brings other problems with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants