oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Strict Server Middlewares are hard to reuse.

Open ralf-cestusio opened this issue 3 years ago • 0 comments

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, args interface{}) (interface{}, error)

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

Types are generated with the api and are part of the package of the api.

This makes it very difficult to reuse a middleware

I would suggest to add them to a part of the library and reuse them as part of the generated code.

ralf-cestusio avatar Sep 30 '22 17:09 ralf-cestusio