@@ -275,9 +275,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
275
275
// Flag stricter constraints for requests and relaxed constraints for responses.
276
276
if ( prior . ExclusiveMaximum != ExclusiveMaximum || context . Direction == DataDirection . None )
277
277
context . LogBreakingChange ( ComparisonMessages . ConstraintChanged , "maximum" ) ;
278
- else if ( context . Direction == DataDirection . Request && Narrows ( prior . Maximum , Maximum , true ) )
278
+ else if ( context . Direction == DataDirection . Request && Narrows ( prior . Maximum , Maximum , false ) )
279
279
context . LogBreakingChange ( ComparisonMessages . ConstraintIsStronger , "maximum" ) ;
280
- else if ( context . Direction == DataDirection . Response && Widens ( prior . Maximum , Maximum , true ) )
280
+ else if ( context . Direction == DataDirection . Response && Widens ( prior . Maximum , Maximum , false ) )
281
281
context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "maximum" ) ;
282
282
else if ( Narrows ( prior . Maximum , Maximum , false ) )
283
283
context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "maximum" ) ;
@@ -295,9 +295,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
295
295
context . LogBreakingChange ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
296
296
else if ( context . Direction == DataDirection . Response && Widens ( prior . Minimum , Minimum , true ) )
297
297
context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
298
- else if ( Narrows ( prior . Minimum , Minimum , false ) )
298
+ else if ( Narrows ( prior . Minimum , Minimum , true ) )
299
299
context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
300
- else if ( Widens ( prior . Minimum , Minimum , false ) )
300
+ else if ( Widens ( prior . Minimum , Minimum , true ) )
301
301
context . LogInfo ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
302
302
}
303
303
if ( ( prior . MaxLength == null && MaxLength != null ) ||
@@ -325,9 +325,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
325
325
context . LogBreakingChange ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
326
326
else if ( context . Direction == DataDirection . Response && Widens ( prior . MinLength , MinLength , true ) )
327
327
context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
328
- else if ( Narrows ( prior . MinLength , MinLength , false ) )
328
+ else if ( Narrows ( prior . MinLength , MinLength , true ) )
329
329
context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "minLength" ) ;
330
- else if ( Widens ( prior . MinLength , MinLength , false ) )
330
+ else if ( Widens ( prior . MinLength , MinLength , true ) )
331
331
context . LogInfo ( ComparisonMessages . ConstraintIsWeaker , "minLength" ) ;
332
332
}
333
333
if ( ( prior . Pattern == null && Pattern != null ) ||
0 commit comments