From 8ed5707019370c22dc3113dd213b01ac14d0d6dd Mon Sep 17 00:00:00 2001 From: Derek Gray Date: Fri, 9 Sep 2016 09:27:49 -0500 Subject: [PATCH] Addresses #5251 --- .../ApiExplorer/IApiRequestMetadataProvider.cs | 3 ++- .../ApiExplorer/IApiResponseMetadataProvider.cs | 3 ++- .../ProducesResponseTypeAttribute.cs | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiRequestMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiRequestMetadataProvider.cs index 7944ce22bc..c59f38f7de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiRequestMetadataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiRequestMetadataProvider.cs @@ -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 /// /// Provides a a set of possible content types than can be consumed by the action. /// - public interface IApiRequestMetadataProvider + public interface IApiRequestMetadataProvider : IFilterMetadata { /// /// Configures a collection of allowed content types which can be consumed by the action. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiResponseMetadataProvider.cs b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiResponseMetadataProvider.cs index 5ae22c29d2..fb69f37f2e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiResponseMetadataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ApiExplorer/IApiResponseMetadataProvider.cs @@ -3,6 +3,7 @@ using System; using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.AspNetCore.Mvc.Filters; 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. /// - public interface IApiResponseMetadataProvider + public interface IApiResponseMetadataProvider : IFilterMetadata { /// /// Gets the optimistic return type of the action. diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ProducesResponseTypeAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ProducesResponseTypeAttribute.cs index c8a3eace66..126310817c 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ProducesResponseTypeAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ProducesResponseTypeAttribute.cs @@ -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. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] - public class ProducesResponseTypeAttribute : Attribute, IApiResponseMetadataProvider, IFilterMetadata + public class ProducesResponseTypeAttribute : Attribute, IApiResponseMetadataProvider { /// /// Initializes an instance of .