documentation home

RAML

In order to generate RAML 0.8, add the following to your configuration. RAML generation has one specific configuration parameter:

  • jsonSchemaVersion (3 or 4, 4 is default).

From Miredot 2.3.x on we support RAML 1.0. This can be configured with a new configuration parameter:

  • version (1.0 or 0.8, 0.8 is default).
Maven
<configuration>
    <output>
        <raml>
            <location>out/raml</location>
            <title>My REST API</title>
            <version>1.0</version
            <jsonSchemaVersion>4</jsonSchemaVersion>
        </raml>
    </output>
</configuration>
Gradle
miredot {
    output {
        formats {
            'raml' {
                location = 'out/raml'
                title = 'My REST API'
                version = '1.0'
                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.