OpenAPITools / OpenAPITools/openapi-generator
[REQ] Per Operation Templates
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I am trying make an oclif CLI generator. It requires that each operation be in its own file; however, from what I can tell, openapi-generator wants to group operations by tag into APIs all in one file. I see the supporting files get all the operations, but it still doesn't seem like a file can be created for each operation.
Describe the solution you'd like
I'd like to have something like this (similar to apis and models):
operationTemplateFiles.put("operation.mustache", ".zz");
where there's a template file for an operation and it gets called for each operation.
I would also be more than happy to hear simpler solutions to this without requiring changing the framework like this. Any pointers would be appreciated.
Describe alternatives you've considered
I've also reached out to the oclif team to see if it's possible to have more than one operation per file.
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
Start by tracing the generator's existing API and model template handling, then inspect the operationTemplateFiles configuration described in the issue. Confirm how templates are selected for grouped operations; done means an operation template can be invoked once per operation and produce separate files for generators that need them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100