I have a json schema that defines some model and has links to common data types in a separate schema.
{
"type": "object",
"properties": {
"address": {"$ref": "http://domain/commons.json#address"},
"company": {"$ref": "http://domain/commons.json$company"},
}
}
now this has a problem that I have to deliver a fully qualified response in all places, whereas I would like to specify the commons.json URL once and then link to it, for example:
{
"type": "object",
"properties": {
"address": {"$ref": "#commons/address"},
"company": {"$ref": "#commons/company"},
}
"commons": { "$ref": "http://domain/commons.json"
}
}
Is it possible?
source
share