Skip to content

Commit

Permalink
updated to auto docs pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Aug 13, 2024
1 parent d5cce50 commit cb5abaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
# Use this for generating API docs
"sphinx.ext.autodoc",
# This can parse google style docstrings
"sphinxcontrib.autodoc_pydantic",
# Used for BaseModel autodoc
"sphinx.ext.napoleon",
# For linking to external sphinx documentation
"sphinx.ext.intersphinx",
Expand Down Expand Up @@ -84,6 +86,10 @@
("py:class", "starlette.responses.JSONResponse"),
]

# pydantic models
autodoc_pydantic_model_show_json = True
autodoc_pydantic_model_show_config_summary = False

# Both the class’ and the __init__ method’s docstring are concatenated and
# inserted into the main body of the autoclass directive
autoclass_content = "both"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dev = [
"pytest-cov",
"ruff",
"sphinx-autobuild",
"autodoc-pydantic",
"sphinx-copybutton",
"sphinx-design",
"sphinxcontrib-openapi",
Expand Down

0 comments on commit cb5abaf

Please sign in to comment.