diff --git a/src/Plaid.OpenApiParser/Program.cs b/src/Plaid.OpenApiParser/Program.cs index 7bd72f66..4e7c0bce 100644 --- a/src/Plaid.OpenApiParser/Program.cs +++ b/src/Plaid.OpenApiParser/Program.cs @@ -328,8 +328,11 @@ private static string GetPropertyType(string className, string propertyName, Ope { if (schema.Reference.Id.EndsWith("Nullable")) { - var realType = schema.AllOf.First(); - return GetPropertyType(className, propertyName, realType, entityType); + if (schema.AllOf.Count > 0) + { + var realType = schema.AllOf.First(); + return GetPropertyType(className, propertyName, realType, entityType); + } } else if (schema.AdditionalProperties != null) return $"IReadOnlyDictionary";