-
Notifications
You must be signed in to change notification settings - Fork 5
[CDF-24799] Pydantic validation for views #1672
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
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
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.
Good job a few adjustments.
) | ||
filter: dict[str, Any] | None = Field( | ||
default=None, | ||
description="A filter Domain Specific Language (DSL) used to create advanced filter queries.", |
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.
This is not correct, the filter for on a view is used to determine which instances are returned by the view.
description="Description of the content and suggested use for this property..", | ||
max_length=1024, | ||
) | ||
source: ViewReference | None = Field( |
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.
The description is incorrect. Suggest we only keep it on the derived classes. It is optional on the Container properties, while it is required for edges and reverse direct relations
return serialized_data | ||
|
||
|
||
class CreateViewProperty(ViewProperty): |
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.
Lets call this ContainerViewProperty alternatively, MappedViewProperty
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.
Go go go!
Description
This PR introduces pydantic validation model for View Resource class that matches the YAML file format that toolkit expects.
Changelog