raml-mocker-server
raml-mocker-server copied to clipboard
How to get the baseURI
@dmitrisweb
A quick question please. Do we have a means of accessing the baseUri from a RAML document. At the moment only the actual url for respective post and get requests are returned. Please let me know.
thanks
Hi Olu,
No, it is not used at the moment, but you can use prefix option to add your baseUri. For example: prefix: ['', '/api', '/my/base/path'],
This will add 3 aliases for all endpoints defined in the RAML.
Hi @dmitrisweb,
This implementation doesn't work well for our situation. We have several RAML files parsed. Each RAML file respresents a specific boundary context with their own baseUri. Ideally I would prefer a possibility in the RAML-MOCKER itself to enable the combination of baseUri of a file to all the post or get Url of that file before they are exposed in the RAML-MOCKER-SERVER. This I think can be directed from the RAML-MOCKER-SERVER configuration to the RAML-MOCKER. What do think please.
Olu