Skip to content

Commit f6a01d4

Browse files
IsDeprecated should be false when version-neutral
1 parent 92d0963 commit f6a01d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer/ApiDescriptionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static bool IsDeprecated( this ApiDescription apiDescription )
3939
var apiVersion = apiDescription.GetApiVersion();
4040
var model = apiDescription.ActionDescriptor.GetApiVersionModel( Explicit | Implicit );
4141

42-
return model.DeprecatedApiVersions.Contains( apiVersion );
42+
return !model.IsApiVersionNeutral && model.DeprecatedApiVersions.Contains( apiVersion );
4343
}
4444

4545
/// <summary>

0 commit comments

Comments
 (0)