Skip to content

Retrieve "additional_properties" from Entity#48

Merged
JesuTerraz merged 2 commits intomainfrom
users/jterrazas/fix-model-validation
Nov 13, 2025
Merged

Retrieve "additional_properties" from Entity#48
JesuTerraz merged 2 commits intomainfrom
users/jterrazas/fix-model-validation

Conversation

@JesuTerraz
Copy link
Contributor

No description provided.

@JesuTerraz JesuTerraz requested a review from a team as a code owner November 13, 2025 18:20
Copilot AI review requested due to automatic review settings November 13, 2025 18:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR attempts to simplify model validation by using the base Entity type instead of specific subclasses (EmailReference and WpxComment). However, this introduces critical type safety and validation issues.

Key Changes:

  • Removed the payload extraction logic that used getattr(ent, "properties", ent)
  • Changed validation from EmailReference.model_validate(payload) to Entity.model_validate(ent)
  • Changed validation from WpxComment.model_validate(payload) to Entity.model_validate(ent)

joratz
joratz previously approved these changes Nov 13, 2025
@JesuTerraz JesuTerraz changed the title Change model validation to Entity type Retrieve "additional_properties" from Entity Nov 13, 2025
@JesuTerraz JesuTerraz merged commit 5a91e95 into main Nov 13, 2025
8 checks passed
@JesuTerraz JesuTerraz deleted the users/jterrazas/fix-model-validation branch November 13, 2025 18:56
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