Skip to content
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

Pydantic models do not enforce JSON Schema additionalProperties: false #505

Closed
korikuzma opened this issue Feb 11, 2025 · 0 comments · Fixed by #506
Closed

Pydantic models do not enforce JSON Schema additionalProperties: false #505

korikuzma opened this issue Feb 11, 2025 · 0 comments · Fixed by #506
Assignees
Labels
bug Something isn't working priority:high High priority

Comments

@korikuzma
Copy link
Contributor

https://json-schema.org/understanding-json-schema/reference/object#additionalproperties

The source.yaml files do not always have this set (default is true in JSON Schema), but the MSP updates the JSON schema files with additionalproperties: false. We should forbid extra attributes on our pydantic models (https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.extra)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant