Been trying all day to implement a simple use case where I want to have parts of a schema defined in one place for reuse and have other parts of my API reusing those parent definitions. Tried all manner of different approaches, specially focusing on ResourceTypes but cannot understand how this concept will allow me to define a parent resource and a series of sub-resources that inherit the properties from the parent. Instead of describing my exact domain, maybe easiest to think about stereotypical pets API where I wish to define common properties for a pet e.g. name, and have specific sub-types e.g. dog, cat etc that add additional properties.
Also tried using json-schema pointers i.e. ‘$ref’ however these don’t seem to get expanded - well certainly not in the API console. Instead you just see the ‘$ref’ string.
How using RAML would one achieve such reuse?
Without this level of reuse am I going to have to type a gazillon lines and have a maintenance nightmare!
Love RAML so far, but really frustrated now…