OpenAPITools / OpenAPITools/openapi-generator

[BUG] Auto generated Client side Java source files missing "import java.util.Arrays"

Open
#8,408 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Auto generated client side java source files missing "import java.util.Arrays". This is causing compilation issues while generating client side stub jars. For example the Attachment.java generated is missing "import java.util.Arrays"

openapi-generator version

openapi-generator-4.1.1.jar

OpenAPI declaration file content or url

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run ./gradlew clean genClient with the supplied OpenAPI declaration and inspect the generated client model, especially Attachment.java. Trace the Java generator/template path that produces imports, then verify that generated sources compile and that java.util.Arrays appears wherever the generated code uses it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.