[ruff] Update schemars to v1 (#20942)
This commit is contained in:
@@ -274,15 +274,11 @@ impl<'de> serde::de::Deserialize<'de> for NameImports {
|
||||
|
||||
#[cfg(feature = "schemars")]
|
||||
impl schemars::JsonSchema for NameImports {
|
||||
fn schema_name() -> String {
|
||||
"NameImports".to_string()
|
||||
fn schema_name() -> std::borrow::Cow<'static, str> {
|
||||
std::borrow::Cow::Borrowed("NameImports")
|
||||
}
|
||||
|
||||
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||
schemars::schema::SchemaObject {
|
||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||
..Default::default()
|
||||
}
|
||||
.into()
|
||||
fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema {
|
||||
schemars::json_schema!({ "type": "string" })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user