how to include validations for value and key in a json schema?

JSON Schema is constraints based.

patternProperties applies its value schema to the instance location based on the key match (in this case, regex match).

It does not prohibit additional keys in the object.

If you want to prevent additional keys, you need to specify so.

To do this, you need "additionalProperties": false.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top