Skip to content

Invalid JSON feed output: 'empty' property outside of the schema #382

@laurentpellegrino

Description

@laurentpellegrino

Expected Behavior

I expect author entries to be serialized without the "empty" property:

"authors": [
  {
    "name": "John Doe",
    "url": "mailto:[email protected]",
    "avatar": "https://staging.storage.noticeable.io/users/1hvH7RWx9CWe8QCskAHBcsgpbkF2/01h5m04a42c02czp09khyrx3bm-avatar.png"
  }
]

Actual Behaviour

When serialized, the JSON feed contains an empty property that is not valid:

"authors": [
  {
    "name": "John Doe",
    "url": "mailto:[email protected]",
    "avatar": "https://staging.storage.noticeable.io/users/1hvH7RWx9CWe8QCskAHBcsgpbkF2/01h5m04a42c02czp09khyrx3bm-avatar.png",
    "empty": false
  }
]

Steps To Reproduce

The issue comes from this code:

https://github.com/micronaut-projects/micronaut-rss/blob/4.4.x/jsonfeed-core/src/main/java/io/micronaut/rss/jsonfeed/JsonFeedAuthor.java

I guess a @JsonIgnore annotation or Serde equivalent should be used on public boolean isEmpty() {.

Screenshot from 2024-08-27 10-02-09

Environment Information

No response

Example Application

No response

Version

4.4.2

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions