I am working on describing a large API with RAML, and it happens that almost all of the calls in this API share two query parameters: an “authorization” parameter that needs an access token, and an “accept” parameter to specify whether XML or JSON is returned in the response.
What would be the best way (if any) to avoid having to type those two out for all of the methods in the spirit of RAML? I’ve been mulling on the idea of an !include or maybe some kind of resourceType that I could apply to everything? Those seemed to fall through when I saw that an !include is treated as a string, and that apparently I can’t assign query parameters to a resource, only its methods.
Thoughts about how to approach this sort of thing?
A confused but intrigued developer,