Leonardo Augusto
Leonardo Augusto

Reputation: 35

How can i change the logo of Swagger in my webApi

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!

Upvotes: 1

Views: 3920

Answers (1)

hassanzadeh.sd
hassanzadeh.sd

Reputation: 3481

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;
}

Upvotes: 1

Related Questions