OpenAPITools / OpenAPITools/openapi-generator
[BUG] Issue with Additional Properties backward compatibility
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Version 4.x
To maintain backward compatibility with additional-properties there is check here
if (additionalProperties == null && configOptions.containsKey("additional-properties")) {
additionalProperties list is defined as maven parameter above
@Parameter(name = "additionalProperties", property = "openapi.generator.maven.plugin.additionalProperties")
private List<String> additionalProperties;
Maven engine always initializes this list to be empty list. Because of this condition given above is never true. This creates a problem to maintain backward compatibility
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 in modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java around line 650, and read the additionalProperties Maven parameter declaration above it. Verify how Maven initializes the list and how the backward-compatibility condition handles an empty list versus an absent value. Done means the legacy additional-properties behavior is preserved when the Maven parameter is initialized empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100