Skip to content

Support adding schema validation #3397

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

paulinevos
Copy link
Collaborator

@paulinevos paulinevos commented Jun 3, 2025

To support the '$jsonSchema' operation on collections.
Closes PHPORM-72.

Checklist

  • Add tests and ensure they pass

@paulinevos paulinevos requested a review from a team as a code owner June 3, 2025 10:22
@paulinevos paulinevos requested a review from alcaeus June 3, 2025 10:22
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM. I'll note that this uses the default settings for validationAction and validationLevel, which causes an error when attempting to insert or update an invalid document.

We could allow users to supply their own $validationLevel and $validationAction to customise this behaviour, but I'm fine with adding this in a separate step.

@paulinevos
Copy link
Collaborator Author

@alcaeus Oh no that seems like a pretty crucial step and arbitrary to add so will do

@paulinevos paulinevos force-pushed the 72_schema-validation branch from 2885359 to e388600 Compare June 3, 2025 12:47
@paulinevos paulinevos requested a review from alcaeus June 3, 2025 12:48
To support the '$jsonSchema' operation on collections
@paulinevos paulinevos force-pushed the 72_schema-validation branch from e388600 to aa74bf5 Compare June 3, 2025 12:53
@paulinevos paulinevos merged commit 7a0f0bc into mongodb:5.x Jun 4, 2025
71 checks passed
paulinevos added a commit to paulinevos/laravel-mongodb that referenced this pull request Jun 4, 2025
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