Skip to content

Commit

Permalink
fix: don't annotate getter or setters, JsonProperty already in field
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Jun 27, 2024
1 parent 30e0e7b commit f5c1aa8
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,28 @@ public void propertyField(JFieldVar field, JDefinedClass clazz, String propertyN
}
}

@Override
public void propertyGetter(JMethod getter, JDefinedClass clazz, String propertyName) {
// https://github.com/fabric8io/kubernetes-client/issues/6085
// https://github.com/quarkusio/quarkus/issues/39934
// Having JsonProperty in both field and method causes issues when compiling to native
// ignore for x-kubernetes-* properties (require special handling)
if (propertyName.startsWith("x-kubernetes-")) {
super.propertyGetter(getter, clazz, propertyName);
}
}

@Override
public void propertySetter(JMethod setter, JDefinedClass clazz, String propertyName) {
// https://github.com/fabric8io/kubernetes-client/issues/6085
// https://github.com/quarkusio/quarkus/issues/39934
// Having JsonProperty in both field and method causes issues when compiling to native
// ignore for x-kubernetes-* properties (require special handling)
if (propertyName.startsWith("x-kubernetes-")) {
super.propertySetter(setter, clazz, propertyName);
}
}

protected void processBuildable(JDefinedClass clazz) {
JAnnotationUse buildable = clazz.annotate(Buildable.class)
.param("editableEnabled", false)
Expand Down

0 comments on commit f5c1aa8

Please sign in to comment.