documentation home

RAML

In order to generate RAML, add the following to your configuration. RAML generation has one specific configuration parameter: jsonSchemaVersion (3 or 4, 4 is default).

Maven
<configuration>
    <output>
        <raml>
            <location>out/raml</location>
            <title>My REST API</title>
            <jsonSchemaVersion>4</jsonSchemaVersion>
        </raml>
    </output>
</configuration>
Gradle
miredot {
    output {
        formats {
            'raml' {
                location = 'out/raml'
                title = 'My REST API'
                jsonSchemaVersion = '4'
            }
        }
    }
}

RAML Generation

There are some specifics regarding the way Miredot generates RAML:

  • If there are multiple path parameters (variables and regexes) with the same name, the multiple path parameters occurrences get their name changed to name_n. The display name remains the original name.
  • Matrix and Cookie parameters aren't supported in RAML. If they are used in the source code, a warning is logged.
  • Regular expressions in RAML must be in ECMA 262 format if this is not the case in your source code a warning message is logged and the regular expression isn't included in the output.
  • Miredot adds all configured consumes mime types to each status code.
  • The lowest status code gets the schema of the return type.