We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Required spec/status in CRD is not reflected in generated Java.
I'd like the java generator to add annotated getters for spec/status to the generated custom resource class if the spec/status is required in the CRD.
No response
The text was updated successfully, but these errors were encountered:
Hi @matteriben , I'm not 100% sure about the request here, would you mind drafting a little example with:
afaiu the getters for spec and status are already available ( e.g. ).
Sorry, something went wrong.
Hi @andreaTP I'm sorry my original request was not clear without an example.
Given a CRD like this:
openAPIV3Schema: type: object required: - spec - status properties: spec: type: object status: type: object
The generator currently creates a class like this:
public class Required extends CustomResource<RequiredSpec, RequiredStatus> { }
I'd like the generator to create a class like this:
public class Required extends CustomResource<RequiredSpec, RequiredStatus> { @java.lang.Override @io.fabric8.generator.annotation.Required public RequiredSpec getSpec() { return super.getSpec(); } @java.lang.Override @io.fabric8.generator.annotation.Required public RequiredStatus getStatus() { return super.getStatus(); } }
I created a PR which provides an implementation of this requested enhancement: #6807
No branches or pull requests
Is your enhancement related to a problem? Please describe
Required spec/status in CRD is not reflected in generated Java.
Describe the solution you'd like
I'd like the java generator to add annotated getters for spec/status to the generated custom resource class if the spec/status is required in the CRD.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: