Hello, Can anyone help me on how can I refer to another JSON schema from a JSON schema. I am using “$ref” keyword but something is not working fine for me.
My schema.json:
{
“id”: “https://example.com/schemas/schema”,
“type”: “object”,
“properties”: {
“road_street_block_sector_of_landlord”: {
“$ref”: “/schemas/address#/properties/road_street_block_sector_of_landlord”
},
“flat_Door_Building_of_landlord”: {
“$ref”: “/schemas/address#/properties/flat_Door_Building_of_landlord”
}
}
My location.json:
{
“id”: “https://example.com/schemas/address”,
“type”: “object”,
“properties”: {
"flat_Door_Building_of_landlord": { "type": "string" },
"road_street_block_sector_of_landlord": { "type": "string" }
},
“required”: [“flat_Door_Building_of_landlord”]
}