Browse Source

Merge 89ec41f5ef into 1d434dec47

pull/10903/merge
Marius van den Beek 2 days ago
committed by GitHub
parent
commit
8e523a50ed
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      fastapi/openapi/utils.py

3
fastapi/openapi/utils.py

@ -489,6 +489,7 @@ def get_openapi(
contact: Optional[Dict[str, Union[str, Any]]] = None,
license_info: Optional[Dict[str, Union[str, Any]]] = None,
separate_input_output_schemas: bool = True,
schema_generator: Optional[GenerateJsonSchema] = None,
) -> Dict[str, Any]:
info: Dict[str, Any] = {"title": title, "version": version}
if summary:
@ -510,7 +511,7 @@ def get_openapi(
operation_ids: Set[str] = set()
all_fields = get_fields_from_routes(list(routes or []) + list(webhooks or []))
model_name_map = get_compat_model_name_map(all_fields)
schema_generator = GenerateJsonSchema(ref_template=REF_TEMPLATE)
schema_generator = schema_generator or GenerateJsonSchema(ref_template=REF_TEMPLATE)
field_mapping, definitions = get_definitions(
fields=all_fields,
schema_generator=schema_generator,

Loading…
Cancel
Save