Commit 702f55e6 authored by mbohlool's avatar mbohlool

Add +k8s:openapi-gen tag to API types

parent 6ba271b9
/*
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 ( ...@@ -25,8 +25,12 @@ import (
type TestType struct { type TestType struct {
unversioned.TypeMeta `json:",inline"` 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 { type TestTypeList struct {
......
...@@ -16,5 +16,5 @@ limitations under the License. ...@@ -16,5 +16,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation // +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation
// +k8s:openapi-gen=true
package v1beta1 // import "k8s.io/kubernetes/federation/apis/federation/v1beta1" package v1beta1 // import "k8s.io/kubernetes/federation/apis/federation/v1beta1"
...@@ -54,6 +54,7 @@ var ( ...@@ -54,6 +54,7 @@ var (
// int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster // 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. // than operations on inf.Dec for values that can be represented as int64.
// +k8s:openapi-gen=true
type int64Amount struct { type int64Amount struct {
value int64 value int64
scale Scale scale Scale
......
...@@ -93,6 +93,7 @@ import ( ...@@ -93,6 +93,7 @@ import (
// +protobuf.embed=string // +protobuf.embed=string
// +protobuf.options.marshal=false // +protobuf.options.marshal=false
// +protobuf.options.(gogoproto.goproto_stringer)=false // +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:openapi-gen=true
type Quantity struct { type Quantity struct {
// i is the quantity in int64 scaled form, if d.Dec == nil // i is the quantity in int64 scaled form, if d.Dec == nil
i int64Amount i int64Amount
......
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package // +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true
package unversioned // import "k8s.io/kubernetes/pkg/api/unversioned" package unversioned // import "k8s.io/kubernetes/pkg/api/unversioned"
...@@ -16,6 +16,7 @@ limitations under the License. ...@@ -16,6 +16,7 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api // +k8s:conversion-gen=k8s.io/kubernetes/pkg/api
// +k8s:openapi-gen=true
// Package v1 is the v1 version of the API. // Package v1 is the v1 version of the API.
package v1 // import "k8s.io/kubernetes/pkg/api/v1" package v1 // import "k8s.io/kubernetes/pkg/api/v1"
...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:openapi-gen=true
package abac package abac
import "k8s.io/kubernetes/pkg/api/unversioned" import "k8s.io/kubernetes/pkg/api/unversioned"
......
...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:openapi-gen=true
package v0 package v0
import "k8s.io/kubernetes/pkg/api/unversioned" import "k8s.io/kubernetes/pkg/api/unversioned"
......
...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:openapi-gen=true
package v1beta1 package v1beta1
import "k8s.io/kubernetes/pkg/api/unversioned" import "k8s.io/kubernetes/pkg/api/unversioned"
......
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package apps // import "k8s.io/kubernetes/pkg/apis/apps" package apps // import "k8s.io/kubernetes/pkg/apis/apps"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
...@@ -16,4 +16,5 @@ limitations under the License. ...@@ -16,4 +16,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +groupName=authentication.k8s.io // +groupName=authentication.k8s.io
// +k8s:openapi-gen=true
package authentication // import "k8s.io/kubernetes/pkg/apis/authentication" package authentication // import "k8s.io/kubernetes/pkg/apis/authentication"
...@@ -17,4 +17,5 @@ limitations under the License. ...@@ -17,4 +17,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
// +groupName=authentication.k8s.io // +groupName=authentication.k8s.io
// +k8s:openapi-gen=true
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
...@@ -15,6 +15,7 @@ limitations under the License. ...@@ -15,6 +15,7 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +groupName=authorization.k8s.io // +groupName=authorization.k8s.io
package authorization // import "k8s.io/kubernetes/pkg/apis/authorization" package authorization // import "k8s.io/kubernetes/pkg/apis/authorization"
...@@ -16,6 +16,7 @@ limitations under the License. ...@@ -16,6 +16,7 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
// +k8s:openapi-gen=true
// +groupName=authorization.k8s.io // +groupName=authorization.k8s.io
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package autoscaling // import "k8s.io/kubernetes/pkg/apis/autoscaling" package autoscaling // import "k8s.io/kubernetes/pkg/apis/autoscaling"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:openapi-gen=true
package v1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v1" package v1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package batch // import "k8s.io/kubernetes/pkg/apis/batch" package batch // import "k8s.io/kubernetes/pkg/apis/batch"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
package v1 // import "k8s.io/kubernetes/pkg/apis/batch/v1" package v1 // import "k8s.io/kubernetes/pkg/apis/batch/v1"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
...@@ -15,6 +15,7 @@ limitations under the License. ...@@ -15,6 +15,7 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +groupName=certificates.k8s.io // +groupName=certificates.k8s.io
package certificates // import "k8s.io/kubernetes/pkg/apis/certificates" package certificates // import "k8s.io/kubernetes/pkg/apis/certificates"
...@@ -17,5 +17,6 @@ limitations under the License. ...@@ -17,5 +17,6 @@ limitations under the License.
// +groupName=certificates.k8s.io // +groupName=certificates.k8s.io
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package componentconfig // import "k8s.io/kubernetes/pkg/apis/componentconfig" package componentconfig // import "k8s.io/kubernetes/pkg/apis/componentconfig"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1"
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package extensions // import "k8s.io/kubernetes/pkg/apis/extensions" package extensions // import "k8s.io/kubernetes/pkg/apis/extensions"
...@@ -18,5 +18,6 @@ limitations under the License. ...@@ -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/extensions
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" package v1beta1 // import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
...@@ -16,5 +16,6 @@ limitations under the License. ...@@ -16,5 +16,6 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +groupName=imagepolicy.k8s.io // +groupName=imagepolicy.k8s.io
// +k8s:openapi-gen=true
package imagepolicy // import "k8s.io/kubernetes/pkg/apis/imagepolicy" package imagepolicy // import "k8s.io/kubernetes/pkg/apis/imagepolicy"
...@@ -17,5 +17,6 @@ limitations under the License. ...@@ -17,5 +17,6 @@ limitations under the License.
// +groupName=imagepolicy.k8s.io // +groupName=imagepolicy.k8s.io
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1"
...@@ -15,5 +15,6 @@ limitations under the License. ...@@ -15,5 +15,6 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
package policy // import "k8s.io/kubernetes/pkg/apis/policy" package policy // import "k8s.io/kubernetes/pkg/apis/policy"
...@@ -20,4 +20,5 @@ limitations under the License. ...@@ -20,4 +20,5 @@ limitations under the License.
// Package policy is for any kind of policy object. Suitable examples, even if // Package policy is for any kind of policy object. Suitable examples, even if
// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, // they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
// NetworkPolicy, etc. // NetworkPolicy, etc.
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
...@@ -15,6 +15,7 @@ limitations under the License. ...@@ -15,6 +15,7 @@ limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +groupName=rbac.authorization.k8s.io // +groupName=rbac.authorization.k8s.io
package rbac // import "k8s.io/kubernetes/pkg/apis/rbac" package rbac // import "k8s.io/kubernetes/pkg/apis/rbac"
...@@ -17,5 +17,6 @@ limitations under the License. ...@@ -17,5 +17,6 @@ limitations under the License.
// +groupName=rbac.authorization.k8s.io // +groupName=rbac.authorization.k8s.io
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
// +k8s:openapi-gen=true
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
...@@ -16,4 +16,5 @@ limitations under the License. ...@@ -16,4 +16,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +groupName=storage.k8s.io // +groupName=storage.k8s.io
// +g8k:openapi-gen=true
package storage // import "k8s.io/kubernetes/pkg/apis/storage" package storage // import "k8s.io/kubernetes/pkg/apis/storage"
...@@ -17,4 +17,5 @@ limitations under the License. ...@@ -17,4 +17,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
// +groupName=storage.k8s.io // +groupName=storage.k8s.io
// +k8s:openapi-gen=true
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/storage/v1beta1" package v1beta1 // import "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
...@@ -43,6 +43,7 @@ import ( ...@@ -43,6 +43,7 @@ import (
// //
// +k8s:deepcopy-gen=true // +k8s:deepcopy-gen=true
// +protobuf=true // +protobuf=true
// +k8s:openapi-gen=true
type TypeMeta struct { type TypeMeta struct {
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` 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"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
...@@ -96,6 +97,7 @@ const ( ...@@ -96,6 +97,7 @@ const (
// //
// +k8s:deepcopy-gen=true // +k8s:deepcopy-gen=true
// +protobuf=true // +protobuf=true
// +k8s:openapi-gen=true
type RawExtension struct { type RawExtension struct {
// Raw is the underlying serialization of this object. // Raw is the underlying serialization of this object.
// //
...@@ -114,6 +116,7 @@ type RawExtension struct { ...@@ -114,6 +116,7 @@ type RawExtension struct {
// //
// +k8s:deepcopy-gen=true // +k8s:deepcopy-gen=true
// +protobuf=true // +protobuf=true
// +k8s:openapi-gen=true
type Unknown struct { type Unknown struct {
TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"` TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`
// Raw will hold the complete serialized object which couldn't be matched // Raw will hold the complete serialized object which couldn't be matched
......
...@@ -16,4 +16,5 @@ limitations under the License. ...@@ -16,4 +16,5 @@ limitations under the License.
// Package version supplies version information collected at build time to // Package version supplies version information collected at build time to
// kubernetes components. // kubernetes components.
// +k8s:openapi-gen=true
package version // import "k8s.io/kubernetes/pkg/version" package version // import "k8s.io/kubernetes/pkg/version"
...@@ -25,6 +25,7 @@ import ( ...@@ -25,6 +25,7 @@ import (
// Event represents a single event to a watched resource. // Event represents a single event to a watched resource.
// //
// +protobuf=true // +protobuf=true
// +k8s:openapi-gen=true
type Event struct { type Event struct {
Type string `json:"type" protobuf:"bytes,1,opt,name=type"` Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment