Hi, we faced with this issue while attempting to generate and use CRs for cluster-api types.
Under the hood this .JSON field is just Raw []byte, so it can be an empty string. However kopium treats this as BTreeMap<String, serde_json::Value>. Changing this to serde_json::Value fixes the problem, but it may have a cascade effect on other structures.
CRD definition for the field lacks type: information.
Is it possible to treat such fields as enum, BTreeMap|serde_json::Value?
Edit: All fields which are affected by this have +kubebuilder:validation:Schemalessannotation. Those can have any value in it, and then should have serde_json::Value specified.
Hi, we faced with this issue while attempting to generate and use CRs for cluster-api types.
Under the hood this
.JSON
field is justRaw []byte
, so it can be an empty string. However kopium treats this asBTreeMap<String, serde_json::Value>
. Changing this toserde_json::Value
fixes the problem, but it may have a cascade effect on other structures.CRD definition for the field lacks
type:
information.Is it possible to treat such fields as enum,
BTreeMap|serde_json::Value
?Edit: All fields which are affected by this have
+kubebuilder:validation:Schemaless
annotation. Those can have any value in it, and then should haveserde_json::Value
specified.