Browse Source

Update v2.py

fixed ref_name attributeError for dict bug
pull/14348/head
Amit Moralwar 8 months ago
committed by GitHub
parent
commit
350f8f2a8c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fastapi/_compat/v2.py

2
fastapi/_compat/v2.py

@ -264,7 +264,7 @@ def _replace_refs(
if key == "$ref":
print(f"schema:{schema}")
# ref_name = schema["$ref"].split("/")[-1]
ref_name = schema["$ref"]
ref_value = schema["$ref"]
if isinstance(ref_value, str):
# Normal case
ref_name = ref_value.split("/")[-1]

Loading…
Cancel
Save