Skip to content

Commit b328774

Browse files
committed
chore: reverts useless changes from copilot
1 parent 10cde39 commit b328774

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Microsoft.OpenApi/Models/OpenApiDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ private static string ConvertByteArrayToString(byte[] hash)
589589
// Enables setting the complete JSON path for nested subschemas e.g. #/components/schemas/person/properties/address
590590
if (useExternal)
591591
{
592-
var relPathSegment = referenceV3.Split(new char[] {'#'}, StringSplitOptions.RemoveEmptyEntries)[1];
592+
var relPathSegment = referenceV3.Split(['#'], StringSplitOptions.RemoveEmptyEntries)[1];
593593
relativePath = $"#{relPathSegment}";
594594
}
595595
else
@@ -625,7 +625,7 @@ private static bool IsSubComponent(string reference)
625625

626626
if (fragment.StartsWith("/components/schemas/", StringComparison.OrdinalIgnoreCase))
627627
{
628-
var segments = fragment.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
628+
var segments = fragment.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
629629

630630
// Expect exactly 3 segments for root-level schema: ["components", "schemas", "person"]
631631
// Anything longer means it's a subcomponent.

src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public bool Contains(string location)
347347

348348
if (uri is not null)
349349
{
350-
pathSegments = uri.Fragment.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
350+
pathSegments = uri.Fragment.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
351351

352352
// Build the base path for the root schema: "#/components/schemas/person"
353353
var fragment = OpenApiConstants.ComponentsSegment + ReferenceType.Schema.GetDisplayName() + ComponentSegmentSeparator + pathSegments[3];

0 commit comments

Comments
 (0)