Closed dd-ashishaev closed 1 year ago
For the record generally they way to update one template is to use a downstream patch: https://apigentools.readthedocs.io/en/latest/workflow/#add-template-patches
Thanks for your response! Template patches are great! On the other hand, I'm not sure they are a replacement for updating the templates in general. We could indeed copy the code from the linked PR and check it in our repository as a patch. However, this will become complicated if we need more changes, or need to understand where a generated line comes from. The patch will also separate the change from its context (state of the repo, PR/issue discussion).
In addition to that, not all bugfixes can be applied as a template patch/override, for example, if the changes are outside the templates in the code generation logic. You can fork the template in this case, but the maintenance burden of this is likely huge.
I'm OK with patching for now, but not sure this is the best way in general. What are your thoughts on bumping the version? I'm seeing that it hasn't been updated in about a year...
Oh no I was just suggesting that in the future. No issue from me updating the image.
Ah! Thank you! Perfect 🙇 I think I misunderstood your comment, sorry!
What does this PR do?
Description of the Change
We generate a Java client for one of our services. Unfortunately, the version that is used currently has a bug in the generator, and there's no good workaround. The fix is in this PR: https://github.com/OpenAPITools/openapi-generator/pull/12131.
Alternate Designs
Possible Drawbacks
Verification Process
docker build . --tag apigentools:local
Additional Notes
It would be practical to have a way to version templates independently from apigentools, and preferably per-language. Sometime a bug, like this one, requires an upgrade for one language, but other languages are operational.
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.