I’d like to have one large schema file containing all my schemas, possibly nested subschemas. Then I’d like to reference the appropriate subschema whenever I need to reference it from RAML in various method calls.
In the RAML header I’d like to have:
schemas: - Definitions: !include definitions.json
Then I’d like to reference the appropriate subschema:
/books: get: responses: 200: body: application/json: schema: Definitions.Books
Or as an alternative:
schemas: - Definitions: !include definitions.json - Books: Definitions.Books - Author: Definitions.Author
But neither of this seems to work, I hope only my syntax is wrong. Is it possible to do something like this? How?
Or do I really have to mess up my schema file and put each subschema in its individual file and then make sure I get all referencesright from one schema file to another (sigh!)? Like this:
schemas: - Books: !include books.json - Author: !include author.json - and so on for many subschemas.....
Thanks in advance!