0
votes

I am using Quarkus 0.13.3 with Kotlin.

I am trying to add Swagger-UI documentation in my application. I have followed this documentation: https://quarkus.io/guides/openapi-swaggerui-guide

I can see the documentation when I use quarkus:dev to build:

./mvnw clean package quarkus:dev

...

2019-04-26 12:22:36,684 INFO  [io.quarkus] (main) Quarkus 0.14.0 started in 0.962s. Listening on: http://[::]:8080
2019-04-26 12:22:36,685 INFO  [io.quarkus] (main) Installed features: [cdi, kotlin, resteasy, resteasy-jsonb, smallrye-openapi, swagger-ui]

My problem is when I run my FatJat or my native-image because the swagger-ui extensions doesn't appear and I cant see the /swagger-ui url.

$ java -jar target/quarkus-kotlin-1.0-SNAPSHOT-runner.jar 
2019-04-26 12:28:17,953 INFO  [io.quarkus] (main) Quarkus 0.14.0 started in 0.635s. Listening on: http://[::]:8080
2019-04-26 12:28:17,960 INFO  [io.quarkus] (main) Installed features: [cdi, kotlin, resteasy, resteasy-jsonb, smallrye-openapi]
$ docker run -i --rm -p 8080:8080 quarkus-kotlin-example:0.1.0 
2019-04-26 12:29:46,119 INFO  [io.quarkus] (main) Quarkus 0.14.0 started in 0.034s. Listening on: http://[::]:8080
2019-04-26 12:29:46,119 INFO  [io.quarkus] (main) Installed features: [cdi, kotlin, resteasy, resteasy-jsonb, smallrye-openapi]

Thanks!

1

1 Answers

4
votes

It's a design choice. The integrated Swagger UI is only available in dev mode to allow you to test your REST services.

It is not exposed when running the application normally.

Update: If you want to expose Swagger UI publicly, you can include it yourself in the resource directory and point it to the /openapi endpoint.