user2902165
user2902165

Reputation: 303

How to pass resolve-fully to swagger-codegen-maven-plugin?

If I manually generate a client API with swagger-codegen-cli like:

java -jar swagger-codegen-cli-3.0.21.jar generate -i file:///C:/Fredrik/Applications/Swagger/da_2.json -l java -o da_2_client -c da_2_options.json --resolve-fully

... then I will get all the classes that I need.

But how do you pass the parameter --resolve-fully if you run the swagger-codegen-maven-plugin from within maven?

<plugin>
    <groupId>io.swagger.codegen.v3</groupId>
    <artifactId>swagger-codegen-maven-plugin</artifactId>
    <version>3.0.21</version>
    <executions>
        <execution>

            <id>deviceagent-client-interface</id>
            <goals>
                <goal>generate</goal>
            </goals>

            <configuration>

                <!-- the json-file -->
                <inputSpec>${basedir}/src/main/resources/da_2.json</inputSpec>

                <!-- target to generate java client code -->
                <language>java</language>

                <!-- the output dir -->
                <output>${basedir}</output>

                <!-- the config file -->
                <configurationFile>${basedir}/src/main/resources/da_2_options.json</configurationFile>

            </configuration>

        </execution>
    </executions>
</plugin>

Without --resolve-fully I miss a couple of classes, like InlineResponse200.

Best regards Fredrik

Upvotes: 0

Views: 980

Answers (1)

user2902165
user2902165

Reputation: 303

It looks like you just do not need to pass --resolve-fully. The classes generated without it is just enough.

Upvotes: 1

Related Questions