1+ # %RAML 1.0
2+ title : Baeldung Foo REST Services API
3+ version : v1
4+ protocols : [ HTTPS ]
5+ baseUri : http://rest-api.baeldung.com/api/{version}
6+ mediaType : application/json
7+ securedBy : basicAuth
8+ securitySchemes :
9+ - basicAuth :
10+ description : Each request must contain the headers necessary for
11+ basic authentication
12+ type : Basic Authentication
13+ describedBy :
14+ headers :
15+ Authorization :
16+ description : Used to send the Base64 encoded "username:password"
17+ credentials
18+ type : string
19+ responses :
20+ 401 :
21+ description : |
22+ Unauthorized. Either the provided username and password
23+ combination is invalid, or the user is not allowed to access
24+ the content provided by the requested URL.
25+ types :
26+ Foo : !include types/Foo.raml
27+ Error : !include types/Error.raml
28+ /foos :
29+ get :
30+ description : List all Foos matching query criteria, if provided;
31+ otherwise list all Foos
32+ queryParameters :
33+ name? : string
34+ ownerName? : string
35+ responses :
36+ 200 :
37+ body :
38+ application/json :
39+ type : Foo[]
40+ example : !include examples/Foos.json
41+ post :
42+ description : Create a new Foo
43+ body :
44+ application/json :
45+ type : Foo
46+ example : !include examples/Foo.json
47+ responses :
48+ 201 :
49+ body :
50+ application/json :
51+ type : Foo
52+ example : !include examples/Foo.json
53+ /{id} :
54+ get :
55+ description : Get a Foo by id
56+ responses :
57+ 200 :
58+ body :
59+ application/json :
60+ type : Foo
61+ example : !include examples/Foo.json
62+ 404 :
63+ body :
64+ application/json :
65+ type : Error
66+ example : !include examples/Error.json
67+ put :
68+ description : Update a Foo by id
69+ body :
70+ application/json :
71+ type : Foo
72+ example : !include examples/Foo.json
73+ responses :
74+ 200 :
75+ body :
76+ application/json :
77+ type : Foo
78+ example : !include examples/Foo.json
79+ 404 :
80+ body :
81+ application/json :
82+ type : Error
83+ example : !include examples/Error.json
84+ delete :
85+ description : Delete a Foo by id
86+ responses :
87+ 204 :
88+ 404 :
89+ body :
90+ application/json :
91+ type : Error
92+ example : !include examples/Error.json
93+ /name/{name} :
94+ get :
95+ description : List all Foos with a certain name
96+ responses :
97+ 200 :
98+ body :
99+ application/json :
100+ type : Foo[]
101+ example : !include examples/Foos.json
0 commit comments