Quantcast
Channel: how to define alternative structure in json schema - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by ducin for how to define alternative structure in json schema

I've found the answer, basing on another (slightly different) SO question. The solution is to use anyOf which enables to define alternative subschemas where at least one has to match. An example...

View Article



how to define alternative structure in json schema

I've got JSON files that can look either like this:{"api": "http://my.api.host","modules": ["core", "module", "another" ]}or this:{"api": "http://my.api.host","modules": "*"}Note that modules attribute...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images