Hi,
I've got Swashbuckle.AspNetCore 1.0.0 nuget package installed in my Asp.Net Core project.
But when I try to add DocumentTitle() in UseSwaggerUI middleware it seems to be not there.
// Enable middleware to serve swagger-ui (HTML, JS, CSS etc.), specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c =>
{
c.DocumentTitle("Custom API - Swagger UI");
});
However I noticed it's there in github repository: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/98f64b09032c2949e669c319b5cf09ff0f4e2340/test/WebSites/CustomUIConfig/Startup.cs
Am I missing something?
Thanks in advance.
I have same issue, can't access that method like it is not existing.
The property is missing fromt the SwaggerUIOptions class
Experiencing the same issue here.
Looks like it was merged in 98f64b09032c2949e669c319b5cf09ff0f4e2340 a little over a month ago, just not on nuget yet. Any ETA?
This is probably my #1 missing feature since I first encountered Swagger. Still waiting...
Any update on this issue??
seems the field is a fake one!
This does seem to be missing, seems like it should have or has been there considering the docs?
I have done this as a work around with javascript (updates doc title and sets favicon)
app.UseSwaggerUI(options =>
{
options.InjectOnCompleteJavaScript("/js/swagger.js");
});
(function () {
$(function () {
// Update Document Title
document.title = "Api Documentation";
// Replace Icon
var link = document.querySelector("link[rel*='icon']") || document.createElement("link");
link.type = "image/x-icon";
link.rel = "shortcut icon";
link.href = "/favicon.ico";
document.getElementsByTagName("head")[0].appendChild(link);
});
})();
Should be resolved as of v1.1.0
InjectOnCompleteJavaScript option is also removed in the release of 2.3.0 AspNetCore release
Any work around on this?
See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/README.md#apply-swagger-ui-parameters
Most helpful comment
Looks like it was merged in 98f64b09032c2949e669c319b5cf09ff0f4e2340 a little over a month ago, just not on nuget yet. Any ETA?