OpenAPITools / OpenAPITools/openapi-generator
[BUG] Generated code uses class from gson internal package
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
The class org.openapitools.client.JSON makes use of com.google.gson.internal.bind.util.ISO8601Utils. This is a internal class from gson and this is problematic in the context of OSGi.
openapi-generator version
4.0.3
OpenAPI declaration file content or url
Command line used for generation
Usage of gradle plugin with the standard configuration of the "java" generator
Steps to reproduce
Related issues/PRs
Suggest a fix
Use different/own implementation for this utility functions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated org.openapitools.client.JSON class produced by the standard Java generator through the Gradle plugin, and inspect its use of gson's internal ISO8601Utils. Reproduce generation with version 4.0.3, then verify that the generated client no longer depends on a gson internal package while retaining the date utility behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100