-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add copyWith methods to data models #4
Comments
Hi @pattobrien This is a great addition to have. The generation code is written in C# and is extremely dirty. I don't even think about sharing it unless i clean up and refactor the code. |
Haha I totally get that, but no judgment here - as long as it works, thats what's most important 😉 I'm vaguely familiar with C#, but have a good amount of expertise in Dart generation tools, the analyzer packages, etc.. Have you considered porting the tooling over to Dart? If that makes sense for you and the project, then I can definitely help out. I'm not sure how complex such a tool might be, but I assume the implementation looks something like this:
If you'd be up for sharing some related info with me, I'd be more than happy to do the heavy lifting for the code gen tool. The features we could add for each model would be:
Let me know your thoughts and I might be able to get started with this sometime over the next couple of weeks. |
The process is exactly like you wrote. for k8s i generated the code from OpenAPI spec, but for other projects like Istio i used the yaml definition files. So basically it is two code generators coupled with each other and made the code dirty. I started to port everything to dart a while ago. But since i didn't have free time, i didn't continue working on it. So why not, let's begin. I will share with some code in the coming days. |
Hey there! Very impressed by the collection of k8s models, thanks a lot for your work on them so far.
Would you be willing to add "copyWith" functionality to each of the generated schemas, or accept a PR for doing so? I didn't see where the automation script was located, but if you'd like to share that I could take a look at implementing this myself.
Thanks in advance, and I'm looking forward to contributing how I can!
The text was updated successfully, but these errors were encountered: