Java generate a wrong class using inheritence and discriminator
Given this config:
riskObject:
type: object
discriminator:
propertyName: riskType
properties:
riskType:
type: string
classOne:
type: object
allOff:
- $ref: ''#/components/schemas/riskType'
......
After Generating a class with prefix "Api" the result is:
@Validated
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-01-30T15:17:33.825+01:00[Europe/Paris]")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true )
@JsonSubTypes({
@JsonSubTypes.Type(value = **classRiskOne.class**, name = "classRiskOne")
})
this result is wrong. i excpet ApiClassRiskOne.class, this is wok fin with generator version 3.1.2 but there is a regression since version 3.2.0
Please raise tooling-related issues on the relevant repository. This repository is for the OpenAPI specification itself. Thanks.