I want to restrict my application to only support "string" type values for json configuration. Json schema by default supports a set of datatypes such as integer, boolean, etc however, the parsing logic in my application only supports string values.
How do I make sure the schema does not define a property of any type except string.
Allow - { "key1": "A", "key2": "B" }
Reject - { "key1": "A", "key2": true} or { "key1": "A", "key2": ["1","2"]}
This would be the most basic example to match your requirements. Each
propertydefines atype(data type). Thistypekeyword is the constraint applied to that propertyTake a look at this fundamentals post from the JSON Schema blog for a nice introduction to understanding JSON Schema.