From a20ae3953b583e5e16f9a8e8e0146683aa49f4f2 Mon Sep 17 00:00:00 2001 From: Bismita Guha <43119923+bismitaguha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:40:31 +0530 Subject: [PATCH] Remove optional from core docs for 'Type' (#88029) * Remove optional from core docs for 'Type' * Regenerate protobuf and openapi docs * Regenerate protobuf and openapi docs --- api/openapi-spec/swagger.json | 3 +++ staging/src/k8s.io/api/core/v1/generated.proto | 1 - staging/src/k8s.io/api/core/v1/types.go | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index a65cdf28987..54500e1d50e 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -6955,6 +6955,9 @@ "type": "string" } }, + "required": [ + "type" + ], "type": "object" }, "io.k8s.api.core.v1.LimitRangeList": { diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index f738aac831f..6ca42710971 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -1921,7 +1921,6 @@ message LimitRange { // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. message LimitRangeItem { // Type of resource that this limit applies to. - // +optional optional string type = 1; // Max usage constraints on this kind by resource name. diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 6655fcefbea..fb350175dc8 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -5209,8 +5209,7 @@ const ( // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. type LimitRangeItem struct { // Type of resource that this limit applies to. - // +optional - Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` + Type LimitType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` // Max usage constraints on this kind by resource name. // +optional Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"`