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

Added note for working with virtual directories #9128

Merged
merged 3 commits into from
Nov 14, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion aspnetcore/tutorials/getting-started-with-swashbuckle.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: zuckerthoben
description: Learn how to add Swashbuckle to your ASP.NET Core web API project to integrate the Swagger UI.
ms.author: scaddie
ms.custom: mvc
ms.date: 08/20/2018
ms.date: 11/14/2018
uid: tutorials/get-started-with-swashbuckle
---
# Get started with Swashbuckle and ASP.NET Core
Expand Down Expand Up @@ -102,6 +102,8 @@ The Swagger UI can be found at `http://localhost:<port>/swagger`. Explore the AP
>
> [!code-csharp[](../tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.Swashbuckle/Startup3.cs?name=snippet_UseSwaggerUI&highlight=4)]

If using virtual directories (with IIS or a reverse proxy, for example), set the Swagger endpoint to a relative path using the `./` prefix. For example, `./swagger/v1/swagger.json`. Using `/swagger/v1/swagger.json` instructs the app to look for the JSON file at the true root of the URL (plus the route prefix, if used). For example, `http://localhost:<port>/<route_prefix>/swagger/v1/swagger.json` instead of `http://localhost:<port>/<virtual_directory>/<route_prefix>/swagger/v1/swagger.json`.

## Customize and extend

Swagger provides options for documenting the object model and customizing the UI to match your theme.
Expand Down