-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Breaking] Moves httpChecksum
trait to aws.protocols
namespace.
#938
[Breaking] Moves httpChecksum
trait to aws.protocols
namespace.
#938
Conversation
…trait to follow the new design. Removes stale code and updates implementation, tests and documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't quite finish reviewing yet and need to finish aws-core.rst and HttpChecksumTraitValidator.java. I'm leaving my review now before the weekend. I'll pick this up next week.
.../src/main/java/software/amazon/smithy/openapi/fromsmithy/protocols/AbstractRestProtocol.java
Show resolved
Hide resolved
HttpChecksumTrait trait = operationShape.expectTrait(HttpChecksumTrait.class); | ||
headers.addAll(getChecksumHeaders(trait.getRequestProperties())); | ||
} else if (operationShape.hasTrait(HttpChecksumRequiredTrait.class)) { | ||
if (operationShape.hasTrait(HttpChecksumRequiredTrait.class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this more nuanced? Don't we need to inject all of the x-amz-checksum-* headers here? And isn't httpChecksumRequired deprecated now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new x-amz-checksum-* headers should be applied in smithy-aws-apigateway-openapi
smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/HttpChecksumTraitTest.java
Show resolved
Hide resolved
...s/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors
Show resolved
Hide resolved
...s/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.errors
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review, other verification of this will require some of the spec updates to validate against.
HttpChecksumTrait trait = operationShape.expectTrait(HttpChecksumTrait.class); | ||
headers.addAll(getChecksumHeaders(trait.getRequestProperties())); | ||
} else if (operationShape.hasTrait(HttpChecksumRequiredTrait.class)) { | ||
if (operationShape.hasTrait(HttpChecksumRequiredTrait.class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new x-amz-checksum-* headers should be applied in smithy-aws-apigateway-openapi
...its/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.json
Show resolved
Hide resolved
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/HttpChecksumTrait.java
Show resolved
Hide resolved
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/HttpChecksumTrait.java
Show resolved
Hide resolved
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/HttpChecksumTrait.java
Show resolved
Hide resolved
...y-aws-traits/src/main/java/software/amazon/smithy/aws/traits/HttpChecksumTraitValidator.java
Show resolved
Hide resolved
Closing in favor of #972 |
Description of changes:
httpChecksum
trait to follow the revised design.aws.protocols#httpChecksum
namespace.smithy.api#httpChecksum
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.