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
  • #8383
Closed
Open
Issue created Jan 08, 2021 by Administrator@rootContributor

[BUG] supportJava6=true creates a client with dependencies that do not support Java 6

Created by: GiamBoscaro

Goodmorning,

I am trying to generate an API client in Java with Open API. Sadly, it needs to work with java 6. I enable the flag, and everything works fine in the development environment (Eclipse) running on Java 11 with compliance for Java 6. When I export the JAR and try to run it in the staging environment with JRE 1.6, I get the error ClassDefNotFound okhttp3/Interceptor. If I try to download this dependency from Maven I then get Unsupported major.minor version 52.0.

So, I am wondering if the flag supportJava6 actually does something or not, since it seems like it requires at least Java 8.

Am I doing something wrong?

I generated the client from the CLI Docker like this:

// from docker-compose.yml

version: "3.6"
services:

  openapi:
    image: openapitools/openapi-generator-cli
    volumes:
      - ".:local"
    command: generate -g java -I local/in/api.yml -o /local/out/java-client --additional-properties=supportJava6=true

Best regards

Assignee
Assign to
Time tracking