Search code examples
flaskopenapiopenapi-generator

openapi-generator regenerate code with updated openapi-spec for python-flask


So, I have been working on python-flask generated code using openapi-generator, but on updating the api-spec it overwrites all my logic on controllers. Is there any standard way to deal with this?

For example if I want to update the parameter name like from this:

/shop/{shopId}:

to

/shop/{uniqueId}:

In this case it will regenerate all my controller files and my logic implemented in them with it.


Solution

  • I ended up using my own custom opeanapi template, with a custom post python script to generate new impl files, such that. Comment below if anyone needs more details.