-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
The problem is that when splitting the generation of the spec (based on tags) across multiple configuration files and using the strict-server: true, it outputs
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
Unsure if there is a reason for this to be specified per generated server code, but if this was moved to strictnethttp package or something else, I would not have to implement the same piece of code multiple times.
StrictMiddlewareFunc and StrictHandlerFunc do this hence the ask here.
edmStrict := edm.NewStrictHandlerWithOptions(s, strictMiddlewares, edm.StrictHTTPServerOptions{
RequestErrorHandlerFunc: httpproblem.RequestErrorHandler(s.logger),
ResponseErrorHandlerFunc: httpproblem.ResponseErrorHandler(s.logger),
})
icStrict := ic.NewStrictHandlerWithOptions(s, strictMiddlewares, ic.StrictHTTPServerOptions{
RequestErrorHandlerFunc: httpproblem.RequestErrorHandler(s.logger),
ResponseErrorHandlerFunc: httpproblem.ResponseErrorHandler(s.logger),
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels