Swashbuckle.Application.SwaggerUiConfig.CustomAsset C# (CSharp) Method

CustomAsset() public method

public CustomAsset ( string path, Assembly resourceAssembly, string resourceName ) : void
path string
resourceAssembly System.Reflection.Assembly
resourceName string
return void
        public void CustomAsset(string path, Assembly resourceAssembly, string resourceName)
        {
            _pathToAssetMap[path] = new EmbeddedAssetDescriptor(resourceAssembly, resourceName, path == "index");
        }

Usage Example

Example #1
0
        public static SwaggerUiConfig MobileAppUi(this SwaggerUiConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            Assembly thisAssembly = typeof(SwaggerUiConfigExtensions).Assembly;

            config.CustomAsset("o2c-html", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.o2c.html");
            config.CustomAsset("lib/swagger-oauth-js", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.swagger-oauth.js");

            return(config);
        }
All Usage Examples Of Swashbuckle.Application.SwaggerUiConfig::CustomAsset