Skip to content

refactor: move XML shape metadata into smithy-xml extensions - #355

Open
jterapin wants to merge 7 commits into
schema-extensionsfrom
schema-extensions-xml
Open

refactor: move XML shape metadata into smithy-xml extensions#355
jterapin wants to merge 7 commits into
schema-extensionsfrom
schema-extensions-xml

Conversation

@jterapin

@jterapin jterapin commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Context

This is the third PR in the stack and should be reviewed on top of #353.

PR #353 moved JSON and CBOR wire-name resolution into protocol-specific extensions and normalized generated runtime metadata around model_name and symbolized serde traits. This follow-up does the same cleanup for XML: move XML-specific metadata and lookup logic into Smithy::Xml::Extension while keeping restXml behavior stable.

What changed

  • Added Smithy::Xml::Extension helpers for XML serde metadata derived from Smithy traits.
  • Moved XML structure/member naming through extension helpers that prefer the Smithy @xmlName trait.
  • Moved XML attribute vs element partitioning through extension helpers that read the Smithy @xmlAttribute trait.
  • Moved XML namespace attribute derivation through extension helpers that read the Smithy @xmlNamespace trait.
  • Updated the XML parser to resolve modeled members through an XML member index built by the extension.
  • Updated XML-related codegen expectations so the runtime path continues to use model_name and symbolized serde traits consistently.

Non-goals

  • No JSON or CBOR behavior changes in this PR.
  • No Query runtime compatibility change in this PR.

Testing

  • bundle exec rspec gems/smithy-xml/spec/smithy-xml/extension_spec.rb gems/smithy-xml/spec/smithy-xml/builder_spec.rb
  • bundle exec rspec gems/smithy/spec/interfaces/schema/serde_traits_spec.rb
  • bundle exec rake test:protocols:restXml in aws-sdk-ruby-staging
    • result: 256 examples, 0 failures, 2 pending

--
Written with AI assistance and reviewed by jterapin.

@jterapin jterapin changed the title refactor: move XML shape metadata into smithy-xml extensions [DRAFT] refactor: move XML shape metadata into smithy-xml extensions Aug 20, 2026
@jterapin
jterapin force-pushed the schema-extensions-xml branch from 73dcc15 to d1e362f Compare August 20, 2026 16:06
@jterapin jterapin changed the title [DRAFT] refactor: move XML shape metadata into smithy-xml extensions refactor: move XML shape metadata into smithy-xml extensions Aug 20, 2026
@jterapin
jterapin marked this pull request as ready for review August 20, 2026 16:26
@jterapin
jterapin requested a review from a team as a code owner August 20, 2026 16:26
@jterapin
jterapin force-pushed the schema-extensions-xml branch from 7621e38 to 146a8f1 Compare August 20, 2026 19:20
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