Skip to content
Snippets Groups Projects
Unverified Commit d20427b4 authored by Bob Callaway's avatar Bob Callaway Committed by GitHub
Browse files

bump swagger and go mod tidy (#616)

parent 3c300125
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20211102141018-f7be0cbad29c
github.com/dvyukov/go-fuzz v0.0.0-20210914135545-4980593459a1
github.com/elazarl/go-bindata-assetfs v1.0.1 // indirect
github.com/go-swagger/go-swagger v0.28.0
github.com/go-swagger/go-swagger v0.29.0
github.com/google/trillian v1.4.0
github.com/stephens2424/writerset v1.0.2 // indirect
golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02 // indirect
)
This diff is collapsed.
......@@ -46,6 +46,11 @@ func (m LogEntry) Validate(formats strfmt.Registry) error {
}
if val, ok := m[k]; ok {
if err := val.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName(k)
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName(k)
}
return err
}
}
......
......@@ -59,6 +59,7 @@ func init() {
}
var (
specFile string
enabledListeners []string
cleanupTimeout time.Duration
gracefulTimeout time.Duration
......@@ -86,6 +87,7 @@ var (
func init() {
maxHeaderSize = flagext.ByteSize(1000000)
flag.StringVarP(&specFile, "spec", "", "", "the swagger specification to serve")
flag.StringSliceVar(&enabledListeners, "scheme", defaultSchemes, "the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec")
......@@ -166,6 +168,7 @@ func NewServer(api *operations.RekorServerAPI) *Server {
s.TLSKeepAlive = tlsKeepAlive
s.TLSReadTimeout = tlsReadTimeout
s.TLSWriteTimeout = tlsWriteTimeout
s.Spec = specFile
s.shutdown = make(chan struct{})
s.api = api
s.interrupt = make(chan os.Signal, 1)
......@@ -215,6 +218,7 @@ type Server struct {
TLSWriteTimeout time.Duration
httpsServerL net.Listener
Spec string
api *operations.RekorServerAPI
handler http.Handler
hasListeners bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment