Skip to content

Wrong behavior with inner list when deserializer #336

@mcruzdev

Description

@mcruzdev

Using a record like it:

public record Order(String id, List<OrderItem> items) {
    record OrderItem(Long id, String name, double price) {
    }
}
    @POST
    @Path("/webhook/orders")
    @Topic(pubsubName = "rabbitmq", name = "order.created")
    public void consume(Order order) {

The order object contains the attribute items null.

When converting the request body as String we can see the CloudEvent and the items visible.

2025-10-06 20:47:45,941 INFO  [dev.mat.OrderWebhookResource] (executor-thread-1) Handling order: {"data":{"id":"fa985994-78ce-4013-9029-81dad4787a4a","items":[{"id":1,"name":"Quarkus Stickers","price":19.99}]},"datacontenttype":"application/json","id":"10e48bf4-bc1b-4b0a-9d76-02dc9e095f55","pubsubname":"rabbitmq","source":"orders-api","specversion":"1.0","time":"2025-10-06T20:47:45Z","topic":"order.created","traceid":"00-05c688dab5e3f92bfe2f77c951a123dc-8217c1bd34eee13a-01","traceparent":"00-05c688dab5e3f92bfe2f77c951a123dc-8217c1bd34eee13a-01","tracestate":"","type":"com.dapr.event.sent"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions