Skip to content

Commit

Permalink
clarify defaults around openapi3filter.Options and openapi3filter.Aut… (
Browse files Browse the repository at this point in the history
#305)

Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp authored Feb 23, 2021
1 parent 66fba45 commit b2761ee
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions openapi3filter/options.go
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
}

0 comments on commit b2761ee

Please sign in to comment.