Skip to content
Permalink
Browse files

Fix NRE in Add SS Ref!!

  • Loading branch information...
mythz committed Jun 10, 2016
1 parent fa74bbb commit 2cebcd69400d6c62844b8af7481caa15365ae160
@@ -319,7 +319,7 @@ want them to be available by modifying the `ServiceRoutes` collection. E.g. you
registering any Services by setting `ServiceRoutes` to an empty collection:
```csharp
new JwtAuthProviderReader { ServiceRoutes = new Dictionary<Type, string[]>() }
new ApiKeyAuthProvider { ServiceRoutes = new Dictionary<Type, string[]>() }
```
## JWT Auth Provider
@@ -887,6 +887,9 @@ public static List<string> GetIncludeList(MetadataTypes metadata, MetadataTypesC
{
const string wildCard = ".*";

if (config.IncludeTypes == null)
return null;

var typesToExpand = config.IncludeTypes
.Where(s => s.Length > 2 && s.EndsWith(wildCard))
.Map(s => s.Substring(0, s.Length - 2));
@@ -415,6 +415,19 @@ public void Does_not_allow_direct_access_to_ViewPages()
{
AssertStatus(Host + "/Views/SimpleView", HttpStatusCode.NotFound);
}

[Test]
public void Does_return_AddServiceStackReference_Endpoints()
{
Assert200(Host + "/types/csharp", "/* Options:", "using System;");
Assert200(Host + "/types/fsharp", "(* Options:", "open System");
Assert200(Host + "/types/vbnet", "' Options:", "Imports System");
Assert200(Host + "/types/swift", "/* Options:", "import Foundation;");
Assert200(Host + "/types/java", "/* Options:", "import java.math.*;");
Assert200(Host + "/types/kotlin", "/* Options:", "import java.math.*");
Assert200(Host + "/types/typescript", "/* Options:", "export interface IReturnVoid");
Assert200(Host + "/types/typescript.d", "/* Options:", "interface IReturnVoid");
}
}
}

0 comments on commit 2cebcd6

Please sign in to comment.
You can’t perform that action at this time.