You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to Version 3.0.0 (from 2.9.2) a return type of Map<String, Instant> leads to following error message:
"Unable to find a model that matches key ModelKey{qualifiedModelName=ModelName{namespace='java.time', name='Instant'}, viewDiscriminator=null, validationGroupDiscriminators=[], isResponse=true}"
and the model for the return type is not generated but:
"
< * >:
{...}
"
The text was updated successfully, but these errors were encountered:
I was able to work around this with:
.alternateTypeRules(
new AlternateTypeRule(
typeResolver.resolve(Map.class, String.class, Instant.class),
typeResolver.resolve(Map.class, String.class, Date.class)
)
)
I think return types based on Maps are the problem. Another one I found was Map<String,MonetaryAmount>.
We have a ".directModelSubstitute(MonetaryAmount.class, MoneyNode.class)" for this, that does not work with Map-based return types. Adding
new AlternateTypeRule(
typeResolver.resolve(Map.class, String.class, MonetaryAmount.class),
typeResolver.resolve(Map.class, String.class, MoneyNode.class)
)
like above solves the problem.
After upgrading to Version 3.0.0 (from 2.9.2) a return type of Map<String, Instant> leads to following error message:
"Unable to find a model that matches key ModelKey{qualifiedModelName=ModelName{namespace='java.time', name='Instant'}, viewDiscriminator=null, validationGroupDiscriminators=[], isResponse=true}"
and the model for the return type is not generated but:
"
The text was updated successfully, but these errors were encountered: