-
Notifications
You must be signed in to change notification settings - Fork 527
[Connectors sdk] Create a Reference models #5405
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: master
Are you sure you want to change the base?
Conversation
| description="The name of the author(s) of this note (e.g., the analyst(s) that created it).", | ||
| ) | ||
| objects: list[BaseIdentifiedEntity] | None = Field( | ||
| objects: list[Union[BaseIdentifiedEntity, Reference]] | 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.
nit: for consistency purpose, could we use the pipe syntax instead of Union ?
|
|
||
|
|
||
| class Reference(BaseModel): | ||
| """Represent a reference.""" |
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.
Can you elaborate a bit more the use cases where a Reference should (or shouldn't) be used in the docstring?
Powlinett
left a comment
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.
Thanks @Ninoxe
I notice that it misses the update of the following models:
AssociatedFile(markings)BaseIdentifiedEntity(authorandmarkings)
As the OCTI models fields now accept different types, it would be really nice to update their tests too (one test with a "complete" entity, one test with "just" a Reference) 😇
Proposed changes
Related issues
Checklist