nerdexam
MuleSoft

MCD-LEVEL-1 · Question #118

A RAML example fragment named StudentExample.raml is placed in the examples folder in an API specification project. What is the correct syntax to reference the fragment?

The correct answer is C. examples: !include examples/StudentExample.raml. To include property. To keep the API definition concise, you can include external content, such as documentation, schemas, and frequently used patterns outside the definition itself. The parser interprets !include as if the content of the externally-hosted file or a URL were…

Designing APIs

Question

A RAML example fragment named StudentExample.raml is placed in the examples folder in an API specification project. What is the correct syntax to reference the fragment?

Options

  • Aexamples: !include StudentExample.raml
  • Bexamples: #import StudentExample.raml
  • Cexamples: !include examples/StudentExample.raml
  • Dexamples: #import examples/StudentExample.raml

How the community answered

(25 responses)
  • B
    8% (2)
  • C
    88% (22)
  • D
    4% (1)

Explanation

To include property. To keep the API definition concise, you can include external content, such as documentation, schemas, and frequently used patterns outside the definition itself. The parser interprets !include as if the content of the externally-hosted file or a URL were declared in-line. To use the fragments in RAML you have to include the exact path(copy the path) of that fragment you want to use as shown below Option 3 is the correct as correct syntax is examples: !include examples/StudentExample.raml

Topics

#RAML#fragments#!include directive#API specification

Community Discussion

No community discussion yet for this question.

Full MCD-LEVEL-1 Practice