We can use enums and anyOf for validating properly, but editors might not be show completion properly.
Having a schema => Markdown transformer would help. Better to have good doc than good completion.
Proof of concept schema fragment:
"test": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"not": { "enum": [ "pancake", "waffle" ] }
},
"options": { "type": "object" }
}
},
{
"type": "object",
"properties": {
"name": { "const": "pancake" },
"options": {
"type": "object",
"properties": {
"x": { "type": "number" },
"y": { "type": "number" }
},
"additionalProperties": false
}
},
},
{
"type": "object",
"properties": {
"name": { "const": "waffle" },
"options": {
"type": "object",
"properties": {
"a": {"type":"string"},
"b": {"type":"boolean"}
},
"additionalProperties": false
}
}
}
]
}
Two things;
$schema property should point to a url on a server that we can update easily. This should be at (tentative) http://angular.io/schemas/angular.json/6.0.This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Proof of concept schema fragment: