In schema, I don't see a way to define allowed values per field. Here is an example with allowed_values attribute
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"city": { "type": "string", allowed_values: ["Paris", "London"] },
"country": { "type": "string" }
},
"required": ["country"]
}
It means it returns an error if I pass a different city.
Is there any workaround to do this?