From ee11ed62c6298f9bb11c62b61bfec8d6e3e6e820 Mon Sep 17 00:00:00 2001 From: Karol Szwaj Date: Mon, 1 Dec 2025 10:34:32 +0100 Subject: [PATCH] clean up the omitempty tags and typo in sdk v1alpha2 Signed-off-by: Karol Szwaj On-behalf-of: @SAP karol.szwaj@sap.com --- sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/apiserviceexport_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/apiserviceexportrequest_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/apiserviceexporttemplate_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/apiservicenamespace_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/bindingresponse_types.go | 4 ++-- .../v1alpha2/{boundchema_types.go => boundschema_types.go} | 4 ++-- sdk/apis/kubebind/v1alpha2/clusterbinding_types.go | 4 ++-- sdk/apis/kubebind/v1alpha2/collection_types.go | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) rename sdk/apis/kubebind/v1alpha2/{boundchema_types.go => boundschema_types.go} (99%) diff --git a/sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go b/sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go index 174f9dc38..a2d05eaba 100644 --- a/sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go +++ b/sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go @@ -63,14 +63,14 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type APIServiceBinding struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies how an API service from a service provider should be bound in the // local consumer cluster. Spec APIServiceBindingSpec `json:"spec"` // status contains reconciliation information for a service binding. - Status APIServiceBindingStatus `json:"status,omitempty"` + Status APIServiceBindingStatus `json:"status"` } func (in *APIServiceBinding) GetConditions() conditionsapi.Conditions { diff --git a/sdk/apis/kubebind/v1alpha2/apiserviceexport_types.go b/sdk/apis/kubebind/v1alpha2/apiserviceexport_types.go index 5cd389bdb..3ef30971e 100644 --- a/sdk/apis/kubebind/v1alpha2/apiserviceexport_types.go +++ b/sdk/apis/kubebind/v1alpha2/apiserviceexport_types.go @@ -60,7 +60,7 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type APIServiceExport struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies the resource. // +required @@ -68,7 +68,7 @@ type APIServiceExport struct { Spec APIServiceExportSpec `json:"spec"` // status contains reconciliation information for the resource. - Status APIServiceExportStatus `json:"status,omitempty"` + Status APIServiceExportStatus `json:"status"` } func (in *APIServiceExport) GetConditions() conditionsapi.Conditions { diff --git a/sdk/apis/kubebind/v1alpha2/apiserviceexportrequest_types.go b/sdk/apis/kubebind/v1alpha2/apiserviceexportrequest_types.go index 6ebf9177c..dff74d20d 100644 --- a/sdk/apis/kubebind/v1alpha2/apiserviceexportrequest_types.go +++ b/sdk/apis/kubebind/v1alpha2/apiserviceexportrequest_types.go @@ -45,7 +45,7 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type APIServiceExportRequest struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies how an API service from a service provider should be bound in the // local consumer cluster. @@ -234,7 +234,7 @@ type PermissionClaim struct { // Selector is a resource selector that selects objects of a GVR. // +required // +kubebuilder:validation:Required - Selector Selector `json:"selector,omitempty"` + Selector Selector `json:"selector"` } // Owner is the owner of the resource. diff --git a/sdk/apis/kubebind/v1alpha2/apiserviceexporttemplate_types.go b/sdk/apis/kubebind/v1alpha2/apiserviceexporttemplate_types.go index 37d697db3..7d7dc8426 100644 --- a/sdk/apis/kubebind/v1alpha2/apiserviceexporttemplate_types.go +++ b/sdk/apis/kubebind/v1alpha2/apiserviceexporttemplate_types.go @@ -36,7 +36,7 @@ import ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type APIServiceExportTemplate struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies the template. // +required @@ -44,7 +44,7 @@ type APIServiceExportTemplate struct { Spec APIServiceExportTemplateSpec `json:"spec"` // status contains reconciliation information for the template. - Status APIServiceExportTemplateStatus `json:"status,omitempty"` + Status APIServiceExportTemplateStatus `json:"status"` } func (in *APIServiceExportTemplate) GetConditions() conditionsapi.Conditions { diff --git a/sdk/apis/kubebind/v1alpha2/apiservicenamespace_types.go b/sdk/apis/kubebind/v1alpha2/apiservicenamespace_types.go index 9a0a48319..215b511a2 100644 --- a/sdk/apis/kubebind/v1alpha2/apiservicenamespace_types.go +++ b/sdk/apis/kubebind/v1alpha2/apiservicenamespace_types.go @@ -41,13 +41,13 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type APIServiceNamespace struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies a service namespace. Spec APIServiceNamespaceSpec `json:"spec"` // status contains reconciliation information for a service namespace - Status APIServiceNamespaceStatus `json:"status,omitempty"` + Status APIServiceNamespaceStatus `json:"status"` } type APIServiceNamespaceSpec struct { diff --git a/sdk/apis/kubebind/v1alpha2/bindingresponse_types.go b/sdk/apis/kubebind/v1alpha2/bindingresponse_types.go index 9733e75db..5fc94e53d 100644 --- a/sdk/apis/kubebind/v1alpha2/bindingresponse_types.go +++ b/sdk/apis/kubebind/v1alpha2/bindingresponse_types.go @@ -84,9 +84,9 @@ type BindingResponseAuthenticationOAuth2CodeGrant struct { // authentication and resource selection on the service provider website. type BindableResourcesRequest struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` - TemplateRef APIServiceExportTemplateRef `json:"templateRef,omitempty"` + TemplateRef APIServiceExportTemplateRef `json:"templateRef"` } type APIServiceExportTemplateRef struct { diff --git a/sdk/apis/kubebind/v1alpha2/boundchema_types.go b/sdk/apis/kubebind/v1alpha2/boundschema_types.go similarity index 99% rename from sdk/apis/kubebind/v1alpha2/boundchema_types.go rename to sdk/apis/kubebind/v1alpha2/boundschema_types.go index 71d86ad72..68dd3f3ed 100644 --- a/sdk/apis/kubebind/v1alpha2/boundchema_types.go +++ b/sdk/apis/kubebind/v1alpha2/boundschema_types.go @@ -41,10 +41,10 @@ type ExportedSchemas map[string]*BoundSchema // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" type BoundSchema struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` Spec BoundSchemaSpec `json:"spec"` - Status BoundSchemaStatus `json:"status,omitempty"` + Status BoundSchemaStatus `json:"status"` } // ResourceGroupName returns the group name of the resource. diff --git a/sdk/apis/kubebind/v1alpha2/clusterbinding_types.go b/sdk/apis/kubebind/v1alpha2/clusterbinding_types.go index fcf579999..8eb8c6c9f 100644 --- a/sdk/apis/kubebind/v1alpha2/clusterbinding_types.go +++ b/sdk/apis/kubebind/v1alpha2/clusterbinding_types.go @@ -50,7 +50,7 @@ const ( // +kubebuilder:validation:XValidation:rule="self.metadata.name == \"cluster\"",message="cluster binding name should be cluster" type ClusterBinding struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec represents the data in the newly created ClusterBinding. // +required @@ -58,7 +58,7 @@ type ClusterBinding struct { Spec ClusterBindingSpec `json:"spec"` // status contains reconciliation information for the service binding. - Status ClusterBindingStatus `json:"status,omitempty"` + Status ClusterBindingStatus `json:"status"` } func (in *ClusterBinding) GetConditions() conditionsapi.Conditions { diff --git a/sdk/apis/kubebind/v1alpha2/collection_types.go b/sdk/apis/kubebind/v1alpha2/collection_types.go index 64f0b060a..53a82870b 100644 --- a/sdk/apis/kubebind/v1alpha2/collection_types.go +++ b/sdk/apis/kubebind/v1alpha2/collection_types.go @@ -35,7 +35,7 @@ import ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0 type Collection struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` // spec specifies the collection. // +required @@ -43,7 +43,7 @@ type Collection struct { Spec CollectionSpec `json:"spec"` // status contains reconciliation information for the collection. - Status CollectionStatus `json:"status,omitempty"` + Status CollectionStatus `json:"status"` } func (in *Collection) GetConditions() conditionsapi.Conditions {