anovak
anovak

Reputation: 11

Json response from Micronaut is missing empty arrays

The response should look like:

{
    "id": "12345",
    "errors": []
}

while it looks like this

{
    "id": "12345"
}

This article helps a bit rescuing empty arrays

It turns out application.yml needs to have:

micronaut:
  serde:
    serialization:
      inclusion: NON_NULL

Description of serde properties is at Micronaut

Not really a question, just it took me some time to figure out, so just posting for others.

Upvotes: 1

Views: 15

Answers (0)

Related Questions