diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 9a56a5c3286..13780199f71 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -19030,9 +19030,6 @@ "type": "integer" } }, - "required": [ - "value" - ], "type": "object", "x-kubernetes-group-version-kind": [ { diff --git a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json index fe73cefadd2..da63f845725 100644 --- a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json @@ -40,9 +40,6 @@ "type": "integer" } }, - "required": [ - "value" - ], "type": "object", "x-kubernetes-group-version-kind": [ { diff --git a/hack/golangci-hints.yaml b/hack/golangci-hints.yaml index d68e6ef1420..6d164ce7858 100644 --- a/hack/golangci-hints.yaml +++ b/hack/golangci-hints.yaml @@ -177,7 +177,7 @@ linters: # The following exceptions are for fields in stable or deprecated APIs that cannot be # changed due to backward compatibility constraints. Each rule is scoped to the # specific field to avoid hiding new violations. - + ## For the "Extra" field, which is common across several auth-related APIs. - text: "field UserInfo.Extra should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/authentication/(v1|v1beta1)/types.go" @@ -185,7 +185,7 @@ linters: path: "staging/src/k8s.io/api/authorization/(v1|v1beta1)/types.go" - text: "field CertificateSigningRequestSpec.Extra should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/certificates/(v1|v1beta1)/types.go" - + ## For ResourceList fields in the core API. - text: "field (PersistentVolumeSpec.Capacity|ContainerStatus.AllocatedResources|PodSpec.Overhead|ResourceQuotaSpec.Hard) type ResourceList should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" @@ -197,11 +197,11 @@ linters: path: "staging/src/k8s.io/api/core/v1/types.go" - text: "type ResourceList should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" - + ## For the Secret.Data and ConfigMap.BinaryData fields in the core API. - text: "field (Secret.Data|ConfigMap.BinaryData) should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" - + ## For map fields in the resource API (across all versions). - text: "field (CounterSet|DeviceCounterConsumption).Counters should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go" @@ -211,11 +211,11 @@ linters: path: "staging/src/k8s.io/api/resource/(v1|v1beta2)/types.go" - text: "field (CapacityRequirements.Requests|DeviceRequestAllocationResult.ConsumedCapacity) should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go" - + # OptionalOrRequired is being enabled over time. For now, each API group should be added to this list until we comb through each group and fix the missing tags. - text: "must be marked as optional or required" path: "staging/src/k8s.io/api/(admission|apidiscovery|apiserverinternal|apps|authentication|authorization|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|storage|storagemigration)" - + # OptionalOrRequired - Existing fields that are marked as both optional and required (based on standard optional vs kubebuilder:validation:Required) and should not be fixed. - text: "field (PortStatus|IngressPortStatus)\\.Error must not be marked as both optional and required" path: "staging/src/k8s.io/api/(core/v1|extensions/v1beta1|networking/(v1|v1beta1))" diff --git a/hack/golangci.yaml b/hack/golangci.yaml index f3557df3dc8..dec82650102 100644 --- a/hack/golangci.yaml +++ b/hack/golangci.yaml @@ -188,7 +188,7 @@ linters: # The following exceptions are for fields in stable or deprecated APIs that cannot be # changed due to backward compatibility constraints. Each rule is scoped to the # specific field to avoid hiding new violations. - + ## For the "Extra" field, which is common across several auth-related APIs. - text: "field UserInfo.Extra should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/authentication/(v1|v1beta1)/types.go" @@ -196,7 +196,7 @@ linters: path: "staging/src/k8s.io/api/authorization/(v1|v1beta1)/types.go" - text: "field CertificateSigningRequestSpec.Extra should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/certificates/(v1|v1beta1)/types.go" - + ## For ResourceList fields in the core API. - text: "field (PersistentVolumeSpec.Capacity|ContainerStatus.AllocatedResources|PodSpec.Overhead|ResourceQuotaSpec.Hard) type ResourceList should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" @@ -208,11 +208,11 @@ linters: path: "staging/src/k8s.io/api/core/v1/types.go" - text: "type ResourceList should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" - + ## For the Secret.Data and ConfigMap.BinaryData fields in the core API. - text: "field (Secret.Data|ConfigMap.BinaryData) should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/core/v1/types.go" - + ## For map fields in the resource API (across all versions). - text: "field (CounterSet|DeviceCounterConsumption).Counters should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go" @@ -222,11 +222,11 @@ linters: path: "staging/src/k8s.io/api/resource/(v1|v1beta2)/types.go" - text: "field (CapacityRequirements.Requests|DeviceRequestAllocationResult.ConsumedCapacity) should not use a map type, use a list type with a unique name/identifier instead" path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go" - + # OptionalOrRequired is being enabled over time. For now, each API group should be added to this list until we comb through each group and fix the missing tags. - text: "must be marked as optional or required" path: "staging/src/k8s.io/api/(admission|apidiscovery|apiserverinternal|apps|authentication|authorization|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|storage|storagemigration)" - + # OptionalOrRequired - Existing fields that are marked as both optional and required (based on standard optional vs kubebuilder:validation:Required) and should not be fixed. - text: "field (PortStatus|IngressPortStatus)\\.Error must not be marked as both optional and required" path: "staging/src/k8s.io/api/(core/v1|extensions/v1beta1|networking/(v1|v1beta1))" diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 6f0db21b49d..4048f89c15a 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -53205,7 +53205,6 @@ func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{ @@ -53414,7 +53413,6 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCall }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{ @@ -53708,7 +53706,6 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallb }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{