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-gen] - Generated Java model should include new specific annotations (min, max, etc.) #4384

Closed
fabiobrz opened this issue Sep 5, 2022 · 7 comments · Fixed by #4406
Closed
Assignees
Milestone

Comments

@fabiobrz
Copy link
Contributor

fabiobrz commented Sep 5, 2022

Is your enhancement related to a problem? Please describe

Support for specific annotations (e.g.: @Max, @Min, @Pattern, etc.), was added recently but the Java generator doesn't generate any of such annotations.

Describe the solution you'd like

The Java generator should take the related keywords into account when they appear in CRDs (e.g.: maximum, minimum, pattern, etc.), and generate the corresponding annotations for them to appear in the Java model.

Describe alternatives you've considered

N/A

Additional context

See:

@fabiobrz fabiobrz changed the title Generated Java model should include new specific annotations (min, max, etc.) [java-gen] - Generated Java model should include new specific annotations (min, max, etc.) Sep 7, 2022
@derlin
Copy link

derlin commented Oct 6, 2022

Those new annotations look great !
I see you did a release of the kubernetes-client, but the generator-annotations module isn't available on maven central (marked as internal). Given the doc has been updated and references the io.fabric8.generator.*, it is quite confusing ^^'. I am still not able to import them, so how am I supposed to use this new feature ?

@andreaTP
Copy link
Member

andreaTP commented Oct 6, 2022

@derlin which version are you using?
The Java generator is available only 6+

@derlin
Copy link

derlin commented Oct 6, 2022

@andreaTP I am using 5.13.3 and tried the latest version (5.13.4). Maybe this is where I am confused, then. Could you explain the difference between the 5.x and 6.x tracks ?

Edit: just tried importing the crd-generator-api and crd-generator-apt version 6.1.1, still unable to import.

@andreaTP
Copy link
Member

andreaTP commented Oct 6, 2022

I actually cannot find generator-annotations even for version 6.1.1 : https://repo1.maven.org/maven2/io/fabric8/ ( crd-generator is fine instead)
@manusa was it ever shipped?

Regarding the difference you can read more here: https://developers.redhat.com/articles/2022/07/15/new-http-clients-java-generator-and-more-fabric8-600

@manusa manusa added this to the 6.2.0 milestone Oct 7, 2022
@manusa
Copy link
Member

manusa commented Oct 7, 2022

This is part of the 6.2.0 milestone, it will be available once we cut this release.

@bachmanity1
Copy link
Contributor

This is actually a little confusing because documentation has already been updated but release is not out yet. I've spent last couple of hours figuring out why imports related to this feature are not working in my project only to realize that this feature is not available yet.

@andreaTP
Copy link
Member

Hi @bachmanity1 , sorry for the confusion and trouble, fabric8 6.2.0 is out now and since we don't have it properly "versioned" I encourage you to browse the docs using the appropriate tag e.g.:
https://github.com/fabric8io/kubernetes-client/tree/v6.2.0/doc

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 a pull request may close this issue.

5 participants