From 350f8f2a8c347dc41e4300f5fed8d6eec4324d72 Mon Sep 17 00:00:00 2001 From: Amit Moralwar Date: Thu, 13 Nov 2025 16:37:53 +0530 Subject: [PATCH] Update v2.py fixed ref_name attributeError for dict bug --- fastapi/_compat/v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/_compat/v2.py b/fastapi/_compat/v2.py index 74a25d42b..99fa43036 100644 --- a/fastapi/_compat/v2.py +++ b/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]