Skip to content

Commit

Permalink
✨ Support Python internal description on Pydantic model's docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Apr 1, 2021
1 parent 5614b94 commit 00da79c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fastapi/utils.py
Expand Up @@ -26,6 +26,7 @@ def get_model_definitions(
)
definitions.update(m_definitions)
model_name = model_name_map[model]
m_schema["description"] = m_schema["description"].split("\f")[0]
definitions[model_name] = m_schema
return definitions

Expand Down

0 comments on commit 00da79c

Please sign in to comment.