MuleSoft Developer Practice Exam

Question: 1 / 400

What is the correct syntax to reference a RAML example fragment named BankAccountsExample.raml?

examples: #import BankAccountsExample.raml

examples: !include BankAccountsExample.raml

examples: #import examples/BankAccountsExample.raml

examples: !include examples/BankAccountsExample.raml

The correct syntax to reference a RAML example fragment named "BankAccountsExample.raml" is accomplished with the use of the `!include` directive, which allows for the inclusion of external files in your RAML document. This enables the incorporation of reusable examples or documentation fragments from other files to keep your code organized and maintainable.

Using the path `examples/BankAccountsExample.raml` within the `!include` directive specifies the directory where the RAML file is located relative to the current file. This structure is essential as it clarifies the exact location of the example fragment and ensures it's correctly referenced in your main RAML file.

The `!include` directive is specifically designed for this purpose, facilitating the integration of external definitions, examples, or specifications directly into RAML documents, thereby promoting modularity and reusability of code segments across different RAML files.

In contrast, the other options either incorrectly use the `#import` syntax, which is not valid in RAML, or do not provide the correct file path, making them unsuitable for accurate reference in this context.

Get further explanation with Examzify DeepDiveBeta
Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy