Browse Source

Merge ac4eb4a965 into 8032e21418

pull/11357/merge
kshramt 1 day ago
committed by GitHub
parent
commit
6a71664e09
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      fastapi/openapi/utils.py

4
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,8 @@ 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)
if schema_generator is None:
schema_generator = GenerateJsonSchema(ref_template=REF_TEMPLATE)
field_mapping, definitions = get_definitions(
fields=all_fields,
schema_generator=schema_generator,

Loading…
Cancel
Save