OpenAPITools / OpenAPITools/openapi-generator
[REQ] Adding diff-merge capability into openapi-generator-cli generate
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I was using openapi-generator-cli to create server stubs for my openapi 3.0.0 template. Realized that everytime I make a modification to schema and generate the server stubs for nodejs-express-server, I only have an option of
- dry-run - mock run the stub generation and see which files are going to be impacted OR
- override - simply overwrite the newly generated files
I would like to go a step further and trigger a diff-merge while doing generate.
As an alternative, right now, I can create stubs afresh on a new folder and merge from there to the original work-in-progress project folder.
However, Integration with diff/merge tools can be a great time and effort saver for repeated codegens. Most of the times, I go back and forth while creating the API template.
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 with the openapi-generator-cli generate flow and its existing dry-run and override options, using nodejs-express-server as the example generator. Determine how the command reports affected files and define the expected diff-merge behavior and tool integration; done means repeated generation can merge changes into an existing project without simply overwriting files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, java, nodejs, openapi
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100