Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lpellegr opened this issue Aug 27, 2024 · 0 comments
Open

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

lpellegr opened this issue Aug 27, 2024 · 0 comments

Comments

@lpellegr
Copy link

lpellegr commented Aug 27, 2024

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

@lpellegr lpellegr changed the title Invalid JSON feed output Invalid JSON feed output: 'empty' property outside of the schema Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant