Open arciisine opened 5 years ago
I have a working PR in a fork if that helps the conversation. https://github.com/arciisine/openapi-generator/pull/1/files
@wing328 is this a feature that's possible to get merged in? It looks like @arciisine has a workable solution but it's a bunch of years ago so likely may need a different solution these days?
I'm still actively using it, and have to rebuild/republish some docker images every so often to pick up the latest client generators. I was actually considering dropping support for this generator in my framework due to this not getting landed after so long.
I'm going to update the PR against the latest in case this may get landed.
Is your feature request related to a problem? Please describe.
Currently, I run a project in which model/controller classes are monitored in real time, and the
spec.json
is updated automatically as any changes are made. The desire is to marry this with front-end development, and allow for dynamic updating of API clients. This aims to provide a seamless integration between making model changes in the API, and having the API client reflect those changes near instantly.Describe the solution you'd like
What I'm proposing is to add a watch flag, (
-w, --watch
) to the cli. When in watch mode, the cli will generate the code on initial startup, and will remain running listening for changes to the spec file. When any changes are detected, the code generation will execute again, producing the updated client output.Describe alternatives you've considered
I've toyed with this in a few manners, but generally the latency is high with having to restart the cli (and JVM) on every execution.