diff options
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj | 85 |
2 files changed, 87 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 5e4c6f0aa..34d705bfb 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -5,6 +5,7 @@ using MediaBrowser.Common.Net; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Logging; using ServiceStack; +using ServiceStack.Api.Swagger; using ServiceStack.Host; using ServiceStack.Host.Handlers; using ServiceStack.Host.HttpListener; @@ -93,7 +94,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer container.Adapter = _containerAdapter; - //Plugins.Add(new SwaggerFeature()); + Plugins.Add(new SwaggerFeature()); Plugins.Add(new CorsFeature()); HostContext.GlobalResponseFilters.Add(new ResponseFilter(_logger).FilterResponse); } diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj index d341df929..9188f9101 100644 --- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj +++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj @@ -40,6 +40,9 @@ <Reference Include="Mono.Data.Sqlite"> <HintPath>..\ThirdParty\Mono.Data.Sqlite\Mono.Data.Sqlite.dll</HintPath> </Reference> + <Reference Include="ServiceStack.Api.Swagger"> + <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath> + </Reference> <Reference Include="ServiceStack.Text, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\ThirdParty\ServiceStack.Text\ServiceStack.Text.dll</HintPath> @@ -244,6 +247,88 @@ <ItemGroup> <EmbeddedResource Include="Localization\Ratings\ca.txt" /> </ItemGroup> + <ItemGroup> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\highlight.default.css"> + <Link>swagger-ui\css\highlight.default.css</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\screen.css"> + <Link>swagger-ui\css\screen.css</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\images\logo_small.png"> + <Link>swagger-ui\images\logo_small.png</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\images\pet_store_api.png"> + <Link>swagger-ui\images\pet_store_api.png</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\images\throbber.gif"> + <Link>swagger-ui\images\throbber.gif</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\images\wordnik_api.png"> + <Link>swagger-ui\images\wordnik_api.png</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\index.html"> + <Link>swagger-ui\index.html</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\backbone-min.js"> + <Link>swagger-ui\lib\backbone-min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\handlebars-1.0.0.js"> + <Link>swagger-ui\lib\handlebars-1.0.0.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\highlight.7.3.pack.js"> + <Link>swagger-ui\lib\highlight.7.3.pack.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery-1.8.0.min.js"> + <Link>swagger-ui\lib\jquery-1.8.0.min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.ba-bbq.min.js"> + <Link>swagger-ui\lib\jquery.ba-bbq.min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.slideto.min.js"> + <Link>swagger-ui\lib\jquery.slideto.min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.wiggle.min.js"> + <Link>swagger-ui\lib\jquery.wiggle.min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\shred.bundle.js"> + <Link>swagger-ui\lib\shred.bundle.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\shred\content.js"> + <Link>swagger-ui\lib\shred\content.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\swagger.js"> + <Link>swagger-ui\lib\swagger.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\underscore-min.js"> + <Link>swagger-ui\lib\underscore-min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\swagger-ui.js"> + <Link>swagger-ui\swagger-ui.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\ThirdParty\ServiceStack\swagger-ui\swagger-ui.min.js"> + <Link>swagger-ui\swagger-ui.min.js</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
