I am using go-swagger, with a definition:
/somethings:
get:
produces:
- text/plain
tags:
- somethings
summary: some summary
operationId: GetSomethings
responses:
"200":
description: some summary
schema:
type: string
I have a handler for this:
package impl
func GetSomethingsHandlerFunc(params metrics.GetSomethingsParams, namespace string) middleware.Responder {
return middleware.ResponderFunc....
}
GetSomethingsParams is autogenerated as:
type GetMetricsParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
}
In configureAPI function:
api.SomethingsGetHandler = somethings.GetSomethingsHandlerFunc(impl.GetSomethingsHandlerFunc, "some_namespace_value")
How do I pass this namespace string (that is : "some_namespace_value") to the impl.GetSomethingsHandlerFunc?