Griffe extension for Pydantic.
pip install griffe-pydantic
griffe dump mypackage -e griffe_pydantic
See command-line usage in Griffe's documentation.
import griffe
griffe.load(
"mypackage",
extensions=griffe.load_extensions(
[{"griffe_pydantic": {"schema": True}}]
)
)
See programmatic usage in Griffe's documentation.
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_pydantic:
schema: true