Skip to content

Commit

Permalink
- fixed a bug where kiota builder might fail to recognize referenced …
Browse files Browse the repository at this point in the history
…schemas as meaningful

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Aug 22, 2022
1 parent 4b688b4 commit ec152c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Extensions/OpenApiSchemaExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> GetSchemaReferenceIds(this OpenApiSchema schema, HashSet<OpenApiSchema> visitedSchemas = null) {
visitedSchemas ??= new();
Expand Down

0 comments on commit ec152c0

Please sign in to comment.