From ec152c0c049d238f1e0ad6d69aeec57b55358f7e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 22 Aug 2022 15:40:53 -0400 Subject: [PATCH] - fixed a bug where kiota builder might fail to recognize referenced schemas as meaningful Signed-off-by: Vincent Biret --- src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs b/src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs index 10c815bf2a..a589eee4e2 100644 --- a/src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs +++ b/src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs @@ -70,7 +70,7 @@ public static bool IsOneOf(this OpenApiSchema schema) } private static bool IsSemanticallyMeaningful(this OpenApiSchema schema) { - return schema.Properties.Any() || schema.Items != null || !string.IsNullOrEmpty(schema.Type) || !string.IsNullOrEmpty(schema.Format); + return schema.Properties.Any() || schema.Items != null || !string.IsNullOrEmpty(schema.Type) || !string.IsNullOrEmpty(schema.Format) || !string.IsNullOrEmpty(schema.Reference?.Id); } public static IEnumerable GetSchemaReferenceIds(this OpenApiSchema schema, HashSet visitedSchemas = null) { visitedSchemas ??= new();