-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* upstream validation: implementation, first try (#21) * add upstream swagger file, referenced in couper.hcl (#21) * rename swagger_definition -> openapi_file (#21) * openapi block with properties instead of properties only; request/response are always validated if openapi block is present; request is rejected if invalid and ignore_request_violations is not true; response is rejected if invalid and ignore_response_violations is not true (#21) * invalid upstream request gets 400 - Bad Request; invalid upstream response gets 502 - Bad Gateway (#21) * keep backend status code in log even in case of response validation error (#21) * validation message in backend log's message field (#21) * tests for validation (#21) * extracted OpenAPI validator (#21) * Fixed validation errors in openapi file to be logged as errors instead of panic (#21) * Fixup openAPI validation test * Handle body rewind Refactor openAPI error handling * Fix set getBody method first #72 Leads to getAttribute errors for recently added dynamic evals for origin, path and hostname * Add buffer stringer implementation Add stringer tool to generate for const * Add test for bufferOption interaction * rm httpbin.yaml * Fix documentation hcl format * Remove loose punctuation mark from documentation Fix couper version to latest release * Add openapi documentation and example link * Fixup obsolete conditions * Add validation exclude options Fix passing the query param * Fixup validation tests e.g. query 404 -> 404= due to our set query feature * Update validation documentation * Use req context * Fix merge openAPI and use partialContent for deprecated log * Upgrade kin-openapi dependency to latest v0.33.0 * Add documentation note about openapi3 * Add additional openapi test Remove own getBody set since openapi3 does this already (too) * Revert configurable validation exclude options * Add additonal openapi link Co-authored-by: Marcel Ludwig <marcel.ludwig@avenga.com>
- Loading branch information
Showing
230 changed files
with
22,308 additions
and
8,478 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package config | ||
|
||
type OpenAPI struct { | ||
File string `hcl:"file"` | ||
IgnoreRequestViolations bool `hcl:"ignore_request_violations,optional"` | ||
IgnoreResponseViolations bool `hcl:"ignore_response_violations,optional"` | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.