-1

Hi I'm using swagger ui in my web api project. It's very good but i am facing some ui issue in page.

this is the snapshot swagger ui issue in right side of json

How can I fix this issue by adding custom css. if i have to add custom css then where i have to add. in project file or in swagger ui project then i have to import. I am also using swashbuckle to show respone message.

Please suggest me.

Helder Sepulveda
  • 15,500
  • 4
  • 29
  • 56
Jitendra singh
  • 413
  • 11
  • 27
  • 1
    Related: [Modifications to Swagger UI header](https://stackoverflow.com/q/36291146/113116), [Swagger (Swashbuckle) hide header](https://stackoverflow.com/q/31636969/113116), [How to replace Swagger UI header logo in Swashbuckle](https://stackoverflow.com/q/38713764/113116), [Replace Swashbuckle UI completely](https://stackoverflow.com/q/31647635/113116), [Swagger UI themes](https://stackoverflow.com/q/28033075/113116) – Helen Jan 08 '18 at 13:24
  • Does this answer your question? [Modifications to Swagger UI header](https://stackoverflow.com/questions/36291146/modifications-to-swagger-ui-header) – Liam Feb 20 '20 at 13:25

1 Answers1

1

In swashbuckle there is an option: InjectStylesheet that should do exactly what you need.
That is located in the SwaggerConfig.cs and is relatively simple to integrate.

See my example here: https://github.com/heldersepu/SwashbuckleTest/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L238

Helder Sepulveda
  • 15,500
  • 4
  • 29
  • 56