New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for discussion: allow class derivatives of OpenAPI class DocumentedHandler #1150
Comments
I'm generally all for everything being open unless there's a strong reason not to. In fact, this is one of my primary complaints about Kotlin, I think sealed as default is a very poor choice. That said, it obviously does reduce the amount someone maintaining a library has to support. I haven't yet had a use case for modifying the DocumentedHandler, but I am always for opening something. |
OK, I'll make a PR then. |
see issue javalin#1150 for details
Thanks @RalphSteinhagen ! There was no reason it was non-open (other than it being the default). |
By default Kotlin classes are final. would it be conceivable to
open
some of Javalin's classes, notably theclass DocumentedHandler(...)
inpackage io.javalin.plugin.openapi.dsl
, to allow for further class extensionsor -- alternatively -- convert this to a public interface?
The specific use-case would be to provide a more meaningful source class implementation/package location information, for example, in the
RouteOverviewPlugin
, and other debugging cases by overwriting thetoString()
function:(note the
io.javalin.plugin.openapi.dsl.DocumentedHandler.class
string that could hide any source implementation location).This would help in debugging service implementations but also allow further user-specific custom extensions. Food for thought.
And as always: keep up the good work!
The text was updated successfully, but these errors were encountered: