-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable configuration of whether quotes are used in generated yaml #6773
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Quality Gate passedIssues Measures |
Thx for looking into this. @baloo42 do you want to provide feedback? |
* @param <T> the type of the object being serialized. | ||
* @return a String containing a JSON representation of the provided object. | ||
*/ | ||
public <T> String asYaml(T object, boolean minQuotes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change looks good, but wanted to bring up that based upon the DumpSettings there's a lot that could be overriden about the generation style.
Min quoting is roughly defaultScalarStyle=ScalarStyle.PLAIN - it's just that we need to still quote keys that look like boolean values to kube. Another possibliity is to create our own "DumpSettings" builder and have that as an argument so that this can be expanded in the future without adding additional signatures to asYaml.
I share the concerns Steven mentioned in his comment: Some kind of @MichaelMorrisEst Can you also integrate this into the CLI? |
Description
Enables configuration of whether quotes are included in yaml generated by the KubernetesSerialization class and exposes that through the CRD generator MOJO by adding a new paramater named "minimizeQuotes".
Closes #6763
Type of change
test, version modification, documentation, etc.)
Checklist