Repository navigation
Conversation
Contributor
Author
|
A default describes how a consumer interprets a missing value, not the data itself, so it belongs to the ingestion step rather than to the exporter. I keep the value in my contract as a custom property for my own tooling. The I closed related issue and I close this PR |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
datacontract export pydantic-modelreads adefaultcustom property on an optional property and emits it as the field default (pydantic.Field(default='NON', pattern=...), or= 'NON'without constraints). Required fields and non-scalar values are ignored.datacontract import pydantic-modelwrites a scalar field default back to the same custom property, so the round trip stays lossless.Closes #1700
uv run pytest)uv run ruff check --fix && uv run ruff format)