@@ -222,8 +222,8 @@ internal void Walk(OpenApiPaths paths)
222
222
{
223
223
_visitor . CurrentKeys . Path = pathItem . Key ;
224
224
Walk ( pathItem . Key , ( ) => Walk ( pathItem . Value ) ) ; // JSON Pointer uses ~1 as an escape character for /
225
+ _visitor . CurrentKeys . Path = null ;
225
226
}
226
- _visitor . CurrentKeys . Path = null ;
227
227
}
228
228
}
229
229
@@ -285,8 +285,8 @@ internal void Walk(IOpenApiExtensible openApiExtensible)
285
285
{
286
286
_visitor . CurrentKeys . Extension = item . Key ;
287
287
Walk ( item . Key , ( ) => Walk ( item . Value ) ) ;
288
+ _visitor . CurrentKeys . Extension = null ;
288
289
}
289
- _visitor . CurrentKeys . Extension = null ;
290
290
}
291
291
}
292
292
@@ -348,8 +348,8 @@ internal void Walk(OpenApiCallback callback)
348
348
_visitor . CurrentKeys . Callback = item . Key . ToString ( ) ;
349
349
var pathItem = item . Value ;
350
350
Walk ( item . Key . ToString ( ) , ( ) => Walk ( pathItem ) ) ;
351
+ _visitor . CurrentKeys . Callback = null ;
351
352
}
352
- _visitor . CurrentKeys . Callback = null ;
353
353
}
354
354
}
355
355
@@ -401,8 +401,8 @@ internal void Walk(IDictionary<string,OpenApiServerVariable> serverVariables)
401
401
{
402
402
_visitor . CurrentKeys . ServerVariable = variable . Key ;
403
403
Walk ( variable . Key , ( ) => Walk ( variable . Value ) ) ;
404
+ _visitor . CurrentKeys . ServerVariable = null ;
404
405
}
405
- _visitor . CurrentKeys . ServerVariable = null ;
406
406
}
407
407
}
408
408
@@ -468,8 +468,8 @@ internal void Walk(IDictionary<OperationType, OpenApiOperation> operations)
468
468
{
469
469
_visitor . CurrentKeys . Operation = operation . Key ;
470
470
Walk ( operation . Key . GetDisplayName ( ) , ( ) => Walk ( operation . Value ) ) ;
471
+ _visitor . CurrentKeys . Operation = null ;
471
472
}
472
- _visitor . CurrentKeys . Operation = null ;
473
473
}
474
474
}
475
475
@@ -574,8 +574,8 @@ internal void Walk(OpenApiResponses responses)
574
574
{
575
575
_visitor . CurrentKeys . Response = response . Key ;
576
576
Walk ( response . Key , ( ) => Walk ( response . Value ) ) ;
577
+ _visitor . CurrentKeys . Response = null ;
577
578
}
578
- _visitor . CurrentKeys . Response = null ;
579
579
}
580
580
Walk ( responses as IOpenApiExtensible ) ;
581
581
}
@@ -637,8 +637,8 @@ internal void Walk(IDictionary<string, OpenApiHeader> headers)
637
637
{
638
638
_visitor . CurrentKeys . Header = header . Key ;
639
639
Walk ( header . Key , ( ) => Walk ( header . Value ) ) ;
640
+ _visitor . CurrentKeys . Header = null ;
640
641
}
641
- _visitor . CurrentKeys . Header = null ;
642
642
}
643
643
}
644
644
@@ -659,8 +659,8 @@ internal void Walk(IDictionary<string, OpenApiCallback> callbacks)
659
659
{
660
660
_visitor . CurrentKeys . Callback = callback . Key ;
661
661
Walk ( callback . Key , ( ) => Walk ( callback . Value ) ) ;
662
+ _visitor . CurrentKeys . Callback = null ;
662
663
}
663
- _visitor . CurrentKeys . Callback = null ;
664
664
}
665
665
}
666
666
@@ -681,8 +681,8 @@ internal void Walk(IDictionary<string, OpenApiMediaType> content)
681
681
{
682
682
_visitor . CurrentKeys . Content = mediaType . Key ;
683
683
Walk ( mediaType . Key , ( ) => Walk ( mediaType . Value ) ) ;
684
+ _visitor . CurrentKeys . Content = null ;
684
685
}
685
- _visitor . CurrentKeys . Content = null ;
686
686
}
687
687
}
688
688
@@ -722,8 +722,8 @@ internal void Walk(IDictionary<string, OpenApiEncoding> encodings)
722
722
{
723
723
_visitor . CurrentKeys . Encoding = item . Key ;
724
724
Walk ( item . Key , ( ) => Walk ( item . Value ) ) ;
725
+ _visitor . CurrentKeys . Encoding = null ;
725
726
}
726
- _visitor . CurrentKeys . Encoding = null ;
727
727
}
728
728
}
729
729
@@ -810,6 +810,7 @@ internal void Walk(IDictionary<string,OpenApiExample> examples)
810
810
{
811
811
_visitor . CurrentKeys . Example = example . Key ;
812
812
Walk ( example . Key , ( ) => Walk ( example . Value ) ) ;
813
+ _visitor . CurrentKeys . Example = null ;
813
814
}
814
815
}
815
816
}
@@ -928,8 +929,8 @@ internal void Walk(IDictionary<string,OpenApiLink> links)
928
929
{
929
930
_visitor . CurrentKeys . Link = item . Key ;
930
931
Walk ( item . Key , ( ) => Walk ( item . Value ) ) ;
932
+ _visitor . CurrentKeys . Link = null ;
931
933
}
932
- _visitor . CurrentKeys . Link = null ;
933
934
}
934
935
}
935
936
@@ -1070,18 +1071,64 @@ private void ExitComponents()
1070
1071
}
1071
1072
}
1072
1073
1074
+ /// <summary>
1075
+ /// Object containing contextual information based on where the walker is currently referencing in an OpenApiDocument
1076
+ /// </summary>
1073
1077
public class CurrentKeys
1074
1078
{
1079
+ /// <summary>
1080
+ /// Current Path key
1081
+ /// </summary>
1075
1082
public string Path { get ; set ; }
1083
+
1084
+ /// <summary>
1085
+ /// Current Operation Type
1086
+ /// </summary>
1076
1087
public OperationType ? Operation { get ; set ; }
1088
+
1089
+ /// <summary>
1090
+ /// Current Response Status Code
1091
+ /// </summary>
1077
1092
public string Response { get ; set ; }
1093
+
1094
+ /// <summary>
1095
+ /// Current Content Media Type
1096
+ /// </summary>
1078
1097
public string Content { get ; set ; }
1098
+
1099
+ /// <summary>
1100
+ /// Current Callback Key
1101
+ /// </summary>
1079
1102
public string Callback { get ; set ; }
1103
+
1104
+ /// <summary>
1105
+ /// Current Link Key
1106
+ /// </summary>
1080
1107
public string Link { get ; set ; }
1108
+
1109
+ /// <summary>
1110
+ /// Current Header Key
1111
+ /// </summary>
1081
1112
public string Header { get ; internal set ; }
1113
+
1114
+ /// <summary>
1115
+ /// Current Encoding Key
1116
+ /// </summary>
1082
1117
public string Encoding { get ; internal set ; }
1118
+
1119
+ /// <summary>
1120
+ /// Current Example Key
1121
+ /// </summary>
1083
1122
public string Example { get ; internal set ; }
1123
+
1124
+ /// <summary>
1125
+ /// Current Extension Key
1126
+ /// </summary>
1084
1127
public string Extension { get ; internal set ; }
1128
+
1129
+ /// <summary>
1130
+ /// Current ServerVariable
1131
+ /// </summary>
1085
1132
public string ServerVariable { get ; internal set ; }
1086
1133
}
1087
1134
}
0 commit comments