Skip to content

Fixed content-type serialization for lists#1144

Merged
mtdowling merged 1 commit intosmithy-lang:mainfrom
timocov:list-ser-content-type
Apr 7, 2026
Merged

Fixed content-type serialization for lists#1144
mtdowling merged 1 commit intosmithy-lang:mainfrom
timocov:list-ser-content-type

Conversation

@timocov
Copy link
Copy Markdown
Contributor

@timocov timocov commented Apr 7, 2026

Issue #, if available:

Description of changes:

I guess it is a follow-up after #1043.

Considering you have the following model:

operation Op {
  output := {
    @httpPayload
    content: StringList
  }
}

list StringList {
  member: String
}

When you run a serialization by using code similar to

ResponseSerializer serializer = httpBinding.responseSerializer()
.operation(job.operation().getApiOperation())
.payloadCodec(codec)
.payloadMediaType("application/json")
.shapeValue(output);
it gets serialized with content-type header set to text/plain, while it should be the payload content type from the serializer. This fixes this issue.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mtdowling mtdowling merged commit 3a536cc into smithy-lang:main Apr 7, 2026
2 checks passed
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