Javatar81 / operator-gen

An code generator that generates CRDs and reconcilers
0 stars 1 forks source link

Allow to ignore fields for CRD generation #12

Closed Javatar81 closed 5 months ago

Javatar81 commented 5 months ago

Example:

The Keycloak OpenAPI contains two properties oauth2DeviceCodeLifespan and oAuth2DeviceCodeLifespan in RealmRepresentation. This leads to error during deserialization:

Caused by: java.lang.IllegalArgumentException: Conflicting getter definitions for property "oauth2DeviceCodeLifespan": org.operator.gen.v1alpha1.RealmRepresentationSpec#getOauth2DeviceCodeLifespan() vs org.operator.gen.v1alpha1.RealmRepresentationSpec#getOAuth2DeviceCodeLifespan()

We need a maven plugin parameter to ignore certain properties, e.g.

<crdCustomizations>
  <property>
    <name>ignoreProps</name>
    <value>oAuth2DeviceCodeLifespan,oAuth2DevicePollingInterval</value>
  </property>
</crdCustomizations>