Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #6801
Closed
Open
Issue created Jun 28, 2020 by Administrator@rootContributor

[BUG][JAVA] Description

Created by: IkeOTL

Description

When using the "java" generator with the "native" library config the generated "ApiClient" class has an import with missing package.

openapi-generator version

4.3.1

OpenAPI declaration file content or url
Gradle plugin task
task buildApiClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){
    generatorName = "java"
    inputSpec = "$projectDir/api-spec.yaml".toString()
    outputDir = "$projectDir/generated/".toString()
    apiPackage = "com.a.b.c.openapi.client.controllers"
    modelPackage = "com.a.b.c.openapi.client.models"
    invokerPackage = "com.a.b.c.openapi.client.client"
    configOptions = [
        dateLibrary: "java8",
        interfaceOnly: "true",
        library: "native",
        artifactId: "api-server-client"
    ]
}
Steps to reproduce

Run gradle task 'buildApiClient'

Suggested fix

Add the following missing dependency to the build.gradle on project generation: compile group: "org.openapitools", name: "jackson-databind-nullable", version: "0.2.1"

Assignee
Assign to
Time tracking