What is the correct syntax to reference a fragment in RAML?
What is the correct syntax to reference a fragment in RAML?
To reference a fragment in RAML, the correct syntax is to use '!include'. This syntax instructs the RAML parser to include an external file, such as examples, resource types, traits, etc., into the RAML document. The correct usage is 'examples: !include examples/BankAccountsExample.raml'.
#%RAML 1.0 title: Products API types: paging: properties: start?: number page-size?: number /products: description: All products get: queryString: type: paging examples: !include examples/paging-examples.raml https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#typed-fragments