I have created some nested data types in my RAML spec e.g. a Unit and Position data type.
The Position data type has Unit nested in it like so:
#%RAML 1.0 DataType
description: System ID for this unit.
type: !include UnitType.raml,
description: Unit in which this position sits.
This seems to work OK in my spec but I would like to include examples as well as types. Is it possible to nest the NamedExample as well? My current attempts are failing.
I have a NamedExample for Unit and am trying to !include this in the Position NamedExample as below:
#%RAML 1.0 NamedExample
unit: !include UnitExample.raml
However, I am getting the error in my spec “unit should be object at examples/PositionExample.raml”
How do I declare an object in an include?