2

I'm using swagger to generate my API documentation (ASP.NET Web API) and it's working but I still have a small issue.

My project URL is : http://localhost:55779/MyProject/api (I configured this to have the same kind of URL and the same kind of issues than our prod env).

I configure swagger to be aware of the root url :

enter image description here

And it's working : enter image description here

(And in case you're wondering : All URL are OK with this root URL).

But I've one issue that I don't know how to deal with :

If I try to reach

http://localhost:58779/myproject/api/swagger

Instead of :

http://localhost:58779/myproject/api/swagger/ui/index

I get :

http://localhost:58779/swagger/ui/index

It's the only part that doesn't take into account the root URL I configured...

Have you got any idea ?

I see in the document we can deal with custom route but in this case I don't want to change the route just disable/fix this redirection.

I'm using Swashbuckle 5.6

Thanks in advance :-)

Arcord
  • 1,724
  • 1
  • 11
  • 16

0 Answers0