Using RAML to Document and Enforce Validation for MicroServices


We have a micro services architecture and we are current using an osprey proxy as our gateway to our micro services. This approach forces us to use a single RAML file that contains all the definitions for our APIs for all our micro services. Naturally we would a API documentation and validation structure that reflects and supports the modularity of our architecture. A anyone had to solve this issue? If so how was this solved?

Tim McClure


Could you elaborate a little more on the different requirements you have? Are you describing each microservice with an individual RAML? What do you mean by “validation structure that reflects and supports the modularity of our architecture”?


We are trying to describe each micro service using an individual RAML but the gateway we are using needs to have access to the complete RAML from all the micro services in order to enforce validation. Ideally we would like the validation to live at the individual micro service. Do you know of any examples that uses the RAML in a distributed fashion? Perhaps the issue lies in the use of the osprey gateway.


MH, I think the only problem you might have is that you need to consolidate all the RAMLs and generate a “Uber” RAML. I haven’t seen any tool that is doing this atm.

What validations do you want to execute? Depending on that, validating your individual services shouldn’t be a problem.

Also, what RAML version do you use?