1

I'm using Swashbuckle for add a documentation of my WebAPI 2 and I need to change the logo of Swagger and the color of the header, but I don't know how to do this.. Any help will be apreciated!

  • See https://stackoverflow.com/questions/31647635/replace-swashbuckle-ui-completely – richzilla Aug 23 '17 at 14:51
  • this is similar to https://stackoverflow.com/questions/38713764/how-to-replace-swagger-ui-header-logo-in-swashbuckle/38713889 – spy Jun 20 '18 at 11:06

1 Answers1

1

you can change logo and header color with css : find style.css or main css file in your swagger third app for example in drf-yasg you can fine drf root path style.css file add these lines to css :

/* Custom CSS  */

.topbar-wrapper img {
    content: url(http://127.0.0.1:8000/static/company/logo.png);
}

.swagger-ui .topbar .download-url-wrapper .download-url-button {
    background-color: #red !important;
}

.swagger-ui .topbar .download-url-wrapper input[type=text] {
    border-color: #red !important;
}
hassanzadeh.sd
  • 3,091
  • 1
  • 17
  • 26