TiTus
TiTus

Reputation: 77

ASP.NET core Web api debugging tempalted code is not working as it is explained in documetns

I am trying to learn asp.net core web api development. And as usual, I started with debugging the template project generated by VS 2019. But the test page which is appearing when I debug, is not the same as described on the tutorials. It is annoying and after wasting several hours with googling I decided to ask stackoverflow. Which configration am I missing?

The test/output page When I debug: ( actually there is not any button.) enter image description here

However the expected web page is as shown in the enter image description here

Note: the picture of expected webpage is taken from: The video is here

Upvotes: 0

Views: 585

Answers (1)

Yinqiu
Yinqiu

Reputation: 7190

First of all, these are two different pages, you can enter the url:https://localhost:xxxxx/swagger/index.htmlto reach the expected SwaggerUI page.

About official document.

Launch the app, and navigate to localhost:/swagger/v1/swagger.json. The generated document describing the endpoints appears as shown in OpenAPI specification (openapi.json).

If you want to set SwaggerUI as default start page.You can change the property in your launchSettings.json file.

Open the launchSettings.json file.Change the launchUrl property to swagger.

Upvotes: 1

Related Questions