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

[BUG] - How to generate code for specific tag/path? specifying --globalProperty=apis=user is not working. #706

Open
dinbtechit opened this issue May 23, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dinbtechit
Copy link

🐛 Bug Report:

Describe the bug

How to generate code for specific endpoint? specifying --globalProperty=apis=user is not working.

Steps to Reproduce

  1. Create openapitools.json with globalProperty such that it generates code only for user endpoints
{
  "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,

  "generator-cli": {
    "version": "6.6.0",
    "generators": {
      "petstore": {
        "generatorName": "typescript-nestjs",
        "inputSpec": "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml",
        "output": "src/petstore/codegen",
        "skipValidateSpec": true,
        "globalProperty": {. <---<<<
          "apis": "user"
        },
        "additionalProperties": {
          "modelPropertyNaming": "camelCase",
          "useSingleRequestParameter": true
        }
      }
    }
  }
}
  1. Generate code
 openapi-generator-cli generate --generator-key petstore

output: (you can see the --global-property="apis=user" is created. )

 java -jar "..../.nvm/versions/node/v16.17.0/lib/node_modules/@openapitools/openapi-generator-cli/versions/6.6.0.jar" generate --input-spec="https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml" --generator-name="typescript-nestjs" --output="src/petstore/codegen" --skip-validate-spec --global-property="apis=user" --additional-properties="modelPropertyNaming=camelCase,useSingleRequestParameter=true" exited with code 
  1. no code is generated and no errors

Expected behavior

Update documentation on how to generate code for specific endpoints. Current globalProperties -> apis

Operation System (please complete the following information):

  • OS: MacOS Ventura
  • Version: 13.3.1

Package System (please complete the following information):

  • Version: npm: 2.6.0 | jar: 6.6.0
@dinbtechit dinbtechit added the bug Something isn't working label May 23, 2023
@dinbtechit dinbtechit changed the title [BUG] - How to generate code for specific endpoint? specifying --globalProperty=apis=user is not working. [BUG] - How to generate code for specific tag/path? specifying --globalProperty=apis=user is not working. May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants