diff --git a/api/configuration/v1alpha1/key_set_ref.go b/api/configuration/v1alpha1/key_set_ref.go index 68c8a25..42a488c 100644 --- a/api/configuration/v1alpha1/key_set_ref.go +++ b/api/configuration/v1alpha1/key_set_ref.go @@ -23,7 +23,7 @@ type KeySetRef struct { // Type defines type of the KeySet object reference. It can be one of: // - konnectID // - namespacedRef - Type KeySetRefType `json:"type,omitempty"` + Type KeySetRefType `json:"type"` // KonnectID is the schema for the KonnectID type. // This field is required when the Type is konnectID. @@ -31,7 +31,7 @@ type KeySetRef struct { KonnectID *string `json:"konnectID,omitempty"` // NamespacedRef is a reference to a KeySet entity inside the cluster. - // This field is required when the Type is konnectNamespacedRef. + // This field is required when the Type is namespacedRef. // +optional NamespacedRef *KeySetNamespacedRef `json:"namespacedRef,omitempty"` } diff --git a/config/crd/bases/configuration.konghq.com_kongkeys.yaml b/config/crd/bases/configuration.konghq.com_kongkeys.yaml index 02f1509..1568be6 100644 --- a/config/crd/bases/configuration.konghq.com_kongkeys.yaml +++ b/config/crd/bases/configuration.konghq.com_kongkeys.yaml @@ -107,7 +107,7 @@ spec: namespacedRef: description: |- NamespacedRef is a reference to a KeySet entity inside the cluster. - This field is required when the Type is konnectNamespacedRef. + This field is required when the Type is namespacedRef. properties: name: description: Name is the name of the KeySet object. @@ -125,6 +125,8 @@ spec: - konnectID - namespacedRef type: string + required: + - type type: object x-kubernetes-validations: - message: when type is namespacedRef, namespacedRef must be set diff --git a/docs/api-reference.md b/docs/api-reference.md index dc7969f..fa938f6 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -637,7 +637,7 @@ It is used to reference a KeySet entity. | --- | --- | | `type` _[KeySetRefType](#keysetreftype)_ | Type defines type of the KeySet object reference. It can be one of: - konnectID - namespacedRef | | `konnectID` _string_ | KonnectID is the schema for the KonnectID type. This field is required when the Type is konnectID. | -| `namespacedRef` _[KeySetNamespacedRef](#keysetnamespacedref)_ | NamespacedRef is a reference to a KeySet entity inside the cluster. This field is required when the Type is konnectNamespacedRef. | +| `namespacedRef` _[KeySetNamespacedRef](#keysetnamespacedref)_ | NamespacedRef is a reference to a KeySet entity inside the cluster. This field is required when the Type is namespacedRef. | _Appears in:_