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

Having modelPrefix in the config file does not generate models. #13

Closed
rajgopalv opened this issue May 22, 2019 · 1 comment
Closed

Comments

@rajgopalv
Copy link

Having a non-empty value for modelPrefix in the configuration omits generating any models at all.

@rajgopalv
Copy link
Author

rajgopalv commented Jun 1, 2019

Hi @luisfpg Thanks for the patch. But, i'm afraid this did not fully fix the issue. It generates certain models and ignores some of them. To reproduce please try this..

  1. Download https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml and store it as petstore.yaml
  2. run ng-openapi-gen -i petstore.yaml -o petstoreClient

Please Note: in the petstoreClient/models you will see 3 models. Good! This is the expected behaviour.

But....
Now to repro the error, use the following conf file

$ cat conf.json 

{
    "module": "MyPetStore",
    "configuration": "MyPetStoreClientConfiguration",
    "servicePrefix": "MyPetStore",
    "serviceIndex": "my-pet-store",
    "modelIndex": "my-pet-store-models",
    "modelPrefix" : "TestPrefix"
}

now try ng-openapi-gen -i petstore.yaml -o petstoreClientWithPrefix -c conf.json
you will see only 1 file in petstoreClient/models

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

1 participant