Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ protected override ObjectTypeConstructor BuildInitializationConstructor()
// Turn constants into initializers
initializationValue = BuilderHelpers.ParseConstant(property.InputModelProperty!.ConstantValue.Value, propertyType);
}
else if (IsStruct || property.InputModelProperty?.IsRequired == true)
else if ((IsStruct || property.InputModelProperty?.IsRequired == true) && property.InputModelProperty?.IsReadOnly != true)
{
// For structs all properties become required
Constant? defaultParameterValue = null;
Expand Down
Loading
Loading