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
21
21
{
22
22
public OpenApiDiagnostic Diagnostic { get ; }
23
23
24
+ private static readonly char [ ] _pathSeparator = new char [ ] { '/' } ;
25
+
24
26
/// <summary>
25
27
/// Create Parsing Context
26
28
/// </summary>
@@ -131,7 +133,7 @@ public OpenApiReference ConvertToOpenApiReference(
131
133
}
132
134
else if ( id . StartsWith ( "/paths/" ) )
133
135
{
134
- var localSegments = segments [ 1 ] . Split ( new char [ ] { '/' } , StringSplitOptions . RemoveEmptyEntries ) ;
136
+ var localSegments = segments [ 1 ] . Split ( _pathSeparator , StringSplitOptions . RemoveEmptyEntries ) ;
135
137
if ( localSegments . Length == 2 )
136
138
{
137
139
// 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