A RAML example fragment named BankAccountsExample.raml is placed in the examples folder. What is the correct syntax to reference the fragment?

Prepare for the MuleSoft Associate Exam. Study with quizzes featuring flashcards and multiple choice questions, complete with hints and explanations. Ace your certification with confidence!

Multiple Choice

A RAML example fragment named BankAccountsExample.raml is placed in the examples folder. What is the correct syntax to reference the fragment?

Explanation:
In RAML, embedding external content such as an example fragment is done with the YAML !include directive. Since BankAccountsExample.raml is placed in the examples folder, the correct syntax to reference it is: example: !include examples/BankAccountsExample.raml. The !include tag tells the RAML parser to insert the contents of that file at that point, so the actual fragment appears in the example instead of just a filename. Other forms that omit the include directive, or use a different keyword, won’t pull in the file content and won’t work.

In RAML, embedding external content such as an example fragment is done with the YAML !include directive. Since BankAccountsExample.raml is placed in the examples folder, the correct syntax to reference it is: example: !include examples/BankAccountsExample.raml. The !include tag tells the RAML parser to insert the contents of that file at that point, so the actual fragment appears in the example instead of just a filename. Other forms that omit the include directive, or use a different keyword, won’t pull in the file content and won’t work.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy