Browse Source
Update v2.py
fixed ref_name attributeError for dict bug
pull/14348/head
Amit Moralwar
8 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
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] |
|
|
|
|