Initial implementation of @httpMalformedRequestTests#871
Merged
adamthom-amzn merged 2 commits intosmithy-lang:mainfrom Aug 3, 2021
Merged
Initial implementation of @httpMalformedRequestTests#871adamthom-amzn merged 2 commits intosmithy-lang:mainfrom
adamthom-amzn merged 2 commits intosmithy-lang:mainfrom
Conversation
JordonPhillips
requested changes
Jul 28, 2021
smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
Outdated
Show resolved
Hide resolved
smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
Outdated
Show resolved
Hide resolved
01958af to
c2dfdbd
Compare
adamthom-amzn
added a commit
to adamthom-amzn/smithy-typescript
that referenced
this pull request
Jul 28, 2021
@httpMalformedRequestTests allow server implementations to generate tests that exercise how the implementation deals with requests that are rejected before they reach the customer's business logic. See smithy-lang/smithy#871 for more information.
gosar
reviewed
Jul 29, 2021
smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Is this the same test as above but checking body v/s bodyMessageRegex? The regex has ": .*" but it doesn't here...
Contributor
Author
There was a problem hiding this comment.
you can either specify body (exact match) or a regex for the message. this test is simply "can we deserialize all of these fields"
...software/amazon/smithy/protocoltests/traits/errorfiles/all-malformed-request-features.smithy
Outdated
Show resolved
Hide resolved
adamthom-amzn
added a commit
to adamthom-amzn/smithy-typescript
that referenced
this pull request
Jul 29, 2021
@httpMalformedRequestTests allow server implementations to generate tests that exercise how the implementation deals with requests that are rejected before they reach the customer's business logic. See smithy-lang/smithy#871 for more information.
988b1e8 to
7f0abec
Compare
gosar
approved these changes
Jul 29, 2021
JordonPhillips
approved these changes
Jul 30, 2021
mtdowling
reviewed
Aug 2, 2021
smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
Outdated
Show resolved
Hide resolved
mtdowling
reviewed
Aug 2, 2021
smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
Show resolved
Hide resolved
ae17dbe to
23e58ec
Compare
JordonPhillips
approved these changes
Aug 3, 2021
...ain/java/software/amazon/smithy/protocoltests/traits/HttpMalformedRequestTestsValidator.java
Outdated
Show resolved
Hide resolved
...a/software/amazon/smithy/protocoltests/traits/ParameterizedHttpMalformedRequestTestCase.java
Outdated
Show resolved
Hide resolved
23e58ec to
8a45b5d
Compare
Sets up the trait and serialization/deserialization of all of its members. This trait allows server implementations to generate tests that reject invalid requests before those requests are bound to a Smithy-generated implementation class, or before the deserialized request is handed off to application code.
8a45b5d to
d57756e
Compare
trivikr
pushed a commit
to smithy-lang/smithy-typescript
that referenced
this pull request
Aug 5, 2021
@httpMalformedRequestTests allow server implementations to generate tests that exercise how the implementation deals with requests that are rejected before they reach the customer's business logic. See smithy-lang/smithy#871 for more information.
srchase
pushed a commit
to srchase/smithy-typescript
that referenced
this pull request
Mar 17, 2023
@httpMalformedRequestTests allow server implementations to generate tests that exercise how the implementation deals with requests that are rejected before they reach the customer's business logic. See smithy-lang/smithy#871 for more information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
Sets up the trait and serialization/deserialization of all of its members. This
trait allows server implementations to generate tests that reject invalid
requests before those requests are bound to a Smithy-generated implementation
class, or before the deserialized request is handed off to application code.
I'm going to keep this in draft mode for feedback while I work on generating tests from it to make sure this is actually useful.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.