Merged
Conversation
Reviewer's Guide by SourceryThis pull request introduces a compatibility layer to support both Pydantic v1 and v2. It includes changes to model definitions, field creation, and schema generation to accommodate the differences between the two Pydantic versions. The changes ensure that the application can function correctly with either Pydantic version. Updated class diagram for ModelFieldclassDiagram
class ModelField {
+name: str
+type_: Any
+required: bool
+default: Any
+alias: str
+field_info: FieldInfo
}
note for ModelField "This class has been updated to be compatible with both Pydantic v1 and v2. The attributes and methods have been modified to reflect the changes in Pydantic's API."
Class diagram for GenerateJsonSchemaclassDiagram
class GenerateJsonSchema {
+ref_template: str
}
note for GenerateJsonSchema "This class is used to generate JSON schemas for Pydantic models. It has been updated to be compatible with both Pydantic v1 and v2."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
…s/natsapi into feature/pydantic-v2-release
8010716 to
7e3715a
Compare
LanderMoerkerke
approved these changes
Mar 4, 2025
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.
Add support for pydantic v2