Open honzatrtik opened 7 years ago
ping? :)
I apologise for not getting back to you sooner.
I think the only way to achieve this would be using One Of, but that only applies to objects:
# GET /
+ Response 200 (application/json)
+ Attributes
+ One Of
+ included (array[Type1], fixed-type)
+ included (array[Type2], fixed-type)
# Data structures
## Type1
+ prop1: val1
## Type2
+ prop2: val2
Hi, we are struggling with defining MSON, which would describe array consisting of specified types only (we'd like to have
included
section of our json api (http://jsonapi.org/) responses fully validated by dredd).So far, we tried this:
Generated json schema validates this json:
but not this one:
Another try was something like this:
But this seems to generate invalid json schema...
Are we missing something? Thanks in advance!