Skip to content
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

Handle a specific case of anyOf #30

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Conversation

zaninime
Copy link
Contributor

@zaninime zaninime commented Jan 3, 2025

The anyOf handling was not considering a case that's already coded in the kubenix generator, the int-or-string case.

For reasons beyond my current knowledge, the CRDs I'm using (Cloudnative-PG) contain a property called x-kubernetes-int-or-string and not the expected int-or-string in the format property inside the type.

This PR handles this case by patching up the definition so that the generator uses either int str instead of blindly picking the first one.

The `anyOf` handling was not considering a case that's already coded in
the kubenix generator, the int-or-string case.

For reasons beyond my current knowledge, the CRDs I'm using
(Cloudnative-PG) contain a property called `x-kubernetes-int-or-string`
and not the expected `int-or-string` in the `format` property inside the
`type`.

This commit handles this case by patching up the definition so that
the generator uses `either int str` instead of blindly picking the first
one.
Copy link
Owner

@arnarg arnarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good! Thanks for the contribution :)

@arnarg arnarg merged commit a6fd2eb into arnarg:main Jan 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants