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

move to ultra restrictive schema #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kilojoules
Copy link
Collaborator

This makes our YAML reader default to additionalProperties: false. This avoids ambiguities when validating encoded data.

@kilojoules kilojoules requested a review from kenloen January 9, 2025 22:00
@rafmudaf
Copy link
Collaborator

@kilojoules heads up the tests are failing here

@rafmudaf rafmudaf added the python-library Related to the python library label Jan 14, 2025
@rafmudaf rafmudaf mentioned this pull request Jan 14, 2025
@bayc
Copy link
Collaborator

bayc commented Jan 16, 2025

@kilojoules I agree that we should update parameters to not allow additional properties to aid in validation, but I am hesitant to apply a blanket function like this, but would rather explicitly add to each current and new definition the correct property to prevent additional properties. A blanket function like above also restricts us from allowing custom cases for definitions, which is another discussion to have.

Base automatically changed from develop to main January 16, 2025 16:49
@kilojoules
Copy link
Collaborator Author

@bayc My experience is that this creates a huge amount of clutter and it is easy to miss a specification of additional properties false. Iwould instead suggest explicitly stating when additional properties is true. This seems like a strong safeguard against typos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python-library Related to the python library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants