-
-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clarify defaults around openapi3filter.Options and openapi3filter.Aut… (
#305) Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
package openapi3filter | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// DefaultOptions do not set an AuthenticationFunc. | ||
// A spec with security schemes defined will not pass validation | ||
// unless an AuthenticationFunc is defined. | ||
var DefaultOptions = &Options{} | ||
|
||
// Options used by ValidateRequest and ValidateResponse | ||
type Options struct { | ||
ExcludeRequestBody bool | ||
ExcludeResponseBody bool | ||
IncludeResponseStatus bool | ||
MultiError bool | ||
AuthenticationFunc func(c context.Context, input *AuthenticationInput) error | ||
|
||
MultiError bool | ||
|
||
// See NoopAuthenticationFunc | ||
AuthenticationFunc AuthenticationFunc | ||
} |