public SwaggerUIMiddleware( RequestDelegate next, IHostingEnvironment hostingEnv, ILoggerFactory loggerFactory, SwaggerUIOptions options) { _options = options ?? new SwaggerUIOptions(); _staticFileMiddleware = CreateStaticFileMiddleware(next, hostingEnv, loggerFactory, options); _swaggerUIIndexHtmlBuilder = new SwaggerUIIndexHtmlBuilder(_options); }
public virtual IActionResult Get() { var options = GetSwaggerUIOptions(); var builder = new SwaggerUIIndexHtmlBuilder(options); var result = builder.Build(); return(Content(result, "text/html")); }