luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Accommodate nil values correctly in JSON param fetching #1762

Closed stephendolan closed 1 year ago

stephendolan commented 1 year ago

Purpose

Describe the feature or issue and link to the related issue. If no issue has been opened about this, be sure to open an issue first to discuss the need for this PR.

Description

Please include any relevant code samples or screen shots that may help to overview of this PR. Link to specific lines of code, or examples if you need to.

Checklist

jwoertink commented 1 year ago

This is probably fine. I think to really test it, we would have to tell Avram to point to main branch, then write the spec in Avram that tests this whole deal.

stephendolan commented 1 year ago

@jwoertink I actually pulled this functionality down into the helper so there's no inconsistency when this is used by other methods in the same file. It still fixes the API client failure I was seeing and passes our test suite. 🥳

Agreed that we should test this in some way, but I'm not even sure where to start :(

jwoertink commented 1 year ago

Good enough for me! Thanks for fixing it :rocket: