Search code examples
apiblueprintapiary.ioapiary

Apiary: Refer to multiple models in a body


It seems you can only refer to the model itself in an unmodified form from a payload/body section:

# Item [/]
+ Model

        { "name" : "an item" }

## GET
+ Response 200

    [Item][]

Is there any way to return an array of the model or use the model as a field? I.e. something like

+ Response 200

{ "items" : [ [Item][], [Item][] ]}

Solution

  • This is not possible yet.

    It should be available soon using Traits.