how to include common responses to raml resource
<p>I have <a href="/questions/tagged/raml" class="post-tag" title="show questions tagged &#39;raml&#39;" rel="tag">raml</a> docs, and try to add new API's docs to that docs.</p>

<p>I gone through basic RAML docs.</p>

<p>I have raml file as.</p>

<pre><code>#Filename: base.raml
title: Test RAML
documentation:
  - title: Test RAML docs first time :)
    content: This is RAML testing
baseUri: https://myportal.com/{version}/scriptmanagement
version: v1.0
mediaType: application/json
protocols: [ HTTPS ]

/test:
    !include raml/test.raml
</code></pre>

<p>And the actual raml content is in <code>test.raml</code></p>

<pre><code>#Filename: test.raml
displayName: Test RAML Inheritance
description: Testing for RAML inheritance for responses.

get:
    description: Get all TEST
    headers:
        name:
            description: name required in each request
            example: testname
            required: true
    responses:
        200:
            description: SUCCESS
            body:
                application/json:
                    example: |
                        {}
        400:
            description: BAD REQUEST
            body:
                application/json:
                    example: |
                        {"error": "Bad Request"}
        500:
            description: INTERNAL ERROR
            body:
                application/json:
                    example: |
                        {"error": "Internal Error"}

post:
    description: Get all TEST
    headers:
        name:
            description: name required in each request
            example: testname
            required: true
    responses:
        200:
            description: SUCCESS
            body:
                application/json:
                    example: |
                        {"message": "Created"}
        400:
            description: BAD REQUEST
            body:
                application/json:
                    example: |
                       {"error": "Bad Request"}
        500:
            description: INTERNAL ERROR
            body:
                application/json:
                    example: |
                        {"error": "Internal Error"}


/{test_id}:
    description: TEST DETAILS
    get:
        description: Retrieve resource own by x-user-name
        headers:
            name:
                description: name required in each request
                example: testname
                required: true
        responses:
            200:
                description: SUCCESS
                body:
                    application/json:
                        example: |
                            {"message": "Details"}
            400:
                description: BAD REQUEST
                body:
                    application/json:
                        example: |
                            {"error": "Bad Request"}
            500:
                description: INTERNAL ERROR
                body:
                    application/json:
                        example: |
                            {"error": "Internal Error"}
</code></pre>

<p>In above RAML, <code>400</code> and <code>500</code> response is common, and <code>name</code> headers is common. </p>

<p>How can I write this once and add to all resources? I tried <code>traits</code> and <code>&lt;&lt;:</code> both not works.</p>