diff --git a/Swashbuckle.OData/Descriptions/ParameterExtensions.cs b/Swashbuckle.OData/Descriptions/ParameterExtensions.cs index 809603b..65ce819 100644 --- a/Swashbuckle.OData/Descriptions/ParameterExtensions.cs +++ b/Swashbuckle.OData/Descriptions/ParameterExtensions.cs @@ -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": @@ -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"; @@ -149,4 +153,4 @@ private static Type GetEntityTypeForBodyParameter(Parameter parameter) return parameter.schema.GetReferencedType(); } } -} \ No newline at end of file +}