Skip to content

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

@FloKaemmerer

Description

@FloKaemmerer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions