swagger-api / swagger-api/swagger-codegen
Getting reference to all models in supporting mustache file
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hi guys.
I would like to access in my supporting mustache file all models because I need to generate a code that maps those types. So let´s say I have two models, Person and Doctor. I would like to be able to access classname and vendorExtensions for those models in supporting file, in a simple loop. I didn't find any way to do it, is there?
Thank you.
Swagger-codegen version
swagger-codegen-cli-2.3.1
Command line used for generation
java -cp swagger-codegen-cli-2.3.1.jar;extension.swagger.codegen-1.1.0.jar io.swagger.codegen.SwaggerCodegen generate -l extAspnetcore -i yaml.yaml -o test/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names a supporting Mustache template and the swagger-codegen 2.3.1 generation command, but no source file or test. Start by tracing how supporting-file templates receive model data; done when a template can iterate over all models and access each model's classname and vendorExtensions, with coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100