In a separate file, I have a remote schema named "person.json".
{
"id":"#person",
"type":"object",
"properties": {
"name": {"type":"string"},
"gender": {
"type":"string",
"enum":["m", "f"]
},
"age": {"type":"number"}
},
"additionalProperties": false
}
Now, my original schema is called "man.json".
{
"id":"#man",
"type":"object",
"$ref":"person.json",
"properties": {
"beard":"boolean",
"moustache":"boolean"
},
"required": ["name"],
"additionalProperties": false
}
I am looking to integrate the properties like "name, gender" from person.json on the same level as properties like "beard, moustache" from man.json.
To demonstrate validation:
{
name: 'John',
gender: 'm',
age: 29,
beard: false,
mustache: true
}
The goal is to validate the example above with all properties at the same level, without any nesting.
If this integration is possible, could you guide me on how to achieve it? Thank you very much.
Sincerely, João