mirror of https://github.com/k3s-io/k3s
Add +k8s:openapi-gen tag to API types
parent
6ba271b9ae
commit
702f55e61d
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
package v1
|
|
@ -25,8 +25,12 @@ import (
|
|||
|
||||
type TestType struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
Status TestTypeStatus `json:"status,omitempty"`
|
||||
// ---
|
||||
// the next tag removes the field from openapi spec. Adding unversioned objectMeta bring in a whole set of
|
||||
// unversioned objects in the generate file that is not used anywhere other than this test type.
|
||||
// +k8s:openapi-gen=false
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
Status TestTypeStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type TestTypeList struct {
|
||||
|
|
|
@ -16,5 +16,5 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
package v1beta1 // import "k8s.io/kubernetes/federation/apis/federation/v1beta1"
|
||||
|
|
|
@ -54,6 +54,7 @@ var (
|
|||
|
||||
// int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster
|
||||
// than operations on inf.Dec for values that can be represented as int64.
|
||||
// +k8s:openapi-gen=true
|
||||
type int64Amount struct {
|
||||
value int64
|
||||
scale Scale
|
||||
|
|
|
@ -93,6 +93,7 @@ import (
|
|||
// +protobuf.embed=string
|
||||
// +protobuf.options.marshal=false
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
// +k8s:openapi-gen=true
|
||||
type Quantity struct {
|
||||
// i is the quantity in int64 scaled form, if d.Dec == nil
|
||||
i int64Amount
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package unversioned // import "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// Package v1 is the v1 version of the API.
|
||||
package v1 // import "k8s.io/kubernetes/pkg/api/v1"
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
package abac
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
package v0
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
package v1beta1
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package apps // import "k8s.io/kubernetes/pkg/apis/apps"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
|
||||
|
|
|
@ -16,4 +16,5 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=authentication.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
package authentication // import "k8s.io/kubernetes/pkg/apis/authentication"
|
||||
|
|
|
@ -17,4 +17,5 @@ limitations under the License.
|
|||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
|
||||
// +groupName=authentication.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
|
||||
|
|
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=authorization.k8s.io
|
||||
package authorization // import "k8s.io/kubernetes/pkg/apis/authorization"
|
||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=authorization.k8s.io
|
||||
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package autoscaling // import "k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package batch // import "k8s.io/kubernetes/pkg/apis/batch"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1 // import "k8s.io/kubernetes/pkg/apis/batch/v1"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
|
||||
|
|
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=certificates.k8s.io
|
||||
package certificates // import "k8s.io/kubernetes/pkg/apis/certificates"
|
||||
|
|
|
@ -17,5 +17,6 @@ limitations under the License.
|
|||
// +groupName=certificates.k8s.io
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package componentconfig // import "k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package extensions // import "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
|
|
|
@ -18,5 +18,6 @@ limitations under the License.
|
|||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
|
|
|
@ -16,5 +16,6 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=imagepolicy.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package imagepolicy // import "k8s.io/kubernetes/pkg/apis/imagepolicy"
|
||||
|
|
|
@ -17,5 +17,6 @@ limitations under the License.
|
|||
// +groupName=imagepolicy.k8s.io
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1"
|
||||
|
|
|
@ -15,5 +15,6 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package policy // import "k8s.io/kubernetes/pkg/apis/policy"
|
||||
|
|
|
@ -20,4 +20,5 @@ limitations under the License.
|
|||
// Package policy is for any kind of policy object. Suitable examples, even if
|
||||
// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
|
||||
// NetworkPolicy, etc.
|
||||
// +k8s:openapi-gen=true
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
|
||||
|
|
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
package rbac // import "k8s.io/kubernetes/pkg/apis/rbac"
|
||||
|
|
|
@ -17,5 +17,6 @@ limitations under the License.
|
|||
// +groupName=rbac.authorization.k8s.io
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
|
||||
|
|
|
@ -16,4 +16,5 @@ limitations under the License.
|
|||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=storage.k8s.io
|
||||
// +g8k:openapi-gen=true
|
||||
package storage // import "k8s.io/kubernetes/pkg/apis/storage"
|
||||
|
|
|
@ -17,4 +17,5 @@ limitations under the License.
|
|||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
|
||||
// +groupName=storage.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
|
||||
|
|
|
@ -43,6 +43,7 @@ import (
|
|||
//
|
||||
// +k8s:deepcopy-gen=true
|
||||
// +protobuf=true
|
||||
// +k8s:openapi-gen=true
|
||||
type TypeMeta struct {
|
||||
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
||||
|
@ -96,6 +97,7 @@ const (
|
|||
//
|
||||
// +k8s:deepcopy-gen=true
|
||||
// +protobuf=true
|
||||
// +k8s:openapi-gen=true
|
||||
type RawExtension struct {
|
||||
// Raw is the underlying serialization of this object.
|
||||
//
|
||||
|
@ -114,6 +116,7 @@ type RawExtension struct {
|
|||
//
|
||||
// +k8s:deepcopy-gen=true
|
||||
// +protobuf=true
|
||||
// +k8s:openapi-gen=true
|
||||
type Unknown struct {
|
||||
TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`
|
||||
// Raw will hold the complete serialized object which couldn't be matched
|
||||
|
|
|
@ -16,4 +16,5 @@ limitations under the License.
|
|||
|
||||
// Package version supplies version information collected at build time to
|
||||
// kubernetes components.
|
||||
// +k8s:openapi-gen=true
|
||||
package version // import "k8s.io/kubernetes/pkg/version"
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
// Event represents a single event to a watched resource.
|
||||
//
|
||||
// +protobuf=true
|
||||
// +k8s:openapi-gen=true
|
||||
type Event struct {
|
||||
Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
|
||||
|
||||
|
|
Loading…
Reference in New Issue