-
Notifications
You must be signed in to change notification settings - Fork 6
fix issue: createItem not serializing Nothings correctly #81
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for adding tests! I left a couple of comments not entirely related to your fix or the tests, but that should still be addressed.
The CI is failing due to an issue with the GitHub Actions runner not being able to use secrets (i.e. the Rollbar token) in external PRs coming from forks. We investigated this a while ago, this is an intentional limitation to avoid security breaches such as people logging or abusing secrets when creating PRs. I've tested your PR locally and can confirm that the tests are passing 🎉
Oh, so the CI failing is something that is expected? Phew, this would've saved me some time trying to solve it, I wish I knew it earlier! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Good job :)
Solves #23. |
Some fields were reported in the issue as appearing with their values as null, when in fact they shouldn'd have appeared at all in the JSON serialization.
I've included them inside catMaybes so this is corrected. I've also created a couple of tests to determine whether a couple of fields (one of them with Nothing, the other one with a Just value) appear in the JSON serialization. Lastly, I've included a another dependency for the purposes of converting among Text, String, Bytestring and lazy Bytestring mostly for the new tests.