Fix to schema generation for IPv{4,6}{Address,Interface,Network}#532
Merged
samuelcolvin merged 5 commits intopydantic:masterfrom May 21, 2019
Merged
Fix to schema generation for IPv{4,6}{Address,Interface,Network}#532samuelcolvin merged 5 commits intopydantic:masterfrom
samuelcolvin merged 5 commits intopydantic:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master json-schema-org/json-schema-spec#532 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 14 14
Lines 2271 2271
Branches 447 447
=====================================
Hits 2271 2271 |
Member
|
I think you might also need to update the documentation. |
Contributor
Author
Done, hope I didn't miss another file to update ;) |
| * fix return type hint for ``create_model``, #526 by @dmontagu | ||
| * **Breaking Change:** fix ``.dict(skip_keys=True)`` skipping values set via alias (this involves changing | ||
| ``validate_model()`` to always returns ``Tuple[Dict[str, Any], Set[str], Optional[ValidationError]]``), #517 by @sommd | ||
| * fix to schema generation for ``IPv4Address``, ``IPv6Address``, ``IPv4Interface``, ``IPv6Interface``, ``IPv4Network``, ``IPv6Network`` by @euri10 |
Member
There was a problem hiding this comment.
can you add the PR number here like other changes.
tiangolo
suggested changes
May 21, 2019
…ma-validation.html#rfc.section.7.3.4 Modified tests accordingly
Contributor
Author
Contributor
|
Great, thanks @euri10 ! LGTM |
tiangolo
approved these changes
May 21, 2019
Member
|
awesome. Thank you both. |
gangefors
added a commit
to gangefors/pydantic
that referenced
this pull request
May 31, 2019
* upstream/master: (138 commits) add 'none-any.whl' to pypi upload (pydantic#564) uprev update benchmarks (pydantic#563) cython (pydantic#548) Fix issue with unspecified generic type (pydantic#554) Run dataclass' original __post_init__ before validation (pydantic#560) try to stop annoying warnings in azure pipeline (pydantic#549) azure pipeline failOnStderr: false Azure Pipelines - tests for windows (pydantic#538) Fix JSON Schema for list, tuple, and set, improving interoperability (pydantic#540) uprev. Colors (pydantic#516) Fix to schema generation for IPv{4,6}{Address,Interface,Network} (pydantic#532) Fix __fields_set__ not using alias field names (pydantic#517) (pydantic#518) Change return type hint for create_model (pydantic#526) Tuple ellipsis (pydantic#512) Fix to schema generation for IPvAny{Address,Interface,Network} (pydantic#498) (pydantic#510) uprev Scheduled monthly dependency update for May (pydantic#499) Implement const keyword in Schema. (pydantic#469) ...
alexdrydew
pushed a commit
to alexdrydew/pydantic
that referenced
this pull request
Dec 23, 2023
* Don't recurse into metadata * Add one more test
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.
Change Summary
Added schema generation for all IPv{4,6}{Address,Interface,Network}, inspired by json-schema-org/json-schema-spec#498
The only thing modified that is of interest, and I'm not too sure about, is the order in
field_class_to_schema_enum_disabledShould have I kept the original order (Address > Interface > Network) then both
test_ipv4interface_typeandtest_ipv6interface_typewould fail with the following:test_ipv4interface_type
With the order Network>Interface>Address all tests pass
Related issue number
complements json-schema-org/json-schema-spec#498
Checklist
HISTORY.rsthas been updated#<number>@<whomever>