(Quick Reference)

2 Installation - Reference Documentation

Authors: Rahul Somasunderam

Version: 0.28.0

2 Installation

Mime Headers

By default, grails prevents browsers from using the accept header. You must tell grails to allow browsers to do that.

In grails 3, application.yml should do this

grails:
    mime:
        disable:
            accept:
                header:
                    userAgents: []

In grails 2, Config.groovy should do this

grails.mime.disable.accept.header.userAgents = []

Build Scripts

Given how this codebase is built has changed to accommodate grails 2 as well as 3, if you are using grails 2, you'll have to add jcenter as a repo and swaggydoc-commons as a lib to your BuildConfig.groovy

repositories {
    …
    mavenRepo "http://jcenter.bintray.com/"
}
dependencies {
    …
    compile "com.github.rahulsom:swaggydoc-commons:0.28.0"
}
plugins {
    …
    compile ">>
}

In Grails 3, you need to make sure your build.gradle has

repositories {
    …
    jcenter()
}
dependencies {
    …
    compile "org.grails.plugins:swaggydoc-grails3:0.28.0"
}