Better way to split into different files?


I wanna use jobs.raml to define the /jobs API only, and include it in the main raml file. e.g.

/jobs: !include jobs.raml

And the jobs.raml looks like:

get: blabla

post: blabla

This looks a little weird since the resource itself is split from its methods. Any better ideas?



We started to use RAML includes to modularize our specs as much as possible, and while the main spec file was very “clean” we had some issues like slower parsing (because it has to include/download every single file each file it parses the spec) or that you have a huge list of files and if you dont used a filename notation it can become a mess to find the right file.

Instead now, we use includes to define all the description fields (markdown) that tend to be lengthy on separate files, also using a mix of traits/includes its the best to clean up all your code rather than just includes.

Norberto already commented something about the splitting/includes here so its possible to do it like you want but generally not recommended.