From cd18f53179cbf7f5e963dec86c0ecb338bac0cdb Mon Sep 17 00:00:00 2001 From: clux Date: Mon, 14 Oct 2024 22:13:07 +0100 Subject: [PATCH] Fix names for APIResource types for #52 Signed-off-by: clux --- justfile | 1 + k8s-pb/src/api/apidiscovery/v2/mod.rs | 4 ++-- k8s-pb/src/api/apidiscovery/v2beta1/mod.rs | 4 ++-- k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/justfile b/justfile index 9b704a4..444c9ba 100644 --- a/justfile +++ b/justfile @@ -81,6 +81,7 @@ names: #!/usr/bin/env bash # Retain original names (prost doesn't let you bypass its renaming) rg 'ApiService' k8s-pb -l | xargs sd 'ApiService' 'APIService' + rg 'ApiResource' k8s-pb -l | xargs sd 'ApiResource' 'APIResource' rg 'CsiDriver' k8s-pb -l | xargs sd 'CsiDriver' 'CSIDriver' rg 'CsiStorage' k8s-pb -l | xargs sd 'CsiStorage' 'CSIStorage' rg 'CsiNode' k8s-pb -l | xargs sd 'CsiNode' 'CSINode' diff --git a/k8s-pb/src/api/apidiscovery/v2/mod.rs b/k8s-pb/src/api/apidiscovery/v2/mod.rs index a2f5615..7a203b3 100644 --- a/k8s-pb/src/api/apidiscovery/v2/mod.rs +++ b/k8s-pb/src/api/apidiscovery/v2/mod.rs @@ -36,7 +36,7 @@ pub struct ApiGroupDiscoveryList { } /// APIResourceDiscovery provides information about an API resource for discovery. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ApiResourceDiscovery { +pub struct APIResourceDiscovery { /// resource is the plural name of the resource. This is used in the URL path and is the unique identifier /// for this resource across all versions in the API group. /// Resources with non-empty groups are located at /apis/// @@ -122,7 +122,7 @@ pub struct ApiVersionDiscovery { /// +listType=map /// +listMapKey=resource #[prost(message, repeated, tag = "2")] - pub resources: ::prost::alloc::vec::Vec, + pub resources: ::prost::alloc::vec::Vec, /// freshness marks whether a group version's discovery document is up to date. /// "Current" indicates the discovery document was recently /// refreshed. "Stale" indicates the discovery document could not diff --git a/k8s-pb/src/api/apidiscovery/v2beta1/mod.rs b/k8s-pb/src/api/apidiscovery/v2beta1/mod.rs index a2f5615..7a203b3 100644 --- a/k8s-pb/src/api/apidiscovery/v2beta1/mod.rs +++ b/k8s-pb/src/api/apidiscovery/v2beta1/mod.rs @@ -36,7 +36,7 @@ pub struct ApiGroupDiscoveryList { } /// APIResourceDiscovery provides information about an API resource for discovery. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ApiResourceDiscovery { +pub struct APIResourceDiscovery { /// resource is the plural name of the resource. This is used in the URL path and is the unique identifier /// for this resource across all versions in the API group. /// Resources with non-empty groups are located at /apis/// @@ -122,7 +122,7 @@ pub struct ApiVersionDiscovery { /// +listType=map /// +listMapKey=resource #[prost(message, repeated, tag = "2")] - pub resources: ::prost::alloc::vec::Vec, + pub resources: ::prost::alloc::vec::Vec, /// freshness marks whether a group version's discovery document is up to date. /// "Current" indicates the discovery document was recently /// refreshed. "Stale" indicates the discovery document could not diff --git a/k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs b/k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs index 0370d75..9b7c3d3 100644 --- a/k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs @@ -38,7 +38,7 @@ pub struct ApiGroupList { } /// APIResource specifies the name of a resource and whether it is namespaced. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ApiResource { +pub struct APIResource { /// name is the plural name of the resource. #[prost(string, optional, tag = "1")] pub name: ::core::option::Option<::prost::alloc::string::String>, @@ -88,14 +88,14 @@ pub struct ApiResource { /// resources supported in a specific group and version, and if the resource /// is namespaced. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ApiResourceList { +pub struct APIResourceList { /// groupVersion is the group and version this APIResourceList is for. #[prost(string, optional, tag = "1")] pub group_version: ::core::option::Option<::prost::alloc::string::String>, /// resources contains the name of the resources and if they are namespaced. /// +listType=atomic #[prost(message, repeated, tag = "2")] - pub resources: ::prost::alloc::vec::Vec, + pub resources: ::prost::alloc::vec::Vec, } /// APIVersions lists the versions that are available, to allow clients to /// discover the API at /api, which is the root path of the legacy v1 API.