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 migrating to Micronaut 4, one of our HTTP endpoint failed with the following error:
Failed to convert argument [q] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 1
This is the endpoint in question, it is called in POST with a JSON body.
@ExecuteOn(TaskExecutors.IO)
@Post(uri = "executions/daily")
@Operation(tags = {"Stats"}, summary = "Get daily statistics for executions")
publicList<DailyExecutionStatistics> dailyStatistics(
@Parameter(description = "A string filter") @NullableStringq,
@Parameter(description = "A namespace filter prefix") @NullableStringnamespace,
@Parameter(description = "A flow id filter") @NullableStringflowId,
@Parameter(description = "The start datetime, default to now - 30 days") @Nullable@Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") ZonedDateTimestartDate,
@Parameter(description = "The end datetime, default to now") @Nullable@Format("yyyy-MM-dd'T'HH:mm[:ss][.SSS][XXX]") ZonedDateTimeendDate
) {
// ...
}
We have multiple endpoints and only this one fail, we notice that even if we use a JSON body, the request body is not bind to a single POJO but to multiple request parameters. This may be the cause of the issue.
Steps To Reproduce
It can be shown in action in the following branch and this test shows the issue.
Environment Information
No response
Example Application
No response
Version
4.0.7
The text was updated successfully, but these errors were encountered:
Expected Behavior
The endpoint works in both Micronaut 3 and 4
Actual Behaviour
After migrating to Micronaut 4, one of our HTTP endpoint failed with the following error:
This is the endpoint in question, it is called in POST with a JSON body.
We have multiple endpoints and only this one fail, we notice that even if we use a JSON body, the request body is not bind to a single POJO but to multiple request parameters. This may be the cause of the issue.
Steps To Reproduce
It can be shown in action in the following branch and this test shows the issue.
Environment Information
No response
Example Application
No response
Version
4.0.7
The text was updated successfully, but these errors were encountered: