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

Study for the MuleSoft Associate / Development Fundamental Test. Master key concepts with flashcards and multiple choice questions, complete with hints and explanations. Prepare thoroughly for your exam!

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 Passetra

You can unsubscribe at any time. Read our privacy policy