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

avoid producing nil metadata #1242

Merged
merged 1 commit into from
Apr 3, 2023
Merged

Conversation

ripienaar
Copy link
Contributor

It is quite hard to validate in a way that allows object or nil using jsonschema so metadata should either be omitempty or always be object.

During initial reviews we made it not omitempty, so this ensures its never nil. Can also make it omitempty if cleaner.

Copy link
Collaborator

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

coveralls commented Apr 3, 2023

Coverage Status

Coverage: 84.926% (-0.2%) from 85.141% when pulling 9c51370 on ripienaar:nil_metadata into 8de687a on nats-io:main.

It is quite hard to validate in a way that allows object or
nil using jsonschema so metadata should either be omitempty
or always be object.

During initial reviews we made it not omitempty, so this
ensures its never nil.  Can also make it omitempty if
cleaner.

Signed-off-by: R.I.Pienaar <rip@devco.net>
@ripienaar
Copy link
Contributor Author

Tests are finally green, sorry I missed those failures @piotrpio

@piotrpio piotrpio merged commit 282b7ea into nats-io:main Apr 3, 2023
1 check passed
@ripienaar ripienaar deleted the nil_metadata branch April 3, 2023 18:18
@piotrpio piotrpio mentioned this pull request May 23, 2023
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.

None yet

3 participants