2

I have configured swagger-codegen-plugin like that

    <plugin>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-codegen-maven-plugin</artifactId>
        <version>2.1.5</version>
        <executions>
            <execution>
                <goals>
                    <goal>generate</goal>
                </goals>
                <configuration>
                    <inputSpec>${project.basedir}/src/main/resources/model.json</inputSpec>
                    <language>java</language>
                    <configOptions>
                        <sourceFolder>src/gen/java/main</sourceFolder>
                    </configOptions>
                    <modelPackage>com.mypackage</modelPackage>
                    <environmentVariables>
                        <models></models>
                        <supportingFiles>false</supportingFiles>
                    </environmentVariables>
                </configuration>
            </execution>
        </executions>
    </plugin>

Everything works, but when I change language to <language>html</language> nothing was generate.

So how to generation staitc html documentation?

3
  • Can you check the target/generated-sources/swagger/ folder? There should be a index.html file. I'm not sure whether it takes the sourceFolder Commented Jul 20, 2016 at 12:43
  • There are some files, but not html files at all!!! Commented Jul 20, 2016 at 13:03
  • Maybe the maven log would be helpful. It is really hard to figure it out. Your config looks good Commented Jul 20, 2016 at 13:15

1 Answer 1

1

At present, you are specifying the language as <language>java</language> to generate html this should either be<language>html</language> or<language>html2</language> as this specifies the output language generator for swagger-codegen.

There are 2 different html generators so you will need to decide your preferred flavour.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.