- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
I have type Result<A, B> which is returned by many of my methods.
class Result<A,B> { A value; List<B> extra; ... } When Result<Void, Void> is returned the returned definition correctly removes the value property, but the extra property is specified as an array with no type.
Result«Void,Void»: { properties: { extra: { type: "array" } } }, I tried adding an alternateTypeRule to map this to another class type that would have the correct signature, but this didn't result in the expected result. The type name changed in the definitions list, but not in the method signatures, and the properties of the original Result type were used, not the SimpleResult properties.
.alternateTypeRules(newRule(typeResolver.resolve(Result.class, Void.class, Void.class), typeResolver.resolve(SimpleResult.class)))