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

[BUG] [JAVA] [5.0.0-beta2] Using java8-localdatetime as Datelibrary extends ApiClient with JavaTimeFormatter (should only apply to java8 datelibrary) #7952

Closed
FloKaemmerer opened this issue Nov 16, 2020 · 1 comment

Comments

@FloKaemmerer
Copy link

When using java8-localdatetime as datelibrary, compiling of ApiClient fails since it extends 'JavaTimeFormatter' which should only apply for java8 datelibrary.

Most likely because of PR #7190

openapi-generator version

5.0.0-beta2

OpenAPI declaration file content or url

Any Valid yml/json

Generation Details

maven generator plugin in config:

 <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>5.0.0-beta2</version>
                <configuration>
                    <generatorName>java</generatorName>
                    <generateModelTests>false</generateModelTests>
                    <generateApiTests>false</generateApiTests>
                    <generateModelTests>false</generateModelTests>
                    <generateModelDocumentation>false</generateModelDocumentation>
                    <configOptions>
                        <library>jersey2</library>
                        <hideGenerationTimestamp>true</hideGenerationTimestamp>
                        <delegatePattern>true</delegatePattern>
                        <java8>true</java8>
                        <dateLibrary>java8-localdatetime</dateLibrary>
                    </configOptions>
                    <additionalProperties>failOnEmptyBeans=false</additionalProperties>
                    <inputSpec/>
                </configuration>
                <executions>
                    <execution>
                        <id>example</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>example.yml</inputSpec>
                            <invokerPackage>example.com.generated.invoker</invokerPackage>
                            <modelPackage>example.com.generated.model</modelPackage>
                            <apiPackage>example.com.generated.api</apiPackage>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
Steps to reproduce

mvn clean package

Related issues/PRs

#7190

@wing328
Copy link
Member

wing328 commented Jan 29, 2021

Closed via #8348

Thanks for the fix by @borsch

@FloKaemmerer please pull the latest master to give it another try.

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

No branches or pull requests

2 participants