-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
Description
According to the latest OAS3.0 specification the following is a perfect fine example of inheritance:
Animal:
type: object
properties:
name:
type: string
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- type: object
properties:
breed:
type: string
Till version 4.3.0 it works fine, the pojo is generated as:
public class Cat extends Animal{
String breed;
}
From version 5.0.0 I instead get:
public class Cat {
String name;
String breed;
}
In order to make this work in version 5.0.x I have to edit the specification like this:
Animal:
type: object
discriminator:
propertyName: className
properties:
name:
type: string
Is this intentional? I find it much more confusing now
tahitiangabriel, antoniaelsen and Mettbrotjoaomlneto, hmalatini and guilhem-lk