API from multiple hosts/base paths


Hello Everybody.

I need to expose in one single RAML document, APIs being served from different hosts and base paths combinations.
More specifically, I would use RAML to describe the APIs exposed by a micro service infrastructure, each service is deployed on its own host.

Is it something that the RAML Spec can support?

Thank you!


Indeed you can. You can use the spec to describe the functionality of your services w/o defining the baseUri property. This makes sure that your specification is totally URL/HOST/URI agnostic.

Does that answer your question?


One of the related use case I find is to host in multiple environments (e.g. dev, test, staging, prod) and able to specify each of these via a baseUri.
One of the discussion I find here :- https://github.com/raml-org/raml-spec/issues/150

Hope this help :slight_smile: