Skip to content

fix(server): auto-attach of ValidationException#4588

Merged
jasgin merged 1 commit intomainfrom
fix-validation-exception-auto-attach
Apr 2, 2026
Merged

fix(server): auto-attach of ValidationException#4588
jasgin merged 1 commit intomainfrom
fix-validation-exception-auto-attach

Conversation

@jasgin
Copy link
Copy Markdown
Contributor

@jasgin jasgin commented Apr 1, 2026

Fix two bugs in AttachValidationExceptionToConstrainedOperationInputs that prevented smithy.framework#ValidationException from being automatically attached to constrained operations in certain models.

  1. Adds ensureValidationExceptionShapeExists() to add the shape if missing, in case a transforms like removeUnusedShapes is used.

  2. Added checking for resource operations. The transformer previously used service.operations (direct operations only), missing operations on resources that also have constrained inputs.

Motivation and Context

Description

Testing

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.
  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

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

@jasgin jasgin requested a review from a team as a code owner April 1, 2026 20:16
@jasgin jasgin force-pushed the fix-validation-exception-auto-attach branch 2 times, most recently from d82ecee to 1adbb19 Compare April 1, 2026 20:41
…perations

Fix two bugs in AttachValidationExceptionToConstrainedOperationInputs that prevented smithy.framework#ValidationException from being automatically attached to constrained operations in certain models.

1. Adds ensureValidationExceptionShapeExists() to add the shape if missing, in case a transforms like removeUnusedShapes is used.

2. Added checking for resource operations. The transformer previously used service.operations (direct operations only), missing operations on resources that also have constrained inputs.
@jasgin jasgin force-pushed the fix-validation-exception-auto-attach branch from 1adbb19 to 811e49e Compare April 1, 2026 20:46
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@jasgin jasgin merged commit e112bea into main Apr 2, 2026
50 checks passed
@jasgin jasgin deleted the fix-validation-exception-auto-attach branch April 2, 2026 14:14
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