File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/Microsoft.OpenApi.Readers/V3 Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ internal class OpenApiV3VersionService : IOpenApiVersionService
2121 {
2222 public OpenApiDiagnostic Diagnostic { get ; }
2323
24+ private static readonly char [ ] _pathSeparator = new char [ ] { '/' } ;
25+
2426 /// <summary>
2527 /// Create Parsing Context
2628 /// </summary>
@@ -131,7 +133,7 @@ public OpenApiReference ConvertToOpenApiReference(
131133 }
132134 else if ( id . StartsWith ( "/paths/" ) )
133135 {
134- var localSegments = segments [ 1 ] . Split ( new char [ ] { '/' } , StringSplitOptions . RemoveEmptyEntries ) ;
136+ var localSegments = segments [ 1 ] . Split ( _pathSeparator , StringSplitOptions . RemoveEmptyEntries ) ;
135137 if ( localSegments . Length == 2 )
136138 {
137139 // The reference of a path may contain JSON escape character ~1 for the forward-slash character, replace this otherwise
You can’t perform that action at this time.
0 commit comments