This repository was archived by the owner on Nov 2, 2023. It is now read-only.
This repository was archived by the owner on Nov 2, 2023. It is now read-only.
Restrict properties in $ref #218
Closed
Description
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?
Metadata
Metadata
Assignees
Labels
No labels