raml-mocker-server icon indicating copy to clipboard operation
raml-mocker-server copied to clipboard

How to get the baseURI

Open alleypa opened this issue 9 years ago • 2 comments

@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

alleypa avatar Feb 24 '16 07:02 alleypa

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.

dmitrisweb avatar Feb 24 '16 09:02 dmitrisweb

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

alleypa avatar Mar 05 '16 08:03 alleypa