Skip to content

Commit 17426a5

Browse files
Remove arbitrary fields from schema
Signed-off-by: Danil-Grigorev <[email protected]>
1 parent 7cc56ac commit 17426a5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

kube-core/src/schema.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ struct SchemaObject {
5454
/// and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).
5555
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
5656
instance_type: Option<SingleOrVec<InstanceType>>,
57+
/// The `format` keyword.
58+
///
59+
/// See [JSON Schema Validation 7. A Vocabulary for Semantic Content With "format"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).
60+
#[serde(skip_serializing_if = "Option::is_none")]
61+
format: Option<String>,
5762
/// The `enum` keyword.
5863
///
5964
/// See [JSON Schema Validation 6.1.2. "enum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)
@@ -112,9 +117,6 @@ struct Metadata {
112117
/// See [JSON Schema Validation 9.2. "default"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2).
113118
#[serde(skip_serializing_if = "Option::is_none", deserialize_with = "allow_null")]
114119
default: Option<Value>,
115-
/// Arbitrary data.
116-
#[serde(flatten)]
117-
other: Value,
118120
}
119121

120122
/// Properties of a [`SchemaObject`] which define validation assertions in terms of other schemas.
@@ -131,9 +133,6 @@ struct SubschemaValidation {
131133
/// See [JSON Schema 9.2.1.3. "oneOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).
132134
#[serde(skip_serializing_if = "Option::is_none")]
133135
one_of: Option<Vec<Schema>>,
134-
/// Arbitrary data.
135-
#[serde(flatten)]
136-
other: Value,
137136
}
138137

139138
/// Properties of a [`SchemaObject`] which define validation assertions for arrays.

0 commit comments

Comments
 (0)