Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created April 30, 2015 09:54
Show Gist options
  • Save cmatskas/8c33d79c670f68c3ba24 to your computer and use it in GitHub Desktop.
Save cmatskas/8c33d79c670f68c3ba24 to your computer and use it in GitHub Desktop.
using System.Web.Http;
using WebActivatorEx;
using SwaggerTest;
using Swashbuckle.Application;
[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")]
namespace SwaggerTest
{
public class SwaggerConfig
{
public static void Register()
{
var thisAssembly = typeof(SwaggerConfig).Assembly;
GlobalConfiguration.Configuration
.EnableSwagger(c => c.SingleApiVersion("v1", "SwaggerTest"))
.EnableSwaggerUi();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment