global: adding support for safe lengths

This commit is contained in:
nym21
2026-05-06 15:33:07 +02:00
parent da7671744f
commit 086bfd9938
177 changed files with 2445 additions and 2049 deletions

View File

@@ -270,9 +270,7 @@ fn extract_response_kind(operation: &Operation, spec: &Spec) -> ResponseKind {
fn schema_name_from_content(content: &oas3::spec::MediaType) -> Option<String> {
match content.schema.as_ref()? {
ObjectOrReference::Ref { ref_path, .. } => {
Some(ref_to_type_name(ref_path)?.to_string())
}
ObjectOrReference::Ref { ref_path, .. } => Some(ref_to_type_name(ref_path)?.to_string()),
ObjectOrReference::Object(schema) => schema_to_type_name(schema),
}
}
@@ -288,7 +286,9 @@ fn is_numeric_schema(spec: &Spec, name: &str) -> bool {
};
matches!(
schema.schema_type.as_ref(),
Some(SchemaTypeSet::Single(SchemaType::Integer | SchemaType::Number))
Some(SchemaTypeSet::Single(
SchemaType::Integer | SchemaType::Number
))
)
}