Skip to content

Commit 3a9779d

Browse files
committed
chore: reverts unrelated changes
1 parent e1a7bc7 commit 3a9779d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.116"
3+
"version": "8.0.411"
44
}
55
}

src/Microsoft.OpenApi/Models/BaseOpenApiReference.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ internal void SetJsonPointerPath(string pointer, string nodeLocation)
326326
private static string ResolveRelativePointer(string nodeLocation, string relativeRef)
327327
{
328328
// Convert nodeLocation to path segments
329-
var nodeLocationSegments = nodeLocation.TrimStart('#').Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries).ToList();
329+
var nodeLocationSegments = nodeLocation.TrimStart('#').Split(['/'], StringSplitOptions.RemoveEmptyEntries).ToList();
330330

331331
// Convert relativeRef to dynamic segments
332-
var relativeSegments = relativeRef.TrimStart('#').Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
332+
var relativeSegments = relativeRef.TrimStart('#').Split(['/'], StringSplitOptions.RemoveEmptyEntries);
333333

334334
// Locate the first occurrence of relativeRef segments in the full path
335335
for (int i = 0; i <= nodeLocationSegments.Count - relativeSegments.Length; i++)

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
@@ -637,7 +637,7 @@ private static bool IsSubComponent(string reference)
637637

638638
if (fragment.StartsWith("/components/schemas/", StringComparison.OrdinalIgnoreCase))
639639
{
640-
var segments = fragment.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
640+
var segments = fragment.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
641641

642642
// Expect exactly 3 segments for root-level schema: ["components", "schemas", "person"]
643643
// 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
@@ -350,7 +350,7 @@ public bool Contains(string location)
350350
#endif
351351
throw new ArgumentException($"Invalid schema reference location: {location}. It should contain '#/components/schemas/'");
352352

353-
var pathSegments = uri.Fragment.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
353+
var pathSegments = uri.Fragment.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
354354

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

0 commit comments

Comments
 (0)