Skip to content

Conversation

sugmanue
Copy link
Contributor

@sugmanue sugmanue commented May 15, 2025

Background

Add a new protocol tests for the JSON REST protocol. When we have a response object with a member that's bound to the HTTP payload, such as

@output
structure HttpPayloadWithStructureInputOutput {
    @httpPayload
    nested: NestedPayload,
}

And the response body is empty, then the member MUST be set to null.

Regression for this case was reported to the Java SDK V2 and fixed on #6111.

Testing

  • How did you test these changes?

Links

  • Links to additional context, if necessary
  • Issue #, if applicable (see here for a list of keywords to use for linking issues)

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

@sugmanue sugmanue merged commit 79e64ac into smithy-lang:main May 20, 2025
7 of 8 checks passed
joewyz pushed a commit that referenced this pull request May 28, 2025
* Add a test for explicit payload member and empty body responses

* Remove body media-type, this won't be set by servers
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