diff --git a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/ApplicationTransport.java b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/ApplicationTransport.java index 7a4898409..e496c6bb4 100644 --- a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/ApplicationTransport.java +++ b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/ApplicationTransport.java @@ -123,7 +123,7 @@ public static ApplicationTransport createDefaultHttpApplicationTransport() { middleware.add(new Middleware.Builder() .klass("Hearth::Middleware::Build") - .step(MiddlewareStackStep.SERIALIZE) + .step(MiddlewareStackStep.BUILD) .operationParams((ctx, operation) -> { Map params = new HashMap<>(); params.put("builder", @@ -140,13 +140,13 @@ public static ApplicationTransport createDefaultHttpApplicationTransport() { !Streaming.isNonFiniteStreaming( model, model.expectShape(operation.getInputShape(), StructureShape.class)) ) - .step(MiddlewareStackStep.BUILD) + .step(MiddlewareStackStep.AFTER_BUILD) .build() ); middleware.add((new Middleware.Builder()) .klass("Hearth::HTTP::Middleware::ContentMD5") - .step(MiddlewareStackStep.BUILD) + .step(MiddlewareStackStep.AFTER_BUILD) .operationPredicate( (model, service, operation) -> operation.hasTrait(HttpChecksumRequiredTrait.class)) .build() @@ -154,7 +154,7 @@ public static ApplicationTransport createDefaultHttpApplicationTransport() { middleware.add((new Middleware.Builder()) .klass("Hearth::Middleware::Parse") - .step(MiddlewareStackStep.DESERIALIZE) + .step(MiddlewareStackStep.PARSE) .operationParams((ctx, operation) -> { Map params = new HashMap<>(); params.put("data_parser", diff --git a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/middleware/MiddlewareStackStep.java b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/middleware/MiddlewareStackStep.java index 9e63c24c1..25aec55a0 100644 --- a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/middleware/MiddlewareStackStep.java +++ b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/middleware/MiddlewareStackStep.java @@ -26,11 +26,11 @@ @SmithyUnstableApi public enum MiddlewareStackStep { INITIALIZE, - SERIALIZE, BUILD, + AFTER_BUILD, RETRY, FINALIZE, - DESERIALIZE, + PARSE, SEND; @Override @@ -40,12 +40,12 @@ public String toString() { return "Initialize"; case RETRY: return "Retry"; - case SERIALIZE: - return "Serialize"; case BUILD: return "Build"; - case DESERIALIZE: - return "Deserialize"; + case AFTER_BUILD: + return "AfterBuild"; + case PARSE: + return "Parse"; case FINALIZE: return "Finalize"; case SEND: diff --git a/codegen/smithy-ruby-rails-codegen/src/main/java/software/amazon/smithy/ruby/codegen/integrations/RailsIntegration.java b/codegen/smithy-ruby-rails-codegen/src/main/java/software/amazon/smithy/ruby/codegen/integrations/RailsIntegration.java index 4a5d0fdf2..75d994e8b 100644 --- a/codegen/smithy-ruby-rails-codegen/src/main/java/software/amazon/smithy/ruby/codegen/integrations/RailsIntegration.java +++ b/codegen/smithy-ruby-rails-codegen/src/main/java/software/amazon/smithy/ruby/codegen/integrations/RailsIntegration.java @@ -39,7 +39,7 @@ public List getProtocolGenerators() { public void modifyClientMiddleware(MiddlewareBuilder middlewareBuilder, GenerationContext context) { Middleware requestId = (new Middleware.Builder()) .klass("Middleware::RequestId") - .step(MiddlewareStackStep.DESERIALIZE) + .step(MiddlewareStackStep.PARSE) .rubySource("smithy-ruby-rails-codegen/middleware/request_id.rb") .build(); middlewareBuilder.register(requestId);