mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
fix: save reference when using allOf / oneOf / anyOf (#1208)
This commit is contained in:
parent
f950b8ca95
commit
5b999ac6f1
1 changed files with 5 additions and 1 deletions
|
|
@ -53,7 +53,11 @@ def _prune_unused_defs(schema: dict) -> dict:
|
|||
if skip_defs and k == "$defs":
|
||||
continue
|
||||
|
||||
walk(v, current_def=current_def)
|
||||
if k in ["allOf", "oneOf", "anyOf"]:
|
||||
for child in v:
|
||||
walk(child, current_def=current_def)
|
||||
else:
|
||||
walk(v, current_def=current_def)
|
||||
|
||||
elif isinstance(node, list):
|
||||
for v in node:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue