Addresses #5251
This commit is contained in:
parent
8fb339483d
commit
92682b71f3
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.ApiExplorer
|
||||
|
|
@ -8,7 +9,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
|
|||
/// <summary>
|
||||
/// Provides a a set of possible content types than can be consumed by the action.
|
||||
/// </summary>
|
||||
public interface IApiRequestMetadataProvider
|
||||
public interface IApiRequestMetadataProvider : IFilterMetadata
|
||||
{
|
||||
/// <summary>
|
||||
/// Configures a collection of allowed content types which can be consumed by the action.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.ApiExplorer
|
||||
|
|
@ -10,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
|
|||
/// Provides a return type, status code and a set of possible content types returned by a
|
||||
/// successful execution of the action.
|
||||
/// </summary>
|
||||
public interface IApiResponseMetadataProvider
|
||||
public interface IApiResponseMetadataProvider : IFilterMetadata
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the optimistic return type of the action.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc
|
||||
|
|
@ -12,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc
|
|||
/// A filter that specifies the type of the value and status code returned by the action.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
|
||||
public class ProducesResponseTypeAttribute : Attribute, IApiResponseMetadataProvider, IFilterMetadata
|
||||
public class ProducesResponseTypeAttribute : Attribute, IApiResponseMetadataProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes an instance of <see cref="ProducesResponseTypeAttribute"/>.
|
||||
|
|
|
|||
Loading…
Reference in New Issue