From e726ce97fbe2d90c3da6bb20d71f953117e1efbf Mon Sep 17 00:00:00 2001 From: shiyajuan123 <402700696@qq.com> Date: Wed, 3 Mar 2021 15:46:47 +0800 Subject: [PATCH] add descriptions to these event/types.go files --- api/openapi-spec/swagger.json | 8 ++++---- hack/.descriptions_failures | 2 -- staging/src/k8s.io/api/events/v1/generated.proto | 3 +++ staging/src/k8s.io/api/events/v1/types.go | 3 +++ .../k8s.io/api/events/v1/types_swagger_doc_generated.go | 1 + staging/src/k8s.io/api/events/v1beta1/generated.proto | 3 +++ staging/src/k8s.io/api/events/v1beta1/types.go | 3 +++ .../api/events/v1beta1/types_swagger_doc_generated.go | 1 + 8 files changed, 18 insertions(+), 6 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index fd107f2ea00..f04be3ad4b7 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -11023,7 +11023,8 @@ "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "description": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", @@ -11059,7 +11060,6 @@ } }, "required": [ - "metadata", "eventTime" ], "type": "object", @@ -11162,7 +11162,8 @@ "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "description": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", @@ -11198,7 +11199,6 @@ } }, "required": [ - "metadata", "eventTime" ], "type": "object", diff --git a/hack/.descriptions_failures b/hack/.descriptions_failures index d4119314515..0c8aae4f0cb 100644 --- a/hack/.descriptions_failures +++ b/hack/.descriptions_failures @@ -10,8 +10,6 @@ ./staging/src/k8s.io/api/certificates/v1/types.go ./staging/src/k8s.io/api/certificates/v1beta1/types.go ./staging/src/k8s.io/api/core/v1/types.go -./staging/src/k8s.io/api/events/v1/types.go -./staging/src/k8s.io/api/events/v1beta1/types.go ./staging/src/k8s.io/api/extensions/v1beta1/types.go ./staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go ./staging/src/k8s.io/api/flowcontrol/v1beta1/types.go diff --git a/staging/src/k8s.io/api/events/v1/generated.proto b/staging/src/k8s.io/api/events/v1/generated.proto index 690c99e4c5a..04df31b0c1c 100644 --- a/staging/src/k8s.io/api/events/v1/generated.proto +++ b/staging/src/k8s.io/api/events/v1/generated.proto @@ -36,6 +36,9 @@ option go_package = "v1"; // continued existence of events with that Reason. Events should be // treated as informative, best-effort, supplemental data. message Event { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // eventTime is the time when this Event was first observed. It is required. diff --git a/staging/src/k8s.io/api/events/v1/types.go b/staging/src/k8s.io/api/events/v1/types.go index 4bf715872ab..e01a2b21e73 100644 --- a/staging/src/k8s.io/api/events/v1/types.go +++ b/staging/src/k8s.io/api/events/v1/types.go @@ -33,6 +33,9 @@ import ( type Event struct { metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // eventTime is the time when this Event was first observed. It is required. diff --git a/staging/src/k8s.io/api/events/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/events/v1/types_swagger_doc_generated.go index 7255727bb49..797da63bb72 100644 --- a/staging/src/k8s.io/api/events/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/events/v1/types_swagger_doc_generated.go @@ -29,6 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "eventTime": "eventTime is the time when this Event was first observed. It is required.", "series": "series is data about the Event series this event represents or nil if it's a singleton Event.", "reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", diff --git a/staging/src/k8s.io/api/events/v1beta1/generated.proto b/staging/src/k8s.io/api/events/v1beta1/generated.proto index 90b57d8d08a..57e95b9648f 100644 --- a/staging/src/k8s.io/api/events/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/events/v1beta1/generated.proto @@ -36,6 +36,9 @@ option go_package = "v1beta1"; // continued existence of events with that Reason. Events should be // treated as informative, best-effort, supplemental data. message Event { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // eventTime is the time when this Event was first observed. It is required. diff --git a/staging/src/k8s.io/api/events/v1beta1/types.go b/staging/src/k8s.io/api/events/v1beta1/types.go index 796e56ea7da..5bb6f92b22f 100644 --- a/staging/src/k8s.io/api/events/v1beta1/types.go +++ b/staging/src/k8s.io/api/events/v1beta1/types.go @@ -35,6 +35,9 @@ import ( type Event struct { metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // eventTime is the time when this Event was first observed. It is required. diff --git a/staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go index 7f8e162cdd4..0e6bd5a83c5 100644 --- a/staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go @@ -29,6 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "eventTime": "eventTime is the time when this Event was first observed. It is required.", "series": "series is data about the Event series this event represents or nil if it's a singleton Event.", "reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.",