First, this question is similar to, but different from How to define an array of a type in an external file in Raml?, except I want to make a DataType (A) that has a property that is a union of two other DataTypes B and C.
For example, here is the B RAML:
#%RAML 1.0 DataType
type: object
properties:
some: integer
Here is the C RAML:
#%RAML 1.0 DataType
type: object
properties:
other: string
And finally here is the problematic A RAML:
#%RAML 1.0 DataType
type: object
properties:
union: !include B | !include C
In the solution to the aforementioned post, the A RAML would have something like:
#%RAML 1.0 DataType
type: object
properties:
union:
type: union
items: !include B | !include C
But that doesn't work either. Any ideas how to do this?
Thanks!