-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Labels
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
Generating Model for a Object that references an object that has "additionalProperties" fails to generate the import for HashMap
openapi-generator version
affected Version(s): 4.0.0 to 4.0.3
Not affected: 3.3.4 (sets the field to null, so no import is needed here)
OpenAPI declaration file content or url
Snipped:
WithAdditinalPropertiesDTO:
type: object
properties:
id:
type: string
additionalProperties: {}
BrokenDTO:
type: object
properties:
id:
type: string
withAdditinalProperties:
$ref: '#/components/schemas/WithAdditinalPropertiesDTO'gist: https://gist.github.com/FloKaemmerer/54a9663183688b0d5658a8064c32f695
Command line used for generation
mvn clean compile
used pom: https://gist.github.com/FloKaemmerer/9789a0fc5bfca47b6c4cf50c7573434b
Steps to reproduce
Related issues/PRs
Suggest a fix
FelixA