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

Model has lombok.Setter when is not needed #6100

Closed
jorsol opened this issue Jul 2, 2024 · 3 comments · Fixed by #6102
Closed

Model has lombok.Setter when is not needed #6100

jorsol opened this issue Jul 2, 2024 · 3 comments · Fixed by #6102
Assignees
Labels
bug component/kubernetes-model Deals with the kubernetes-model
Milestone

Comments

@jorsol
Copy link
Contributor

jorsol commented Jul 2, 2024

Describe the bug

Almost all the models are annotated with @Setter but the setters seem to be explicitly generated.

Fabric8 Kubernetes Client version

SNAPSHOT

Steps to reproduce

Expected behavior

The annotation should not be present when the setter is already generated:

Runtime

other (please specify in additional context)

Kubernetes API Server version

1.25.3@latest

Environment

other (please specify in additional context)

Fabric8 Kubernetes Client Logs

No response

Additional context

This seems to be harmless and Lombok does not generate the setters if found one, but having one less annotation that does magical stuff is better.

@manusa manusa added bug component/kubernetes-model Deals with the kubernetes-model labels Jul 2, 2024
@manusa
Copy link
Member

manusa commented Jul 2, 2024

Added in fix for #3570 in #3576 PR.

It's used to create the setAdditionalProperties method which is not included in the generated code by default.

We can do specific handling and add the additionalProperties setter ourselves using a custom rule.

@manusa manusa self-assigned this Jul 2, 2024
@jorsol
Copy link
Contributor Author

jorsol commented Jul 2, 2024

Well, if it's used to create the setAdditionalProperties then is ok to have it, yet it would be better to add the setter using a custom rule like you mention.

Honestly, if the toString, equals and hashCode can be also generated to remove lombok completely, that would be nice.

@manusa
Copy link
Member

manusa commented Jul 2, 2024

Well, if it's used to create the setAdditionalProperties then is ok to have it, yet it would be better to add the setter using a custom rule like you mention.

I opened #6102 to address this

Honestly, if the toString, equals and hashCode can be also generated to remove lombok completely, that would be nice.

I'm working on a replacement generator (#6080) to completely remove the Go-to-JSONSchema and the JSONSchema-to-Java code generation steps.
Once this is in place, it will be really easy to modify the templates so that the code is generated without Lombok annotations or anything else we want to change.

@manusa manusa added this to the 7.0.0 milestone Jul 2, 2024 — with automated-tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component/kubernetes-model Deals with the kubernetes-model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants