OpenAPITools / OpenAPITools/openapi-generator
[BUG] additionalProperties strange
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
⚠️ Important Notice
Please differentiate the bug
This repository is not responsible for the actual code generation. If you have problems with the code generation, please open the bug at OpenAPITools/openapi-generator.
Please also check if the bug is already known before you open a new bug.
🐛 Bug Report:
Describe the bug
When you specify additionalProperties, if some option is false by default, and if you switch that option to false in config - openapi builds like that option was true.
Steps to Reproduce
Steps to reproduce the behavior:
So generated code equals when:
"additionalProperties": {
"withInterfaces": false
}
and
"additionalProperties": {
"withInterfaces": true
}
But if you remove property:
"additionalProperties": {}
It will be changed to default "false"
Expected behavior
switching options on config should be expected to affect the configuration
Screenshots
If applicable, add screenshots to help explain your problem.
Operation System (please complete the following information):
- OS: MacOS
- Version [e.g. 22]
Package System (please complete the following information):
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
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
No source file or test is named. Reproduce the issue using the two additionalProperties configurations and compare the generated outputs, then trace configuration handling in the generator; done means explicitly setting withInterfaces to false produces output distinct from true while preserving the documented default when the property is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100