mirror of https://github.com/tiangolo/fastapi.git
Merge 931dc1fbe1 into 272204c0c7
This commit is contained in:
commit
97d3bbf2c2
|
|
@ -384,7 +384,10 @@ def _remap_definitions_and_field_mappings(
|
||||||
Dict[str, Any],
|
Dict[str, Any],
|
||||||
]:
|
]:
|
||||||
old_name_to_new_name_map = {}
|
old_name_to_new_name_map = {}
|
||||||
for field_key, schema in field_mapping.items():
|
for field_key, schema in sorted(
|
||||||
|
field_mapping.items(),
|
||||||
|
key=lambda x: model_name_map.get(x[0][0].type_, ""),
|
||||||
|
):
|
||||||
model = field_key[0].type_
|
model = field_key[0].type_
|
||||||
if model not in model_name_map or "$ref" not in schema:
|
if model not in model_name_map or "$ref" not in schema:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue