[REQ] Make java-undertow-server generate subclassable Handlers
Created by: LoveIsGrief
Is your feature request related to a problem? Please describe.
The generated PathHandlerProvider.java doesn't provide a method using it as "lib". It isn't just something can generate, subclass and use without modifying the generated files, which means that all modifications will be overwritten as soon as the spec is changed.
Describe the solution you'd like
It would be great if the HttpHandlers used in PathHandlerProvider could be subclassed in custom code. What I'm thinking of is generating an abstract class OperationNameHttpHandler per operation that's subclassed in the same package, then imported and instantiated in PathHandlerProvider e.g
/pet:POST with the operationId addPet will generated the class org.apitools.handler.AddPetBaseHandler and PathHandlerProvider will use AddPetHandlerImpl.
The project won't build until an implementation for AddPetHandlerImpl is provided.
Describe alternatives you've considered
One could also provide a method PathHandlerProvider::addHandler(String operationId, HttpHandler handler) that adds handlers to a Map which are then used in the existing PathHandlerProvider::getHandler.