Why was http.Handler removed from Route?
crissi98 opened this issue · 1 comments
In #210 the field Handler was removed from routers.Route (fka openapi3filter.Route) as you can see here:
Router before #210
type Route struct {
Swagger *openapi3.Swagger
Server *openapi3.Server
Path string
PathItem *openapi3.PathItem
Method string
Operation *openapi3.Operation
// For developers who want use the router for handling too
Handler http.Handler
}
Route after #210
type Route struct {
Swagger *openapi3.Swagger
Server *openapi3.Server
Path string
PathItem *openapi3.PathItem
Method string
Operation *openapi3.Operation
}
I implemented a router based on your project, so I used this field as suggested by the comment. You can find my project here:
https://github.com/HUK-COBURG/openapirouter
Could you please clarify why you removed it? It would be great, if you could add this again, so i can use my router as before.
Hi! I removed this as I found no usage of it within the project (nor tests) nor on cursory search through dependents
IMO the user can maintain a mapping from route to handler themselves, and with much more power over the semantics of this mapping.
Glad you could fix it in HUK-COBURG/openapirouter#2
If something is still not alright please reopen.