public SwaggerUiConfig(IEnumerable<string> discoveryPaths, Func<HttpRequestMessage, string> rootUrlResolver)
{
_pathToAssetMap = new Dictionary<string, EmbeddedAssetDescriptor>();
_templateParams = new Dictionary<string, string>
{
{ "%(StylesheetIncludes)", "" },
{ "%(DiscoveryPaths)", String.Join("|", discoveryPaths) },
{ "%(CustomSwagDocLocation)", "" },
{ "%(BooleanValues)", "true|false" },
{ "%(ValidatorUrl)", "" },
{ "%(CustomScripts)", "" },
{ "%(CustomLogo)", "images/logo_small-png" },
{ "%(DocExpansion)", "none" },
{ "%(OAuth2Enabled)", "false" },
{ "%(OAuth2ClientId)", "" },
{ "%(OAuth2ClientSecret)", "" },
{ "%(OAuth2Realm)", "" },
{ "%(OAuth2AppName)", "" },
{ "%(ApiKeyLocation)", "header" },
{ "%(ApiKeyName)", "none" }
};
_rootUrlResolver = rootUrlResolver;
MapPathsForSwaggerUiAssets();
// Use some custom versions to support config and extensionless paths
var thisAssembly = GetType().Assembly;
CustomAsset("index", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.index.html");
CustomAsset("css/screen-css", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.css.screen.css");
CustomAsset("css/highlight-css", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.css.highlight.css");
CustomAsset("css/typography-css", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.typography.css");
CustomAsset("lib/swagger-oauth-js", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.swagger-oauth.js");
// CustomAsset("images/throbber.gif", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.images.throbber.gif");
CustomAsset("images/favicon.ico", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.images.favicon.ico");
CustomAsset("swagger-ui-js", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.swagger-ui.js");
CustomAsset("lib/highlight-7-3-pack-js", thisAssembly, "Swashbuckle.SwaggerUi.CustomAssets.lib.highlight.js");
}