Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Iwavvnc1 opened this issue Aug 5, 2023 · 0 comments
Open

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

Iwavvnc1 opened this issue Aug 5, 2023 · 0 comments

Comments

@Iwavvnc1
Copy link
Owner

Iwavvnc1 commented Aug 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant