Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get swagger-ui is set to home page #873

Closed
eightHundreds opened this issue Sep 16, 2016 · 4 comments
Closed

How to get swagger-ui is set to home page #873

eightHundreds opened this issue Sep 16, 2016 · 4 comments

Comments

@eightHundreds
Copy link

if my website host is abc.com,then how can i see swagger by http://abc.com
now the url always need "/index" ,eg. abc.com/index. @ #

@CoolDadTx
Copy link

I use a redirect rule in the config file. Refer to the blog article I posted here - http://www.michaeltaylorp3.net/creating-a-rest-api-project-template/
Jump to the Setting a Default Document section.

@v-karbovnichy
Copy link

v-karbovnichy commented Dec 22, 2016

@eightHundreds there are several ways to do it, however.

To all who will come here from Google, go look here:
https://stackoverflow.com/a/41282115/1875339

@domaindrivendev please include this topic in README.md because of so much frustration and common use-case.

@domaindrivendev
Copy link
Owner

domaindrivendev commented Sep 15, 2017

I'm going to close this as there's several approaches described above. Adding a simple redirect to a web application is a pretty standard practice and is extremely well documented across the web. I don't think it's necessary to add specific documentation to Swashbuckle. But, if anyone here feels strongly about adding to the docs, feel free to submit a PR.

@mbarmettler
Copy link

this worked for me:

app.Run(async context => { 
    context.Response.Redirect("swagger/ui/index"); 
}); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants