removed schema realms, fixed fixture generations, added dynamic type resolution for validation based on type and kind discriminators for filters
This commit is contained in:
@ -22,6 +22,27 @@ impl std::ops::DerefMut for Schema {
|
||||
}
|
||||
}
|
||||
|
||||
impl Schema {
|
||||
/// Returns true if the schema acts purely as a type pointer (composition without overriding constraints)
|
||||
pub fn is_proxy(&self) -> bool {
|
||||
self.obj.properties.is_none()
|
||||
&& self.obj.pattern_properties.is_none()
|
||||
&& self.obj.additional_properties.is_none()
|
||||
&& self.obj.required.is_none()
|
||||
&& self.obj.dependencies.is_none()
|
||||
&& self.obj.items.is_none()
|
||||
&& self.obj.prefix_items.is_none()
|
||||
&& self.obj.contains.is_none()
|
||||
&& self.obj.format.is_none()
|
||||
&& self.obj.enum_.is_none()
|
||||
&& self.obj.const_.is_none()
|
||||
&& self.obj.cases.is_none()
|
||||
&& self.obj.one_of.is_none()
|
||||
&& self.obj.not.is_none()
|
||||
&& self.obj.family.is_none()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'de> Deserialize<'de> for Schema {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user