Open HermenOtter opened 6 years ago
This issue explains a workaround, but I wonder if this issue is going to be fixed or that it can't be fixed?
ps. I appreciate the work being done here and the code generation is great.
Doesnt follow external refs for ruby in the online generator either.
I have been searching for a similiar issue, but the proposed solutions didn't solve my problem.
Description
In swaggerhub we have several api definitions. There is one 'domain' api that contains shared definitions and responses, however when this domain is referenced by one of the api's: models for the definitions in the domain are not generated.
I want to know how I can reference a shared api and generate the models, the proper way.
Swagger-codegen version
2.3.0-SNAPSHOT
Swagger declaration file content or url
https://app.swaggerhub.com/apis/Company/JustAnApi/2.0
This is JustAnApi that references the SharedApi
https://api.swaggerhub.com/domains/Company/SharedApi/0.1 Below the response that is used in the JustAnApi.
Response Example A - not working:
The above response references the ErrorModel definition. This approach does not generate the ErrorModel. The example below does work.
Response example B - working response:
However a static ref as seen in example B is something we cannot use in our development cycle(it will cause trouble), do you have any idea how to solve this problem?
Command line used for generation
java -jar swagger-codegen-cli-2.3.0.jar generate -i https://api.swaggerhub.com/apis/Centric/Belastingen_Subjecten/0.2.2_codegen -l typescript-angular -o
Thank you for reading, Hermen