Skip to content

feat: Schema-based AWSJSON protocol#2131

Open
jbelkins wants to merge 3 commits intoepic/sbsfrom
jbe/schema_based_aws_json
Open

feat: Schema-based AWSJSON protocol#2131
jbelkins wants to merge 3 commits intoepic/sbsfrom
jbe/schema_based_aws_json

Conversation

@jbelkins
Copy link
Copy Markdown
Collaborator

@jbelkins jbelkins commented Mar 29, 2026

Description of changes

  • Use the schema-based AWS JSON implementation in the accompanying smithy-swift PR
  • Update codegen & integration tests accordingly

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

class AWSJSONCustomizations : AWSHTTPProtocolCustomizations() {
class AWSJSONCustomizations(
private val version: String,
) : AWSHTTPProtocolCustomizations() {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type now has a version param so it can be tailored for either AWS JSON 1.0 or 1.1.

_ = try await mockClient.getQueueUrl(input: .init(queueName: "non-existent-queue"))
XCTFail("Expected QueueDoesNotExist error")
} catch let error as AWSServiceError {
} catch let error as QueueDoesNotExist {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were not checking for this modeled error type before (we would have failed if we did, because an unknown error was being thrown.)

// TODO: Establish why errorCode should be different depending on how the
// error was matched (this exposes implementation)
// XCTAssertEqual(error.errorCode, "QueueDoesNotExist",
// "Error code should be parsed from __type field when header is missing")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer checking this code value because we model error code as static for a modeled error type, and passing TC1 & TC2 requires passing different error codes for the same type

@@ -18,9 +18,6 @@ import class ClientRuntime.OrchestratorTelemetry
import class ClientRuntime.SdkHttpClient
import class Smithy.Context
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This & the next several files contain generated changes.

@jbelkins jbelkins marked this pull request as ready for review March 29, 2026 19:38
@jbelkins jbelkins requested a review from a team as a code owner March 29, 2026 19:38
@jbelkins jbelkins requested review from dayaffe and sichanyoo March 29, 2026 19:43
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