I am considering using RAML also as a configuration file for my PHP based API controller.
I was thinking it would be nice if I can add a string to the resource description, that my controller will then read and be able to determine which class or function to use for serving the request.
/books: get: handler: BooksClass.list
So my API controller will read and parse the RAML, extract the “handler” attribute, and decide to call the “list” method in the BooksClass passing it whatever parameters it deems necessary.
I realize that defining a handler syntax that may be appropriate for different languages and backend configurations may be difficult, but perhaps allowing a custom “meta data” properties could solve this?
I am completely new to RAML, so if there is a more appropriate way to approach this problem, I would love to be enlightened.