-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Update serialisation schema, implement
CustomConst
serialisa…
…tion (#1005) We fix `model_rebuild` in `tys.py` to update the `model_config` rather than overwrite it. This prevents our config, i.e. `json_scheme_extra.required` from being removed during a `model_rebuild`. We remove most `json_scheme_extra.required` from the schema, using these only for `RootModel`s. This allows us to remove `TaggedSumType`, as well as alleviating us from the need of introducing `TaggedOpaqueType`. The serialisation schema is updated, and is `proptest`ed in #981. Reviewers should verify that the `serde` annotations, the pydantic schema definition, and the generated schemas exactly match that branch. BREAKING CHANGE: * Serialization schema * `Const::const_type` and `Value::const_type` are renamed to `Const::get_type` and `Value::get_type`. These now match several other `get_type` functions. --------- Co-authored-by: Craig Roy <[email protected]>
- Loading branch information
Showing
25 changed files
with
957 additions
and
448 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
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
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
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
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
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
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
Oops, something went wrong.