Skip to content

Conversation

@viccie30
Copy link
Contributor

Derive SemanticVersion from semver.Version

This change makes it possible to use SemanticVersion to initialize
models using the init method without type errors.

Add pattern to SemanticVersion's JSON Schema

This ensures that users of the JSON Schema also get their semantic
versions validated.

The pattern and the new test cases come from https://semver.org.

This change makes it possible to use SemanticVersion to initialize
models using the __init__ method without type errors.
This ensures that users of the JSON Schema also get their semantic
versions validated.

The pattern and the new test cases come from https://semver.org.
Copy link
Collaborator

@yezz123 yezz123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@yezz123 yezz123 merged commit f7875f0 into pydantic:main Nov 14, 2024
18 checks passed
@viccie30 viccie30 deleted the derive-semantic-version-from-semver branch November 14, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants