OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA] serializableModel setting causes invalid Java class declaration when set to true
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Using open-apigenerator-maven-plugin with serializableModel set to true causes invalid Java output. Generating java code appends Serializable with a comma on a class. Example:
ClassName extends AbstractOpenApiSchema, Serializable {
In 6.0.0, the Serializable is omitted even if the setting is true.
Expectation is it be declared as:
ClassName extends AbstractOpenApiSchema implements Serializable {
openapi-generator version
Classes were generated okay on 6.0.0, but in 6.0.1 onward to 7.0.0 all failed to create valid Java
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Set the serializableModel flag to "true"
Related issues/PRs
Suggest a fix
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 by reproducing Java generation with the open-apigenerator-maven-plugin and serializableModel set to true, then inspect the generated class declaration. Compare the output with the expected implements Serializable form and identify the generator entry point responsible; done means generated Java is valid for affected versions.
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
- 35/100