Skip to content

refactor: consolidate smithy-client http binding and utility helpers (2/3) - #360

Closed
jterapin wants to merge 2 commits into
serde-opt/1-serdefrom
serde-opt/2-client
Closed

refactor: consolidate smithy-client http binding and utility helpers (2/3)#360
jterapin wants to merge 2 commits into
serde-opt/1-serdefrom
serde-opt/2-client

Conversation

@jterapin

@jterapin jterapin commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part 2 of 3 splitting #358. Stacked on top of #359.

Summary

Moves protocol-neutral HTTP binding and lookup logic out of individual plugins into shared Smithy::Client helpers, and prunes redundant schema attributes from the generator now that the runtime derives them from traits.

Changes

  • Add Smithy::Client::HttpBinding for shared request/response indexing
  • Consolidate helpers into Smithy::Client::Util (endpoint, encoding)
  • Centralize schema-driven lookups used by default_params, param_validator, host_prefix, request_compression, transfer_encoding, and rpc_v2_cbor
  • Drop generator-side http_payload assignments; runtime resolves them

Stack

Validation

  • bundle exec rspec per gem: smithy-schema (161), smithy-json (78), smithy-xml (67), smithy-cbor (265), smithy-client (897, 2 pending). All pass.

Consolidates the JSON, XML, and CBOR serde optimizations plus the
smithy-schema extension helpers they share.

- Cache list/map member and wire-name lookups on hot paths
- Reuse Builder and Parser instances within codecs
- Avoid coercion and helper indirection in union/structure handling
- Align JSON and CBOR parser lookups with schema metadata
- Honor protocol default timestamp behavior across serde
- Lazily buffer XML parser text chunks; cache flattened trait lookups
- Move sparse? and related helpers from ExtensionHelpers into Extension
- Focus serde specs on behavior
Moves protocol-neutral HTTP binding and lookup logic out of individual
plugins into shared Smithy::Client helpers, and prunes redundant schema
attributes from the generator now that the runtime derives them from
traits.

- Add Smithy::Client::HttpBinding for shared request/response indexing
- Consolidate helpers into Smithy::Client::Util (endpoint, encoding)
- Centralize schema-driven lookups used by default params, param
  validation, host prefix, request compression, transfer encoding,
  and rpc_v2_cbor
- Drop generator-side http_payload assignments; runtime resolves them
@jterapin

jterapin commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Closing this superseded draft; the work is consolidated into PR #359.

@jterapin jterapin closed this Sep 9, 2026
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