Closed scprek closed 3 weeks ago
I also was wondering about an enum for the version as it "worked" meaning it generated something valid in the OpenAPI generator, but I didn't test it out. I'm ok making that a different ticket if it makes sense to have.
Ignore the nullable aspect, I fixed that issue by making it a required field in the schema.
@scprek So, this is bug inside openapi-generator. It can't identificate discriminator type in this case, but, we are micronaut. That's why we fixed a bug in our generator :-)
what about the override missing? That's upstream too?
yeah, all fixed in this PR
Oh I missed the association to the PR in the issue. Thanks!
@scprek So, this is bug inside openapi-generator. It can't identificate discriminator type in this case, but, we are micronaut. That's why we fixed a bug in our generator :-)
I guess I'm still confused by this statement. Above I showed in the collapsed details section of expected behavior that the openapi generator tool correctly identifies the discriminator type of Int.
Well, perhaps it is. I checked the openapi generator code for Java, not for Kotlin. In any case, now our generator works correctly too
Expected Behavior
interface has string
Subclass has Int and override
OpenAPI Kotlin Generator
Actual Behaviour
Steps To Reproduce
I also tried with a reusable schema for
version
propertyEnvironment Information
Noticed with both Java and Kotlin Code gen
Example Application
No response
Version
4.5.1