Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix names for APIResource types #53

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions k8s-pb/src/api/apidiscovery/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
Expand Down Expand Up @@ -122,7 +122,7 @@ pub struct ApiVersionDiscovery {
/// +listType=map
/// +listMapKey=resource
#[prost(message, repeated, tag = "2")]
pub resources: ::prost::alloc::vec::Vec<ApiResourceDiscovery>,
pub resources: ::prost::alloc::vec::Vec<APIResourceDiscovery>,
/// 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
Expand Down
4 changes: 2 additions & 2 deletions k8s-pb/src/api/apidiscovery/v2beta1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
Expand Down Expand Up @@ -122,7 +122,7 @@ pub struct ApiVersionDiscovery {
/// +listType=map
/// +listMapKey=resource
#[prost(message, repeated, tag = "2")]
pub resources: ::prost::alloc::vec::Vec<ApiResourceDiscovery>,
pub resources: ::prost::alloc::vec::Vec<APIResourceDiscovery>,
/// 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
Expand Down
6 changes: 3 additions & 3 deletions k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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<ApiResource>,
pub resources: ::prost::alloc::vec::Vec<APIResource>,
}
/// 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.
Expand Down