Trait in RAML
Trait in RAML is used to define the same elements in different request URIs so that they can be reused. It’s like common class, common method in Java! For example, I have 2 request URIs with the following definitions:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#%RAML 1.0 baseUri: https://localhost:8081/api title: RAML Trait version: 1.0 /students/by-name: get: queryParameters: name: string /classes/by-name: get: queryParameters: name: string |
In these two requests, the… Read More




