You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [MkDocs usage in Griffe's documentation](https://mkdocstrings.github.io/griffe/extensions/#in-mkdocs).
62
+
63
+
## Configuration Options
64
+
65
+
### `extra_bases`
66
+
67
+
By default, the extension detects classes that directly inherit from `pydantic.BaseModel`. You can configure additional base classes to be detected using the `extra_bases` option:
68
+
69
+
```yaml
70
+
extensions:
71
+
- griffe_pydantic:
72
+
extra_bases:
73
+
- sqlmodel.SQLModel
74
+
- my_package.CustomBaseModel
75
+
```
76
+
77
+
This is useful when working with libraries that provide their own base classes which inherit from `pydantic.BaseModel`, such as:
78
+
79
+
- `SQLModel`from the SQLModel library
80
+
- Custom base classes in your own codebase
81
+
- Third-party libraries that extend Pydantic models
82
+
83
+
The extension will detect any class that inherits from these base classes, as long as the base class ultimately inherits from `pydantic.BaseModel`. This enables proper documentation generation for models that use custom or third-party Pydantic-based base classes.
0 commit comments