diff --git a/src/Mvc/Mvc.Core/src/ApiExplorer/IApiRequestFormatMetadataProvider.cs b/src/Mvc/Mvc.Core/src/ApiExplorer/IApiRequestFormatMetadataProvider.cs
index cfb942053215..50e84006030d 100644
--- a/src/Mvc/Mvc.Core/src/ApiExplorer/IApiRequestFormatMetadataProvider.cs
+++ b/src/Mvc/Mvc.Core/src/ApiExplorer/IApiRequestFormatMetadataProvider.cs
@@ -25,6 +25,6 @@ public interface IApiRequestFormatMetadataProvider
///
/// Content types which are supported by the .
IReadOnlyList? GetSupportedContentTypes(
- string contentType,
+ string? contentType,
Type objectType);
}
diff --git a/src/Mvc/Mvc.Core/src/Formatters/InputFormatter.cs b/src/Mvc/Mvc.Core/src/Formatters/InputFormatter.cs
index 2474e63ab177..47a6fa1b5b27 100644
--- a/src/Mvc/Mvc.Core/src/Formatters/InputFormatter.cs
+++ b/src/Mvc/Mvc.Core/src/Formatters/InputFormatter.cs
@@ -118,7 +118,7 @@ public virtual Task ReadAsync(InputFormatterContext contex
public abstract Task ReadRequestBodyAsync(InputFormatterContext context);
///
- public virtual IReadOnlyList? GetSupportedContentTypes(string contentType, Type objectType)
+ public virtual IReadOnlyList? GetSupportedContentTypes(string? contentType, Type objectType)
{
if (SupportedMediaTypes.Count == 0)
{
diff --git a/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt b/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
index ebb18238569f..824fa9ceec9d 100644
--- a/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
+++ b/src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
@@ -172,7 +172,7 @@ Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupNameProvider.GroupName.
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionVisibilityProvider
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionVisibilityProvider.IgnoreApi.get -> bool
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider
-Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider.GetSupportedContentTypes(string! contentType, System.Type! objectType) -> System.Collections.Generic.IReadOnlyList?
+Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider.GetSupportedContentTypes(string? contentType, System.Type! objectType) -> System.Collections.Generic.IReadOnlyList?
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider.SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection! contentTypes) -> void
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider
@@ -2454,7 +2454,7 @@ virtual Microsoft.AspNetCore.Mvc.Formatters.FormatFilter.GetFormat(Microsoft.Asp
virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.CanRead(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context) -> bool
virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.CanReadType(System.Type! type) -> bool
virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.GetDefaultValueForType(System.Type! modelType) -> object?
-virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.GetSupportedContentTypes(string! contentType, System.Type! objectType) -> System.Collections.Generic.IReadOnlyList?
+virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.GetSupportedContentTypes(string? contentType, System.Type! objectType) -> System.Collections.Generic.IReadOnlyList?
virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatter.ReadAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context) -> System.Threading.Tasks.Task!
virtual Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext! context) -> bool
virtual Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.CanWriteType(System.Type? type) -> bool