@@ -104,7 +104,7 @@ internal void Compare(decimal? source, decimal? target, ComparisonContext compar
104104 /// <param name="source">The source.</param>
105105 /// <param name="target">The target.</param>
106106 /// <param name="comparisonContext">The context under which to compare the objects.</param>
107- internal void Compare < TE > ( Enum source , Enum target , ComparisonContext comparisonContext )
107+ internal void Compare < TEnum > ( Enum source , Enum target , ComparisonContext comparisonContext )
108108 {
109109 if ( source == null && target == null )
110110 {
@@ -116,7 +116,7 @@ internal void Compare<TE>(Enum source, Enum target, ComparisonContext comparison
116116 comparisonContext . AddOpenApiDifference ( new OpenApiDifference
117117 {
118118 OpenApiDifferenceOperation = OpenApiDifferenceOperation . Update ,
119- OpenApiComparedElementType = typeof ( TE ) ,
119+ OpenApiComparedElementType = typeof ( TEnum ) ,
120120 SourceValue = source ,
121121 TargetValue = target ,
122122 Pointer = comparisonContext . PathString
@@ -130,7 +130,7 @@ internal void Compare<TE>(Enum source, Enum target, ComparisonContext comparison
130130 comparisonContext . AddOpenApiDifference ( new OpenApiDifference
131131 {
132132 OpenApiDifferenceOperation = OpenApiDifferenceOperation . Update ,
133- OpenApiComparedElementType = typeof ( T ) ,
133+ OpenApiComparedElementType = typeof ( TEnum ) ,
134134 SourceValue = source ,
135135 TargetValue = target ,
136136 Pointer = comparisonContext . PathString
@@ -149,7 +149,7 @@ internal void WalkAndAddOpenApiDifference(
149149 string segment ,
150150 OpenApiDifference openApiDifference )
151151 {
152- comparisonContext . Enter ( segment . Replace ( "/" , "~1" ) ) ;
152+ comparisonContext . Enter ( segment . Replace ( "/" , "~1" ) . Replace ( "~" , "~0" ) ) ;
153153 openApiDifference . Pointer = comparisonContext . PathString ;
154154 comparisonContext . AddOpenApiDifference ( openApiDifference ) ;
155155 comparisonContext . Exit ( ) ;
@@ -166,7 +166,7 @@ protected virtual void WalkAndCompare(
166166 string segment ,
167167 Action compare )
168168 {
169- comparisonContext . Enter ( segment . Replace ( "/" , "~1" ) ) ;
169+ comparisonContext . Enter ( segment . Replace ( "/" , "~1" ) . Replace ( "~" , "~0" ) ) ;
170170 compare ( ) ;
171171 comparisonContext . Exit ( ) ;
172172 }
0 commit comments