... .EnableSwaggerUi(c => { ... c.InjectJavaScript(thisAssembly, "YourAssemblyName.YourFolder.removeTryItOutButton.js"); ... });