Fix list_type_missing in sample-apiserver

This commit is contained in:
Tim Hockin 2023-11-12 14:51:37 -08:00
parent e9bd9262dc
commit b8982be268
No known key found for this signature in database
3 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,3 @@
API rule violation: list_type_missing,k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1,Fischer,DisallowedFlunders
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object

View File

@ -65,6 +65,7 @@ type Fischer struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// DisallowedFlunders holds a list of Flunder.Names that are disallowed.
// +listType=atomic
DisallowedFlunders []string `json:"disallowedFlunders,omitempty" protobuf:"bytes,2,rep,name=disallowedFlunders"`
}

View File

@ -2662,6 +2662,11 @@ func schema_pkg_apis_wardle_v1alpha1_Fischer(ref common.ReferenceCallback) commo
},
},
"disallowedFlunders": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "DisallowedFlunders holds a list of Flunder.Names that are disallowed.",
Type: []string{"array"},