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

CRD generation fails when walking the type hierarchy for enums #2819

Closed
metacosm opened this issue Feb 19, 2021 · 0 comments · Fixed by #2821 or jenkinsci/kubernetes-client-api-plugin#83
Assignees
Labels
Milestone

Comments

@metacosm
Copy link
Collaborator

The issue is that java describes enums as generic types of java.lang.Enum which causes a mismatch between the number of arguments and the type definition in Types.applyTypeArguments, causing an IndexOutOfBoundsException.

@metacosm metacosm added the bug label Feb 19, 2021
metacosm added a commit that referenced this issue Feb 19, 2021
`Types.applyTypeArguments` doesn't crash when encountering differing
cardinality between type definition and actual arguments, which was the
case when encountering an enum property. Such properties are now
generated by enumerating their cases name and recording them in the
validation schema. Not sure if that actually covers all cases.

Fixes #2819.
@metacosm metacosm self-assigned this Feb 19, 2021
@manusa manusa added this to the 5.1.1 milestone Feb 22, 2021
metacosm added a commit that referenced this issue Feb 23, 2021
`Types.applyTypeArguments` doesn't crash when encountering differing
cardinality between type definition and actual arguments, which was the
case when encountering an enum property. Such properties are now
generated by enumerating their cases name and recording them in the
validation schema. Not sure if that actually covers all cases.

Fixes #2819.
manusa pushed a commit that referenced this issue Feb 24, 2021
`Types.applyTypeArguments` doesn't crash when encountering differing
cardinality between type definition and actual arguments, which was the
case when encountering an enum property. Such properties are now
generated by enumerating their cases name and recording them in the
validation schema. Not sure if that actually covers all cases.

Fixes #2819.
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment