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

[java-generator] Default values + x-kubernetes-int-or-string breaks compilation #5580

Closed
andreaTP opened this issue Nov 8, 2023 · 0 comments · Fixed by #5581
Closed

[java-generator] Default values + x-kubernetes-int-or-string breaks compilation #5580

andreaTP opened this issue Nov 8, 2023 · 0 comments · Fixed by #5581

Comments

@andreaTP
Copy link
Member

andreaTP commented Nov 8, 2023

Describe the bug

When a default is provided for a field of type IntOrString the generated code attempts to do a straight assignment to String which is not allowed.

Reported by @kornys

Fabric8 Kubernetes Client version

SNAPSHOT

Steps to reproduce

A field like:

                      pvcSize:
                        anyOf:
                        - type: integer
                        - type: string
                        default: 10Gi
                        description: 'Customize the size of the PVC created for the
                          default MariaDB instance. Default: 10Gi'

breaks compilation.

Expected behavior

Compilation should succeed and the generated code should be immediately usable.

Runtime

other (please specify in additional context)

Kubernetes API Server version

next (development version)

Environment

other (please specify in additional context)

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants