I recently started using Swagger to generate flask templates: http://editor.swagger.io/#/
My workflow is flawed, and I am wondering where I am going wrong. I:
This part of the process is fine. However, let's say we want to add a new endpoint or change an existing endpoint. Now what? I:
It seems there is a gap between the initial generation of the flask template and ongoing maintenance. What am I doing wrong?
Yeah, there isn't really a good workflow for that yet AFAICS.
One thing you can do is check the original generated code into git on a branch called "generated" or similar. Then merge that to master and start working on it. If, at a later point, you extend your swagger definition, you can generate the code again, switch to the generated branch, overwrite the existing code with the newly generated code, commit and merge to master again. If all you had were some additional endpoints, this should even work without any merge conflicts.
It would of course be nicer if the swagger tools had a concept of which code they generated and be able to update generated code, but until then this should be a bearable workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With