Skip to content

Commit

Permalink
breaking rename of #[kube(struct)]
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 10, 2023
1 parent dcb726b commit 881ee63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/crd_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize};
version = "v1",
kind = "Foo",
plural = "fooz",
struct = "FooCrd",
generate = "FooCrd",
namespaced,
status = "FooStatus",
derive = "PartialEq",
Expand Down
2 changes: 1 addition & 1 deletion kube-derive/src/custom_resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct KubeAttrs {
group: String,
version: String,
kind: String,
#[darling(rename = "struct")]
#[darling(rename = "generate")]
kind_struct: Option<String>,
/// lowercase plural of kind (inferred if omitted)
plural: Option<String>,
Expand Down
4 changes: 2 additions & 2 deletions kube-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mod custom_resource;
/// ## `#[kube(namespaced)]`
/// To specify that this is a namespaced resource rather than cluster level.
///
/// ## `#[kube(struct = "StructName")]`
/// ## `#[kube(generate = "StructName")]`
/// Customize the name of the generated root struct (defaults to `kind`).
///
/// ## `#[kube(crates(kube_core = "::kube::core"))]`
Expand Down Expand Up @@ -153,7 +153,7 @@ mod custom_resource;
/// group = "clux.dev",
/// version = "v1",
/// kind = "Foo",
/// struct = "FooCrd",
/// generate = "FooCrd",
/// namespaced,
/// status = "FooStatus",
/// derive = "PartialEq",
Expand Down

0 comments on commit 881ee63

Please sign in to comment.