we're defining our service(s) using raml. here's partial definition:
#%raml 0.8 title: api version: v1 baseuri: http://localhost:9000/api/{version}
we want serve api entry point on /api/v1
(without slash).
how can that?
raml allows specify route including trailing slash:
/: get: ...
i tried
"": get: ...
but raml doesn't it, although think it's valid yaml.
here's error message:
unknown property while validating root properties unknown property in "api.raml", line 106, column 1: "": ^ @ constructor.__dirname.validator.validator.validate_root_properties (/src/api-spec/node_modules/raml-parser/lib/validator.js:640:23) @ constructor.__dirname.validator.validator.validate_document (/src/api-spec/node_modules/raml-parser/lib/validator.js:76:20) @ constructor.__dirname.composer.composer.composeramltree (/src/api-spec/node_modules/raml-parser/lib/composer.js:79:14) @ constructor.composeramltree (/src/api- spec/node_modules/raml-parser/lib/composer.js:5:61) @ /src/api-spec/node_modules/raml- parser/lib/raml.js:224:16
Comments
Post a Comment