Create a .raml file with several enpoints


Hello , I am new with .RAML. I would like to know if there is a way of creating a .raml file with different endpoints. Any idea of how to do that?


Do you mean different baseUri paths? If so, that isnt possible that I know of, but you probably could use longer resource URL names and a simple baseUri… maybe like:



Although, I would argue that you are not taking advantage of RAMLs modular capabilities very efficiently with this approach. It sounds like you are trying to create an uber API for various API surfaces in one file? If so, why would you want to do this? Is it so you can render say RAML2HTML for the entire set of API surfaces so they are all together?


I mean , in case you want to join , for example 300 endpoints in a .raml file. How could you do that ? As you say is it imposible to do it. Is it possible to do it with a raml2html. Is there any maven or eclipse plugin which would generate the api documentation of a .raml file ?


Ah, ok… there was some discussion on this some time back and I think at that time, you would have to write some code that combined the files in some manner. With RAML 1.0, you could create a root .raml file that then includes different Library raml files, each of those being their own API surface. However, a Library wouldnt have their own baseUri and title and such in it, so you would still need some way via code at this point to identify each API surface as individual APIs that could stand alone. RAML 1.0 is very modular though, so I suspect there is some way I havent yet discovered that could be used to do something close to what you want.

Let me make sure, again, though, that you are suggesting individual stand alone APIs (in their own .raml files), that you then want to combine, sort of like how a company with many products will have different deployments/packaging, but they all fit under the umbrella of the one company… is that right? Or, are you just looking for a way to break up tons of endpoints for a single API surface and then combine them again? If it is the latter, than RAML 1.0 will allow you to build libraries and other leafs (e.g. resource Types, annotations, etc) in to separate files, then you can import them in a root document. When parsed, it would all appear to the parser as one API surface.


Hello , I need thousands of endPoints.


Alright, first I am not quite sure I understand… 1000s of endpoints? Why would any API need even 10s of endpoints much less 1000s? Can you elaborate a bit more? Any API that has lots of endpoints typically is difficult to use or work with. I suspect this is a different scenario from some of your other posts as well, but could use a little more details. Feel free to PM me if it is something you dont wish to discuss in the open.


Maybe @Gorka_Sanz_Monllor meant thousands of open connections when the API is being used…