@@ -275,9 +275,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
275275 // Flag stricter constraints for requests and relaxed constraints for responses.
276276 if ( prior . ExclusiveMaximum != ExclusiveMaximum || context . Direction == DataDirection . None )
277277 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 ) )
279279 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 ) )
281281 context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "maximum" ) ;
282282 else if ( Narrows ( prior . Maximum , Maximum , false ) )
283283 context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "maximum" ) ;
@@ -295,9 +295,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
295295 context . LogBreakingChange ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
296296 else if ( context . Direction == DataDirection . Response && Widens ( prior . Minimum , Minimum , true ) )
297297 context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
298- else if ( Narrows ( prior . Minimum , Minimum , false ) )
298+ else if ( Narrows ( prior . Minimum , Minimum , true ) )
299299 context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
300- else if ( Widens ( prior . Minimum , Minimum , false ) )
300+ else if ( Widens ( prior . Minimum , Minimum , true ) )
301301 context . LogInfo ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
302302 }
303303 if ( ( prior . MaxLength == null && MaxLength != null ) ||
@@ -325,9 +325,9 @@ protected void CompareConstraints(ComparisonContext<ServiceDefinition> context,
325325 context . LogBreakingChange ( ComparisonMessages . ConstraintIsStronger , "minimum" ) ;
326326 else if ( context . Direction == DataDirection . Response && Widens ( prior . MinLength , MinLength , true ) )
327327 context . LogBreakingChange ( ComparisonMessages . ConstraintIsWeaker , "minimum" ) ;
328- else if ( Narrows ( prior . MinLength , MinLength , false ) )
328+ else if ( Narrows ( prior . MinLength , MinLength , true ) )
329329 context . LogInfo ( ComparisonMessages . ConstraintIsStronger , "minLength" ) ;
330- else if ( Widens ( prior . MinLength , MinLength , false ) )
330+ else if ( Widens ( prior . MinLength , MinLength , true ) )
331331 context . LogInfo ( ComparisonMessages . ConstraintIsWeaker , "minLength" ) ;
332332 }
333333 if ( ( prior . Pattern == null && Pattern != null ) ||
0 commit comments