Skip to content
Next Next commit
fix(SchemaGenerator): exclude inherited properties only when base add…
…ed to AllOf
  • Loading branch information
John-Paul-R committed Dec 1, 2025
commit a1cc783dee47bab55a241c29b3d913fc256d5cb1
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private OpenApiSchema CreateObjectSchema(DataContract dataContract, SchemaReposi
}

applicableDataProperties = applicableDataProperties
.Where(dataProperty => dataProperty.MemberInfo.DeclaringType == dataContract.UnderlyingType);
.Where(dataProperty => dataProperty.MemberInfo.DeclaringType != baseTypeDataContract.UnderlyingType);
}

if (IsBaseTypeWithKnownTypesDefined(dataContract, out var knownTypesDataContracts))
Expand Down