Open martinbonnin opened 6 days ago
Hey @martinbonnin,
Okay, I see. Without having looked at the code, I think this might be just a branch missing somewhere in the code where I left a TODO. Reason being that there is no name defined for the allOf
type here, so a name needs to be generated.
A generalised name generation could be:
sealed interface GetHelloWorldResponse
@JvmInline value class First(val id: Int): GetHelloWorldResponse
@JvmInline value class Second(val username: String): GetHelloWorldResponse
Much more desirable would be:
sealed interface GetHelloWorldResponse
@JvmInline value class Id(val id: Int): GetHelloWorldResponse
@JvmInline value class Username(val value: String): GetHelloWorldResponse
I'm open to building a special case into the (not yet overrideable) name generation part, to detect that if a name needs to be generated for an object with a single property, it can use the property name for name generation. In the case there is no conflict in the property names of the different subtypes of course.
Thank you for opening the issues 🙏
It's an allOf()
though so my understanding is more that it should contain all properties?
@JvmInline value class GetHelloWorldResponse(val id: Int, val value: String)
Not 100% sure what's happening here. I think the following is valid?