InfoUser
InfoUser

Reputation: 61

How we can display single API inside Swagger UI? Please see the attached screenshot

I am trying to achieve a Swagger API documentation like the attached screenshot. I have a swagger endpoint. I want to customize Swagger UI to display API document as follows:

  1. API Name
  2. API Description
  3. Action Endpoint
  4. Swagger UI - Embed Swagger UI here to try out single API through its endpoint URL
  5. API fields
  6. API Request JSON
  7. API Response JSON

Swagger API documentation with description and single API

I have tried to customize Swagger UI in ASP.Net Core, Angular and React. No luck so far. Please let me know if you have done this kind of customization or have achieved it.

Upvotes: 0

Views: 657

Answers (1)

Formula12
Formula12

Reputation: 397

In order to display the full documentation of your swagger API to a client or as you wish, all you need to do is add XML comments to all your API action methods. Just go over a method hit enter and type forward slash three times. XML comments show up.

Upvotes: 0

Related Questions