Namely, how do I get
#%RAML 1.0 NamedExample
to work properly? I can’t find any examples anywhere. Not the RAML repositories, not in the forums, or even in the RAML documentation.
Assuming I have a RAML library filled with types and one of the types is something like:
avatar: type: array required: false items: type: object required: true properties: size: type: string required: true url: type: string required: true
so avatar example would be something like:
AvatarExample: - size: "Big" url: "Example1.com" - size: "Small" url: "Example2.com"
How can I create my own RAML NamedExamples file, write the example into it and then call it from another file like “api.raml” or something?
#import goes here <----------------------------?????????????? /avatar: get: description: Just an avatar. responses: 200: body: application/json: type: avatar.avatar example: <---------------------????????????????
While I can use a JSON file for the examples and that will work, I’d rather use a namedExamples raml file to contain all of the examples in one place.
Thanks for the help!