Skip to content

Conversation

@connyduck
Copy link
Contributor

Motivation

This makes it possible to serialize ContentItems with Jackson again (it breaks the circular reference chain). It helps with our custom caching solution.

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

@Simply007
Copy link
Contributor

hello @connyduck ,

I will take a look at it hopefully this week (mainly the consequences of the decorator). Could you describe what is your core issue?

Ideally, if you can add a test for this functionality - something like there is a JSON response from Kontent and I need to deserialize it to the model X and serialize it back.

@connyduck
Copy link
Contributor Author

I added a test that crashes with Infinite recursion (StackOverflowError) without the annotation.

Copy link
Contributor

@Simply007 Simply007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool, it seems there are no unexpected consequences of adding the decorator for parent property.

Thanks for the test!

Note for feature reference: Lombok equals implementation is taking care of property equality check for the new test.

@Simply007 Simply007 merged commit 557b0f2 into kontent-ai:master Dec 11, 2020
@connyduck connyduck deleted the patch-1 branch December 11, 2020 08:42
@Simply007
Copy link
Contributor

@connyduck - thanks for the pull request - it should be released in v4.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants