diff --git a/src/schema.rs b/src/schema.rs index 75995d3..8035935 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -68,7 +68,7 @@ pub enum Type { Integer(IntegerType), Object(ObjectType), Array(ArrayType), - Boolean {}, + Boolean(BooleanType), } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] @@ -214,6 +214,13 @@ pub struct ArrayType { pub unique_items: bool, } +#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct BooleanType { + #[serde(rename = "enum", default, skip_serializing_if = "Vec::is_empty")] + pub enumeration: Vec>, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "lowercase")] pub enum NumberFormat {