Skip to content

Remove enum usage for header/trailer in smithy-http and aws-sdk-signers#670

Open
ubaskota wants to merge 2 commits intosmithy-lang:developfrom
ubaskota:enum_usage_header
Open

Remove enum usage for header/trailer in smithy-http and aws-sdk-signers#670
ubaskota wants to merge 2 commits intosmithy-lang:developfrom
ubaskota:enum_usage_header

Conversation

@ubaskota
Copy link
Copy Markdown

Issue #, if available:

Description of changes:
FieldPosition was an enum, which meant any library implementing the Field protocol had to import smithy-http just to reference the enum values. Switch to Literal["header", "trailer"] so that implementations can pass equality checks using plain strings without depending on smithy-http. Also change identity checks (is) to equality (==) to ensure correctness with string literals.

Testing

  • Updated the tests to reflect the changes and verified that all tests pass.

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

@ubaskota ubaskota requested a review from a team as a code owner March 26, 2026 18:36
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.

1 participant