Change name of component schema item, delete schema item properties, create subset based on a schema #108
mikeschinkel
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Thanks @mikeschinkel , this is a great set of use cases and the jq is a great illustration of what you needed!
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I attended the 2024-11-05 Overlays meeting and mentioned some use-cases where I had struggled to use Overlay and they asked me to elaborate after which they suggested I post here about them.
I had a client project to develop a Kubernetes External DNS provider in Golang and was given an OpenAPI document that defined their DNS' API. I used that OpenAPI to generate Go code using oapi-codegen and found that I wanted to transform the document before generated code from it.
I basically found three (3) conceptually simple things I wanted in order to facilitate generating Golang code more optimized for my use-case:
Specifically I wanted those because:
I struggled with getting overlay to meet my needs so just to get the project done I fell back to using jq and a shell script. Here is that script for reference (not great code, but it works):
This project was several months ago so I don't remember specifically what I could not get working with overlay — or that came across as far too complex for a simple conceptual change — but at least one of these things was either impossible or much harder than I think they ideally could be which is why I fell back to using
jq
andBash
because I knew how to make it work with them when faced with a looming deadline.In summary I think each of these things are conceptually simple, something I can imagine many people doing codegen would want, and given their conceptual simplicity it would seem like they should be made easy to accomplish in overlay.
If you want me to elaborate on any of this, please do not hesitate to ask.
Beta Was this translation helpful? Give feedback.
All reactions