We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb8c242 commit 8d2710fCopy full SHA for 8d2710f
1 file changed
src/types.rs
@@ -72,9 +72,12 @@ impl JsonSchema for HeaderValue {
72
}
73
74
fn json_schema(_generator: &mut SchemaGenerator) -> Schema {
75
- // Kubernetes structural schemas forbid `type` inside `anyOf` items,
76
- // so we emit the branches without top-level `type`.
+ // Kubernetes structural schemas require `type` on `additionalProperties`,
+ // but HeaderValue is a string-or-object union so no single type works.
77
+ // `x-kubernetes-preserve-unknown-fields` exempts us from that requirement.
78
+ // The `anyOf` items must not set `type` (structural schema rule).
79
json_schema!({
80
+ "x-kubernetes-preserve-unknown-fields": true,
81
"anyOf": [
82
{},
83
{
0 commit comments