Closed pete001 closed 9 years ago
Try changing this:
- *dietary_requirements* (array)
- Include Linkage
To this:
- *dietary_requirements* (array[Linkage])
I don't believe it's possible to use mixins (include
) with arrays like in this example.
Wow, totally amazing! Thanks so much for the speedy response, this worked perfectly :smile:
@kylef is correct – Include
is meant to work with objects only (spec).
However the parser should warn on this occasion – isn't this the case? //cc @pksunkara
@pete001 also you can specify any type as a content of array like so:
- my_array (array)
- (type1)
- (type2)
- (another type)
Thanks @zdne! The apiary parser wasnt complaining at me, was validating ok.
The parser should give a warning. Let me check.
Hi there, thanks for such an awesome product!
I am documenting using JSONAPI format, and i am having an issue with expressing an object within an array. This is required due to the JSONAPI spec for non-empty to-many relationships.
Here is my example code:
If you render this in apiary, you will notice that the
dietary_requirements
array is empty, even though it references theLinkage
Data Structure.Any help would be much appreciated.