Skip to content

Struggling with getting /swagger-ui.html to open the correct api #1127

@jeeftor

Description

@jeeftor

Describe the bug
I've seen various posts on here and stack but I have yet to crack the code for what I need.

I was previously using spring-fox which worked great - new project thought I'd give this official "spring" version a go.

So here we go:

application.yml

springdoc:
  swagger-ui:
    disable-swagger-default-url: true

Hitting localhost:8080/swagger-ui.html redirects me to: http://localhost:8080/swagger-ui/index.html?configUrl and it shows an empty page
s1

If I then put in:

/v3/api-docs into the search bar it loads up api fine.

The output of http://localhost:8080/v3/api-docs/swagger-config is:

{"oauth2RedirectUrl":"http://localhost:8080/swagger-ui/oauth2-redirect.html","validatorUrl":""}

I don' have OAuth configured at the moment - could this be a related issue at all?

I've read some of the posts here and tried different things like settings url's and such but as of yet I seem unable to crack the correct code to get my ui to load directly without having to use the box.

I've seen things mentioned that this is an issue of swagger itself - but I have to assume there is a combo of settings that should make this a workable system.

Thanks for any assistance ya'll can offer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions