Skip to content

Commit

Permalink
test(stackable-versioned): Add CustomResource derive to test inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Nov 28, 2024
1 parent 09a7419 commit 8aa8391
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
)
)]
// ---
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
Expand Down
16 changes: 16 additions & 0 deletions crates/stackable-versioned-macros/fixtures/inputs/k8s/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct FooSpec {
bar: usize,

Expand All @@ -23,6 +31,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "bar.example.org", plural = "bars"))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct BarSpec {
baz: String,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct FooSpec {
bar: usize,

Expand All @@ -24,6 +32,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "bar.example.org", plural = "bars"))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct BarSpec {
baz: String,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
)
)]
// ---
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8aa8391

Please sign in to comment.