-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for both pydantic v1 and v2 #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Add support for pydantic v2