Open
Description
Clear and concise description of the problem
Related to discussion: #4316
It would be helpful to have a decorator that would allow me to specify models/Unions to not accept additionalProperties.
If the property is not set, JSON schema will default to allowing additionalProperties, which could impact proper validation.
As discussed in the linked discussion, this is visibly an issue when using tools like Monaco editor.
I would expect it to look similar to such:
@additionalProperties(false)
union Test {
A,
B,
C
}
Checklist
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.