Skip to content

Initial implementation of @httpMalformedRequestTests#871

Merged
adamthom-amzn merged 2 commits intosmithy-lang:mainfrom
adamthom-amzn:malformed-requests
Aug 3, 2021
Merged

Initial implementation of @httpMalformedRequestTests#871
adamthom-amzn merged 2 commits intosmithy-lang:mainfrom
adamthom-amzn:malformed-requests

Conversation

@adamthom-amzn
Copy link
Copy Markdown
Contributor

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.

@adamthom-amzn adamthom-amzn marked this pull request as ready for review July 28, 2021 21:01
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this the same test as above but checking body v/s bodyMessageRegex? The regex has ": .*" but it doesn't here...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you can either specify body (exact match) or a regex for the message. this test is simply "can we deserialize all of these fields"

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.
@adamthom-amzn adamthom-amzn force-pushed the malformed-requests branch 2 times, most recently from 988b1e8 to 7f0abec Compare July 29, 2021 18:57
@adamthom-amzn adamthom-amzn requested a review from gosar July 29, 2021 18:58
@adamthom-amzn adamthom-amzn force-pushed the malformed-requests branch 2 times, most recently from ae17dbe to 23e58ec Compare August 2, 2021 20:08
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.
@adamthom-amzn adamthom-amzn merged commit bdc32a2 into smithy-lang:main Aug 3, 2021
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.
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.

4 participants