-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use custom Base Model This allows us to set config to control Pydantic behaviour. * [GENERATE] Pydantic models from JSON Schema --------- Co-authored-by: dapla-bot[bot] <143391972+dapla-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3d03a99
commit 558092c
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
generated/python/datadoc_model/datadoc_model/datadoc_base_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from pydantic import ConfigDict, BaseModel | ||
|
||
|
||
class DatadocBaseModel(BaseModel): | ||
"""Defines configuration which applies to all Models in this package.""" | ||
|
||
model_config = ConfigDict(validate_assignment=True, use_enum_values=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters