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…
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)- B8% (2)
- C88% (22)
- D4% (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
Community Discussion
No community discussion yet for this question.