Although the specs look unclear to me it looks like you should be able to include multiple traits by using YAML arrays instead of the usual maps. At least this seems to be the favorite approach for the people @SAP (see for example here: https://devportal.yaas.io/tools/ramlpatterns/index.html).
In these cases the included file should also contain the key, so instead of using
traits: paged: !include paged.raml sortable: !include sortable.raml
traits: - !include paged.raml - !include sortable.raml
where paged.raml starts with “paged:” and sortable.raml with “sortable:”.
Point is: I found no way to have this digested by raml-to-jax-rs, it complains about “Invalid element Array”.
Is this a limitation of raml-to-jax-rs or it is a misinterpreted feature of the specs?