Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Beauchamp committed May 20, 2016
2 parents e736e77 + c7c5474 commit 742681f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Swashbuckle.OData/Descriptions/ParameterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public static Type GetClrType(this Parameter parameter)
default:
throw new Exception($"Could not determine .NET type for parameter type {type} and format 'null'");
}
case "byte":
return typeof(byte);
case "int32":
return typeof(int);
case "int64":
Expand Down Expand Up @@ -117,6 +119,8 @@ public static string GenerateSamplePathParameterValue(this Parameter parameter)
default:
throw new Exception($"Could not generate sample value for query parameter type {type} and format {"null"}");
}
case "byte":
return "254";
case "int32":
case "int64":
return "42";
Expand Down Expand Up @@ -149,4 +153,4 @@ private static Type GetEntityTypeForBodyParameter(Parameter parameter)
return parameter.schema.GetReferencedType();
}
}
}
}

0 comments on commit 742681f

Please sign in to comment.