[BUG] Inheritance and Maps canno coexist
Created by: maxper75
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?
Description
The attached file represents an inheritance containing, in the subclass, a hashmap with a custom type. Well, I don't get this, but I get different results. As a result I'd expect to get
public class SubObjectDTO extends SuperObjectDTO {
private Map<String, MapElementDTO> additionalMap;
....[getters and setter and whatever more]---
}
public class SuperObjectDTO {
private UUID id;
private String superProperty1;
private String superProperty2;
....[getters and setter and whatever more]---
}
public class MapElementDTO {
private int property1;
private boolean property2;
private String property3;
....[getters and setter and whatever more]---
}
while I get the Super class and the map element ok, the subclass varies depending from the inclusion of the clause of allOf. If I add this, I see the element with the properties of the superclass, but no additionalProperties. If i remove this, I dont get the super class props but just the additional ones. Is this a bug or I'm doing a mistake?
openapi-generator version
openapi-generator version 4.2.2
OpenAPI declaration file content or url
See attached gist https://gist.github.com/maxper75/62a7cdac09037679641c56f552bc21ef#file-buggy-openapi-inheritance-map-json
Command line used for generation
openapi-generator generate -g spring -i model.json -o prova
Steps to reproduce
just launch the command :D