Can't access API's documentation with JHipster

Unai P. Mendizabal picture Unai P. Mendizabal · Nov 13, 2016 · Viewed 7.4k times · Source

I've been trying to access the generated Swagger-UI of a JHipster generated Spring app. I've tried to access through "/swagger-ui.html" as that worked out just fine with other projects, but not this time. I've also looked up the security configuration class and tried all URLs that reference swagger (like "/swagger-ui/index.html") but none of them work: It's response code 404.

I know that the configuration class gets run, because the console shows the "Started Swagger" message, but still no UI.

Any ideas? Any help will be much appreciated. Thanks.

Answer

Tom Nijs picture Tom Nijs · Nov 22, 2016

Have you made sure that the swagger profile is active? Check your config at src/main/resources/config/application-dev.yml

spring:
    profiles:
        active: dev
        include: swagger

or

spring:
    profiles:
        active: dev, swagger