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

fix: don't send 'null' when no prereqs present #251

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

cwaldren-ld
Copy link
Contributor

Currently we send "prerequisites": null in the tests that don't deal with prerequisites. While this should be acceptable to SDKs without causing issues, it's not what LaunchDarkly would send (it should omit the array.)

This adds omitEmpty to omit the key altogether if it's empty.


This did catch an implementation bug I had in the .NET client, so it's clearly valuable to test setting properties to null. But I don't think we consistently do that on purpose in the existing tests (could be wrong, didn't audit).

@cwaldren-ld cwaldren-ld requested a review from a team as a code owner October 28, 2024 21:22
@cwaldren-ld cwaldren-ld merged commit 6480865 into v2 Oct 28, 2024
2 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/omit-empty-prereqs branch October 28, 2024 22:43
cwaldren-ld pushed a commit that referenced this pull request Oct 29, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.24.2](v2.24.1...v2.24.2)
(2024-10-29)


### Bug Fixes

* don't send 'null' when no prereqs present
([#251](#251))
([6480865](6480865))
* summary events should allow null default value in counter
([#253](#253))
([9b4d98f](9b4d98f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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