Skip to content

Commit 6b72765

Browse files
committed
Revert change
1 parent 1f00b44 commit 6b72765

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Microsoft.OpenApi/Models/OpenApiParameter.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public OpenApiParameter(OpenApiParameter parameter)
163163
Style = parameter?.Style ?? Style;
164164
Explode = parameter?.Explode ?? Explode;
165165
AllowReserved = parameter?.AllowReserved ?? AllowReserved;
166-
Schema = InitializeSchema();
166+
Schema = JsonNodeCloneHelper.CloneJsonSchema(parameter?.Schema);
167167
Examples = parameter?.Examples != null ? new Dictionary<string, OpenApiExample>(parameter.Examples) : null;
168168
Example = JsonNodeCloneHelper.Clone(parameter?.Example);
169169
Content = parameter?.Content != null ? new Dictionary<string, OpenApiMediaType>(parameter.Content) : null;
@@ -447,15 +447,6 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
447447

448448
return Style;
449449
}
450-
451-
/// <summary>
452-
/// Clones an instance of a JSON schema
453-
/// </summary>
454-
/// <returns></returns>
455-
protected JsonSchema InitializeSchema()
456-
{
457-
return JsonNodeCloneHelper.CloneJsonSchema(Schema);
458-
}
459450
}
460451

461452
/// <summary>

0 commit comments

Comments
 (0)