-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
Description
Description
If child defines a parameter as required but parent does not have it as required, it generates a new parameter for the child (name shadowing).
openapi-generator version
6.0.1 (using java)
Generation Details & Steps to reproduce
e.g. with a yaml similar to this:
parent:
properties:
param:
type: string
child:
allOf:
$ref: 'parent'
type: object
required:
param
Then the child class has its own attribute 'param' and does not inherit from parent (neither the attribute nor its getter and setter). Hence inheritance is not done properly.
Expected Behavior
I expect the child class to inherit the 'param' and its setter and getter from the parent.
Suggest a fix
I think the 'pojo.mustache' need the {{isInherited}} to call super in those cases.