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

Update opinionated protocol tests to not describe optional behavior #481

Merged
merged 4 commits into from
Jul 6, 2020

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jul 2, 2020

Removes the protocol tests for HTTP Prefix Header deserialization, deserializing to an empty map vs null value. Null vs empty map will be SDK implementation specific distinction. If there was a way to model empty as an expectation that would encompass both null and empty but initialized map this test would be more portable.

Updates the empty input output serialization protocol test to expect empty payload not empty JSON object as the serialized result. It doesn't look like the REST-JSON protocol should be serializing empty JSON object when no members are serialized.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jasdel added 4 commits July 6, 2020 10:08
Removes the protocol tests for HTTP Prefix Header deserialization,
deserializing to an empty map vs null value. Null vs empty map will be
SDK implementation specific distinction. If there was a way to model
`empty` as an expectation that would encompass both null and empty but
initialized map this test would be more portable.

Updates the empty input output serialization protocol test to expect
empty payload not empty JSON object as the serialized result. It doesn't
look like the REST-JSON protocol should be serializing empty JSON
object when no members are serialized.
@jasdel jasdel force-pushed the fixup/RestJSONProtoTest branch from 381e956 to 254f730 Compare July 6, 2020 21:54
@jasdel jasdel requested a review from mtdowling July 6, 2020 21:54
@mtdowling mtdowling merged commit 986b389 into smithy-lang:master Jul 6, 2020
@jasdel jasdel deleted the fixup/RestJSONProtoTest branch July 6, 2020 23:06
kggilmer pushed a commit to kggilmer/smithy that referenced this pull request Jul 14, 2020
…mithy-lang#481)

* Update opinionated protocol tests to not describe optional behavior

Removes the protocol tests for HTTP Prefix Header deserialization,
deserializing to an empty map vs null value. Null vs empty map will be
SDK implementation specific distinction. If there was a way to model
`empty` as an expectation that would encompass both null and empty but
initialized map this test would be more portable.

Updates the empty input output serialization protocol test to expect
empty payload not empty JSON object as the serialized result. It doesn't
look like the REST-JSON protocol should be serializing empty JSON
object when no members are serialized.
et22 pushed a commit to et22/smithy that referenced this pull request Jul 21, 2020
…mithy-lang#481)

* Update opinionated protocol tests to not describe optional behavior

Removes the protocol tests for HTTP Prefix Header deserialization,
deserializing to an empty map vs null value. Null vs empty map will be
SDK implementation specific distinction. If there was a way to model
`empty` as an expectation that would encompass both null and empty but
initialized map this test would be more portable.

Updates the empty input output serialization protocol test to expect
empty payload not empty JSON object as the serialized result. It doesn't
look like the REST-JSON protocol should be serializing empty JSON
object when no members are serialized.
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