Skip to content

Commit

Permalink
docs: Simplify deprecated argument doc comments
Browse files Browse the repository at this point in the history
Signed-off-by: Techassi <[email protected]>
  • Loading branch information
Techassi committed Feb 19, 2025
1 parent 3500613 commit fde6355
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions kube-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,32 +164,14 @@ mod resource;
/// ## `#[kube(deprecated [= "warning"])]`
/// Sets the `deprecated` property to `true`.
///
/// ```
/// # use serde::{Serialize, Deserialize};
/// # use kube::core::{Resource, CustomResourceExt};
/// # use kube_derive::CustomResource;
/// # use schemars::JsonSchema;
///
/// #[derive(CustomResource, Clone, Debug, Deserialize, Serialize, JsonSchema)]
/// #[kube(group = "clux.dev", version = "v1", kind = "Foo", namespaced, deprecated)]
/// struct FooSpec {
/// info: String,
/// }
/// ```ignore
/// #[kube(deprecated)]
/// ```
///
/// Optionally, the `deprecationWarning` property can be set using the following example.
///
/// ```
/// # use serde::{Serialize, Deserialize};
/// # use kube::core::{Resource, CustomResourceExt};
/// # use kube_derive::CustomResource;
/// # use schemars::JsonSchema;
///
/// #[derive(CustomResource, Clone, Debug, Deserialize, Serialize, JsonSchema)]
/// #[kube(group = "clux.dev", version = "v1", kind = "Foo", namespaced, deprecated = "my warning")]
/// struct FooSpec {
/// info: String,
/// }
/// ```ignore
/// #[kube(deprecated = "Replaced by other CRD")]
/// ```
///
/// ## `#[kube(rule = Rule::new("self == oldSelf").message("field is immutable"))]`
Expand Down

0 comments on commit fde6355

Please sign in to comment.