File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 33
33
# Use this for generating API docs
34
34
"sphinx.ext.autodoc" ,
35
35
# This can parse google style docstrings
36
+ "sphinxcontrib.autodoc_pydantic" ,
37
+ # Used for BaseModel autodoc
36
38
"sphinx.ext.napoleon" ,
37
39
# For linking to external sphinx documentation
38
40
"sphinx.ext.intersphinx" ,
84
86
("py:class" , "starlette.responses.JSONResponse" ),
85
87
]
86
88
89
+ # pydantic models
90
+ autodoc_pydantic_model_show_json = True
91
+ autodoc_pydantic_model_show_config_summary = False
92
+
87
93
# Both the class’ and the __init__ method’s docstring are concatenated and
88
94
# inserted into the main body of the autoclass directive
89
95
autoclass_content = "both"
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ dev = [
42
42
" pytest-cov" ,
43
43
" ruff" ,
44
44
" sphinx-autobuild" ,
45
+ " autodoc-pydantic" ,
45
46
" sphinx-copybutton" ,
46
47
" sphinx-design" ,
47
48
" sphinxcontrib-openapi" ,
You can’t perform that action at this time.
0 commit comments