[undertow-dev] swagger in undertow

Stuart Douglas sdouglas at redhat.com
Mon Jul 6 23:20:41 EDT 2020


Do you mean Swagger UI? If so it is just a case of serving static
resources, you can use the ResourceHandler to serve it.

Stuart

On Tue, 7 Jul 2020 at 10:17, David Robinson <drobin1437 at gmail.com> wrote:

> Is there a way to add Swagger into an undertow based server?  Here is how
> I start my server now - standard stuff:
>
> ------
>
> RoutingHandler rh0 = new RoutingHandler()
>         .post("/bb/{cohort}/{topictype}",         new UniversalPostHttpHandler(kep, kvemp))
>         .get("/bb/{cohort}/{topictype}/schema",   new UniversalGetHttpHandler())
>         .get("/admin/healthcheck",                new UniversalHealthCheckHttpHandler())
>         .get("/admin/metrics",                    new UndertowGetMetricHttpHelperHandler())
>
> Undertow server = Undertow.builder().setIoThreads(undertowIoThreads
> ).addHttpListener(ipPort, ipAddress).setHandler(rh0).build();
>
> ------
>
> Ideally, swagger could just be added as another handler of sorts.
>
> I ran across this post, which is over a year old, which is unanswered:
>
> https://stackoverflow.com/questions/54685819/swagger-undertow
>
> Appreciate any advice on how to do this.
>
> Thanks,
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20200707/97fcd67b/attachment.html 


More information about the undertow-dev mailing list