Generating an OpenAPI specification and serving a swagger UI endpoint should be possible to do with https://github.com/javalin/javalin-openapi and associated plugins.