This commit is contained in:
Timothy Jaeryang Baek
2026-05-09 07:37:53 +09:00
parent 11e076817a
commit 85c7373f68
2 changed files with 33 additions and 0 deletions

View File

@@ -802,6 +802,13 @@ def resolve_schema(schema, components, resolved_schemas=None):
if 'items' in resolved_schema:
resolved_schema['items'] = resolve_schema(resolved_schema['items'], components)
# Resolve composition keywords (oneOf, anyOf, allOf) which may contain $ref
for keyword in ('oneOf', 'anyOf', 'allOf'):
if keyword in resolved_schema and isinstance(resolved_schema[keyword], list):
resolved_schema[keyword] = [
resolve_schema(inner, components, resolved_schemas) for inner in resolved_schema[keyword]
]
return resolved_schema