After researching and reading documentation, I couldn't find the answer to how I can use $ref in order to keep consistency between object fields, but only display required fields.
For example, the device object is:
{
"category": "Mobile",
"screenResolution": "360x600",
"mobileBranding": "Apple",
"mobileModel": "iPhone",
"mobileName": "iPhone 6",
"operatingSystem": "iOS",
"operatingSystemVersion": "9",
"isMobileApp": true
}
Referencing the device object in another object, I require only category, screenResolution, and operatingSystem from the original object:
"device": {
"allOf": [
{"$ref": "./device.schema.json"},
{"required": ["category", "screenResolution", "operatingSystem"]}
],
"additionalProperties": false
}
It seems that the issue of overriding earlier object specifications hasn't been solved?