-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: Exclude Non-Method Path Sections #2171
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2171 +/- ##
===========================================
+ Coverage 93.58% 94.30% +0.72%
===========================================
Files 90 95 +5
Lines 6124 6429 +305
Branches 1260 1290 +30
===========================================
+ Hits 5731 6063 +332
+ Misses 183 169 -14
+ Partials 210 197 -13
Continue to review full report at Codecov.
|
| _CACHE_KEY_PARAMETERS = "cacheKeyParameters" | ||
| # https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
| _ALL_HTTP_METHODS = ["OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "PATCH"] | ||
| _EXCLUDED_PATHS_FIELDS = ["summary", "description", "parameters"] |
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.
Looking at https://swagger.io/specification/#path-item-object, should servers be in this list as well? As well, should we add trace to _ALL_HTTP_METHODS?
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.
APIGW only supports GET, DELETE, HEAD, OPTIONS, PATCH, POST, and PUT.
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.
That's true. The thinking was that SAM could support the full standard and then SAM doesn't need to make adjustments if API GW adds support for trace (or other parts of the OpenAPI spec.) In any case, it's a minor point.
Issue #, if available:
OAS 3 added
summaryanddescriptionfields to path. SAM tries to resolve these fields as valid method sections.https://swagger.io/docs/specification/paths-and-operations/
Example:
Description of changes:
Description of how you validated changes:
Checklist:
make prpassesExamples?
Please reach out in the comments, if you want to add an example. Examples will be
added to
sam initthrough https://github.com/awslabs/aws-sam-cli-app-templates/By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.