-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
The JSON schema can explicitly disallow properties that are not listed in the properties, by saying
additionalProperties: false
Right now, the validator does not check this.
Doing this could be simple on a technical level: There could be a convenience function like
ensurePropertiesAreOnly(object, ["exampleProperty", "otherProperty", "yetAnotherProperty" ]);
that simply iterates over all properties of the object, and checks that each one appears in the given array.
But listing all these "allowed" properties explicitly (for each and every type) could be cumbersome (so much that I'm not sure whether it's worth the effort). But we could consider such a check, even though it might involve a bit of manual work to list the allowed properties for each structure...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels