Skip to content

fix: incorrect code generation by swagger-codegen-maven-plugin #1

Description

@thisisaleksander

In case of code generation via swagger-codegen-maven-plugin there are problems with escaping some quote symbols in the sources generated. This causes compilation errors.
The following plugin settings are used for repro:

    <build>
        <plugins>
            <plugin>
                <groupId>io.swagger.codegen.v3</groupId>
                <artifactId>swagger-codegen-maven-plugin</artifactId>
                <version>3.0.41</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/../ewm-main-service-spec.json</inputSpec>
                            <language>spring</language>
                            <library>spring-boot</library>
                            <apiPackage>${apiPackage}</apiPackage>
                            <modelPackage>${modelPackage}</modelPackage>
                            <configOptions>
                                <sourceFolder>src/main/java/</sourceFolder>
                                <dateLibrary>java8</dateLibrary>
                                <interfaceOnly>true</interfaceOnly>
                                <useBeanValidation>true</useBeanValidation>
                                <performBeanValidation>true</performBeanValidation>
                            </configOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

See the whole demo pom.xml in terekhovmv/java-explore-with-me-fixes@da018e0 .

This issue is not reproduced for specs of stats service.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions