Inheritance of resources


Hello there, I stumbled upon a use-case that I seem to not be able to model in RAML. I’m interested in reusing sub resources for different top-level resources.

Let me illustrate with an example. Suppose we have the following resources:

  type:  { collection: {entity : Car } }

   type:  { collection: {entity : Truck } }

Here collection is defined as a trait, but that shouldn’t matter for the question. But now I have versions for both of these entities and need to have the following sub resources:


Is there a way to define the /versions endpoints at one place and then reuse them for whatever endpoints I need (and take into account the they could be used in a lot of top-level entities and the sub resources can have a lot of endpoints).