mirror of
https://github.com/fastapi/fastapi.git
synced 2026-07-18 19:03:14 -04:00
✨ Support Python internal description on Pydantic model's docstring (#3032)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b1d0f1e970
commit
30b3905ef3
@@ -37,6 +37,8 @@ def get_model_definitions(
|
||||
)
|
||||
definitions.update(m_definitions)
|
||||
model_name = model_name_map[model]
|
||||
if "description" in m_schema:
|
||||
m_schema["description"] = m_schema["description"].split("\f")[0]
|
||||
definitions[model_name] = m_schema
|
||||
return definitions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user