I have a generic Java type like this:
class Response<D> {
List<D> data;
}
and want to create something similar with RAML 1.0 (where I am new to).
My first approach was
types:
Response:
type: object
properties:
data: object[]
and when using it
body:
type: Response
properties:
data: MyDataType[]
From API-Workbench I always get an "Illegal override of property data inherited from Response".
The other idea would be to use repeat
:
types:
Response:
type: object
properties:
data: object
repeat: true
and respectively
body:
type: Response
properties:
data: MyDataType
repeat: true
Now the illegal override is gone but in the API-Console I now get an "Uncaught TypeError".
How to solve that? Or do I need a completely different approach? Any idea?
any
would remove the error but document nothing, which is not the intention of using a endpoint documentation tool. – Kerns