I have the following JSON schema that I want to validate and Python unittest.
{
\"properties\": {
\"traffic_parameters\" {
\"capacity\"
The JSON Reference spec doesn't place any limits on what can be $ref
'd, but in practice, any validator that I have ever seen only supports $ref
s that point to a JSON Schema. I'm not sure why none ever supported that functionality, but I have yet to see a case where I thought it was a good idea to do such a thing.
In the recently released JSON Schema draft-06, the common practice of supporting only JSON Schemas became a rule. So, even if you do find a validator that supports $ref
ing integers, I wouldn't recommend using it because it will make it harder to upgrade in the future.
This won't work this way. $ref
references must always point to schemas. So it can be an object or a boolean, but not a number.