Nested schemas and references


Dear RAML team

I am trying to understand how we can modularize schemas in RAML. I have read the spec about RAML context visibility and inability to refer to nested resources included in the RAML schemas. I hope there is a good reason behind this thinking because this places a substantial limitation on re-using existing XML/JSON schemas.

For example:
I am trying to simplify a very complicated WSDL interface by picking up absolutely essential elements from underlying XSDs and exposing the canonical messages through a REST layer. I found RAML to be very promising in design and implementation.

For simplicity sake, my current webservice setup is similar to

SendMoney.wsdl refers to

  • Sender.xsd
    • extended from Customer.xsd
  • Bank.xsd
  • Received.xsd
    • extended from Customer.xsd
  • BasicTypes.xsd

Ideally, I would like to include Sender.xsd in RAML API file and expect the runtime to pickup dependencies.

#%RAML 0.8

title: Send Money API
version: v1.0
baseUri: http://money/api
mediaType: application/xml

  • post-money: !include Sender.xsd

With current setup, it is not possible I guess. Any idea on how above can be achieved. This is pretty basic requirement and without addressing this, I am not sure if RAML can command wide acceptance.

Thanks for patiently reading and I hope someone can answer this.

Best Regards,


This is also a pain point for me in my first day trying out RAML.