Fixed issue where client generator was actually removing routes from the original list. Improved documentation. Bumped package version to 1.2.8
This commit is contained in:
parent
7ffa2d43ef
commit
12fe2da2a3
@ -205,7 +205,7 @@ namespace MontoyaTech.Rest.Net
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a redirect for a given response.
|
||||
/// Sets the status code for a given response to redirect with the url to redirect to.
|
||||
/// </summary>
|
||||
/// <param name="response"></param>
|
||||
/// <param name="url"></param>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<AssemblyName>MontoyaTech.Rest.Net</AssemblyName>
|
||||
<RootNamespace>MontoyaTech.Rest.Net</RootNamespace>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<Version>1.2.7</Version>
|
||||
<Version>1.2.8</Version>
|
||||
<PackageReleaseNotes></PackageReleaseNotes>
|
||||
<PackageIcon>Logo_Symbol_Black_Outline.png</PackageIcon>
|
||||
</PropertyGroup>
|
||||
|
@ -25,20 +25,6 @@ namespace MontoyaTech.Rest.Net
|
||||
/// <returns></returns>
|
||||
public override string Generate(List<Route> routes)
|
||||
{
|
||||
//Remove any hidden routes from code generation.
|
||||
for (int i = 0; i < routes.Count; i++)
|
||||
{
|
||||
var methodInfo = routes[i].GetTarget().GetMethodInfo();
|
||||
|
||||
var routeHidden = methodInfo.GetCustomAttribute<RouteHidden>();
|
||||
|
||||
if (routeHidden != null)
|
||||
{
|
||||
routes.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
var includedTypes = this.FindRoutesDependencies(routes);
|
||||
|
||||
var routeGroups = this.FindRouteGroups(routes);
|
||||
|
@ -111,6 +111,10 @@ namespace MontoyaTech.Rest.Net
|
||||
|
||||
var methodInfo = route.GetTarget().GetMethodInfo();
|
||||
|
||||
//If this route is hidden, return nothing.
|
||||
if (methodInfo.GetCustomAttribute<RouteHidden>() != null)
|
||||
return dependencies.ToList();
|
||||
|
||||
if (methodInfo != null)
|
||||
{
|
||||
var parameters = methodInfo.GetParameters();
|
||||
@ -295,6 +299,10 @@ namespace MontoyaTech.Rest.Net
|
||||
{
|
||||
var methodInfo = route.GetTarget().GetMethodInfo();
|
||||
|
||||
//Skip any routes that are hidden.
|
||||
if (methodInfo.GetCustomAttribute<RouteHidden>() != null)
|
||||
continue;
|
||||
|
||||
var routeGroup = methodInfo.GetCustomAttribute<RouteGroup>();
|
||||
|
||||
//If there wasn't a route group on the method, see if there is one on the declaring type.
|
||||
|
Loading…
x
Reference in New Issue
Block a user