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

adding additionalProperties=False to the classes schema #6

Open
martinResearch opened this issue Nov 25, 2024 · 1 comment
Open

adding additionalProperties=False to the classes schema #6

martinResearch opened this issue Nov 25, 2024 · 1 comment

Comments

@martinResearch
Copy link

Thank you for this library. It is very nice to have a no-invasive solution that does not require to use a new dataclass or decorators.
At the moment the exported schema do not forbid the addition of fields in the json that are not in the corresponding dataclass,
which limit the capability to detect spelling errors for optional fields. It would be great to add additionalProperties=False
when creating the schema for the dataclasses to make the schema more strict. I can submit a PR if that can help.

@larsmaxfield
Copy link

@martinResearch do you already have a solution in place? This feature would be valuable for me as well.

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

No branches or pull requests

2 participants