Generate PDF from Swagger API documentation (throwing ArrayIndexOutOfBoundsException)
<p>I am trying to do as this other question:
<a href="https://stackoverflow.com/questions/30217910/generate-pdf-from-swagger-api-documentation/30455495">Generate PDF from Swagger API documentation</a> . I am also using this template <a href="https://github.com/Swagger2Markup/swagger2markup-maven-project-template/blob/master/pom.xml" rel="nofollow noreferrer">https://github.com/Swagger2Markup/swagger2markup-maven-project-template/blob/master/pom.xml</a></p>

<p>So far I have set <code>swagger-maven-plugin</code> and successfully generated swagger.json and swagger.yaml :)</p>

<p>The problem is when I add <code>swagger2markup-maven-plugin</code> and when try <code>mvn compile</code>. I get:</p>

<blockquote>
  <p>[ERROR] Internal error: java.lang.ArrayIndexOutOfBoundsException: 10364 -> [Help 1]</p>
</blockquote>

<p>How can I set this correctly? Any help is appreciated.</p>

<p>PS: I couldn't even try <code>asciidoctor-maven-plugin</code> since everything blows up as soon as I add <code>swagger2markup-maven-plugin</code> as a plugin :(</p>

<h2>Some Properties</h2>

<pre><code>&lt;properties&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;swagger.directory&gt;${project.basedir}/src/docs/swagger&lt;/swagger.directory&gt;
    &lt;asciidoc.directory&gt;${project.build.directory}/asciidoc&lt;/asciidoc.directory&gt;        
&lt;/properties&gt;

&lt;build&gt;
    ...
    &lt;plugins&gt;
        &lt;!-- swagger-maven-plugin GOES HERE. SEE BELOW --&gt;
        &lt;!-- swagger2markup-maven-plugin GOES HERE. SEE BELOW --&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<h2>swagger-maven-plugin</h2>

<pre><code>&lt;!-- Use the swagger maven plugin to generate swagger file from sources --&gt;
&lt;plugin&gt;
    &lt;groupId&gt;com.github.kongchen&lt;/groupId&gt;
    &lt;artifactId&gt;swagger-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.1.4&lt;/version&gt;
    &lt;configuration&gt;
        &lt;apiSources&gt;
            &lt;apiSource&gt;
                &lt;springmvc&gt;false&lt;/springmvc&gt;
                &lt;locations&gt;
                    &lt;location&gt;com.company.com.support.service&lt;/location&gt;
                &lt;/locations&gt;
                &lt;schemes&gt;http,https&lt;/schemes&gt;
                &lt;host&gt;my.host.net&lt;/host&gt;
                &lt;basePath&gt;/myapi&lt;/basePath&gt;
                &lt;info&gt;
                    &lt;title&gt;MyTitle&lt;/title&gt;
                    &lt;version&gt;v1&lt;/version&gt;
                    &lt;description&gt;MyDescription&lt;/description&gt;
                    &lt;termsOfService&gt;http://my.terms&lt;/termsOfService&gt;
                    &lt;contact&gt;
                        &lt;email&gt;me@email.com&lt;/email&gt;
                        &lt;name&gt;Just Me&lt;/name&gt;
                        &lt;url&gt;www.company.com&lt;/url&gt;
                    &lt;/contact&gt;
                    &lt;license&gt;
                        &lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0.html&lt;/url&gt;
                        &lt;name&gt;Apache 2.0&lt;/name&gt;
                    &lt;/license&gt;
                &lt;/info&gt;
                &lt;outputPath&gt;${swagger.directory}/document.html&lt;/outputPath&gt;
                &lt;swaggerDirectory&gt;${swagger.directory}&lt;/swaggerDirectory&gt;
                &lt;outputFormats&gt;json,yaml&lt;/outputFormats&gt;
            &lt;/apiSource&gt;
        &lt;/apiSources&gt;
    &lt;/configuration&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;?m2e execute onConfiguration?&gt;
            &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;generate&lt;/goal&gt;
            &lt;/goals&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>

<h2>swagger2markup-maven-plugin</h2>

<pre><code>&lt;!-- Use the swagger2markup plugin to generate asciidoc from swagger.json --&gt;
&lt;plugin&gt;
    &lt;groupId&gt;io.github.swagger2markup&lt;/groupId&gt;
    &lt;artifactId&gt;swagger2markup-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.0.1&lt;/version&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;io.github.swagger2markup&lt;/groupId&gt;
            &lt;artifactId&gt;swagger2markup-import-files-ext&lt;/artifactId&gt;
            &lt;version&gt;1.0.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;io.github.swagger2markup&lt;/groupId&gt;
            &lt;artifactId&gt;swagger2markup&lt;/artifactId&gt;
            &lt;version&gt;1.0.1&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;configuration&gt;
        &lt;swaggerInput&gt;${swagger.directory}/swagger.yaml&lt;/swaggerInput&gt;
        &lt;outputDir&gt;${asciidoc.directory}&lt;/outputDir&gt;
        &lt;config&gt;
            &lt;swagger2markup.markupLanguage&gt;ASCIIDOC&lt;/swagger2markup.markupLanguage&gt;
            &lt;swagger2markup.pathsGroupedBy&gt;TAGS&lt;/swagger2markup.pathsGroupedBy&gt;
            &lt;swagger2markup.extensions.dynamicOverview.contentPath&gt;${project.basedir}/src/docs/asciidoc/extensions/overview&lt;/swagger2markup.extensions.dynamicOverview.contentPath&gt;
            &lt;swagger2markup.extensions.dynamicDefinitions.contentPath&gt;${project.basedir}/src/docs/asciidoc/extensions/definitions&lt;/swagger2markup.extensions.dynamicDefinitions.contentPath&gt;
            &lt;swagger2markup.extensions.dynamicPaths.contentPath&gt;${project.basedir}/src/docs/asciidoc/extensions/paths&lt;/swagger2markup.extensions.dynamicPaths.contentPath&gt;
            &lt;swagger2markup.extensions.dynamicSecurity.contentPath&gt;${project.basedir}src/docs/asciidoc/extensions/security&lt;/swagger2markup.extensions.dynamicSecurity.contentPath&gt;
        &lt;/config&gt;
    &lt;/configuration&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;?m2e execute onConfiguration?&gt;
            &lt;phase&gt;generate-sources&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;convertSwagger2markup&lt;/goal&gt;
            &lt;/goals&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>