We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f13f0d commit e4b06cdCopy full SHA for e4b06cd
1 file changed
ReQuesty.Builder/Extensions/OpenApiSchemaExtensions.cs
@@ -323,10 +323,12 @@ public static bool IsArrayOfTypes(this IOpenApiSchema? schema)
323
324
return schema.Type.HasValue && !IsPowerOfTwo((uint)(schema.Type.Value & ~JsonSchemaType.Null));
325
}
326
+
327
private static bool IsPowerOfTwo(uint x)
328
{
- return (x & (x - 1)) == 0;
329
+ return x != 0 && (x & (x - 1)) == 0;
330
331
332
private static readonly HashSet<JsonSchemaType> oDataTypes = [
333
JsonSchemaType.Number,
334
JsonSchemaType.Integer,
0 commit comments