Skip to content

Add Smithy operation model translation to codegen - #7233

Open
Fred1155 wants to merge 2 commits into
feature/master/smithy-migrationfrom
bole/add_smithy_operations_v2
Open

Add Smithy operation model translation to codegen#7233
Fred1155 wants to merge 2 commits into
feature/master/smithy-migrationfrom
bole/add_smithy_operations_v2

Conversation

@Fred1155

@Fred1155 Fred1155 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

This PR adds the operation layer for smithy codegen migration. It's the Smithy-side counterpart to AddOperations (plus the empty input/output handling that C2J splits into AddEmptyInputShape/AddEmptyOutputShape). The goal is given the same API, produce the same OperationModels the C2J path produces. It's not wired into the generator yet and that happens in a later PR that adds the builder.

Modifications

Add AddSmithyOperations, which walks the operations reachable from a Smithy service and fills in one OperationModel each: name, protocol, deprecation, documentation, input/output types (including Unit synthesis), payload flags, exceptions, endpoint discovery, endpoint host prefix, checksums, request compression, context params, unsigned payload, and auth.
Add a ProtocolUtils.resolveProtocol(ServiceIndex, ServiceShape) overload that maps a service's applied Smithy protocol traits to the SDK protocol string, reusing the existing priority list so multi-protocol services (e.g. awsQuery + awsJson1_0) resolve the same way the C2J path resolves them.

Pagination (isPaginated) is intentionally left unset here; it depends on paginator data that a later PR adds.

Testing

AddSmithyOperationsTest and ProtocolUtilsTest covers the new overload including the multi-protocol case and the unsupported-protocol error.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@Fred1155
Fred1155 requested a review from a team as a code owner August 5, 2026 22:38
@Fred1155 Fred1155 assigned zoewangg and unassigned zoewangg Aug 6, 2026
@Fred1155
Fred1155 requested a review from zoewangg August 6, 2026 16:18
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