Permalink
Browse files

Fubu config is now done as a fubu registry extension

  • Loading branch information...
1 parent 56630e5 commit 8f3a8ae9499fc04d7e40a24d15a408563886c476 @KevM committed Mar 12, 2012
@@ -1,8 +1,8 @@
using System.Reflection;
using System.Runtime.InteropServices;
-[assembly: AssemblyTrademark("e74b890235755e03e2d3192adfdad47abcb968b8")]
-[assembly: AssemblyVersion("0.2.1.0")]
-[assembly: AssemblyFileVersion("0.2.1.0")]
+[assembly: AssemblyTrademark("53fcf30834a70b8e78a8a23e07f81035f43c7490")]
+[assembly: AssemblyVersion("0.2.2.0")]
+[assembly: AssemblyFileVersion("0.2.2.0")]
-[assembly: AssemblyInformationalVersion("0.2.1.0")]
+[assembly: AssemblyInformationalVersion("0.2.2.0")]
@@ -0,0 +1,13 @@
+using FubuMVC.Core;
+
+namespace FubuMVC.Swagger.Configuration
+{
+ public class SwaggerApiDocumentationExtension : IFubuRegistryExtension
+ {
+ public void Configure(FubuRegistry registry)
+ {
+ registry.ApplyConvention<SwaggerConvention>();
+ registry.Services(s=>s.AddService<IActionGrouper, APIRouteGrouper>());
+ }
+ }
+}
@@ -2,7 +2,6 @@
namespace FubuMVC.Swagger.Configuration
{
-
public class SwaggerPackageRegistry : FubuPackageRegistry
{
public SwaggerPackageRegistry()
@@ -83,6 +83,7 @@
<Compile Include="Configuration\SwaggerPackageRegistry.cs" />
<Compile Include="Actions\ResourceDiscoveryAction.cs" />
<Compile Include="Actions\ResourceAction.cs" />
+ <Compile Include="Configuration\SwaggerApiDocumentationExtension.cs" />
<Compile Include="UI\CacheIt.cs" />
<Compile Include="UI\SwaggerUICache.cs" />
<Compile Include="UI\SwaggerUIIndex.cs" />
@@ -1,11 +1,12 @@
+using System;
using System.Collections.Generic;
using System.Linq;
using FubuCore;
using FubuMVC.Core;
using FubuMVC.Core.Registration;
using FubuMVC.Core.Resources.Conneg;
using FubuMVC.Spark;
-using FubuMVC.Swagger;
+using FubuMVC.Swagger.Configuration;
using HelloSwagger.Handlers;
using HelloSwagger.Handlers.home;
@@ -39,14 +40,7 @@ public ConfigureFubuMVC()
ApplyConvention<ApiConvention>();
- //TODO replace this with Swagger Bottle
- ApplyConvention<SwaggerConvention>();
-
- Services(s =>
- {
- //TODO replace this with Swagger Bottle
- s.AddService<IActionGrouper, APIRouteGrouper>();
- });
+ Import<SwaggerApiDocumentationExtension>();
}
}
}

0 comments on commit 8f3a8ae

Please sign in to comment.