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