//-----------------------------------------------------------------------
// <copyright file="OperationProcessorCollection.cs" company="NSwag">
//     Copyright (c) Rico Suter. All rights reserved.
// </copyright>
// <license>https://github.com/RicoSuter/NSwag/blob/master/LICENSE.md</license>
// <author>Rico Suter, mail@rsuter.com</author>
//-----------------------------------------------------------------------

using System.Reflection;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using NJsonSchema.Generation;
using NSwag.Generation.Processors;
using NSwag.Generation.Processors.Contexts;

namespace NSwag.Generation.AspNetCore
{
    /// <summary>The <see cref="IOperationProcessor"/> context that use <see cref="Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription"/>.</summary>
    public class AspNetCoreOperationProcessorContext : OperationProcessorContext
    {
        /// <summary>Initializes a new instance of the <see cref="AspNetCoreOperationProcessorContext" /> class.</summary>
        /// <param name="document">The document.</param>
        /// <param name="operationDescription">The operation description.</param>
        /// <param name="controllerType">Type of the controller.</param>
        /// <param name="methodInfo">The method information.</param>
        /// <param name="documentGenerator">The OpenAPI generator.</param>
        /// <param name="schemaResolver">The schema resolver.</param>
        /// <param name="settings">The sett</param>
        /// <param name="allOperationDescriptions">All operation descriptions.</param>
        public AspNetCoreOperationProcessorContext(
            OpenApiDocument document,
            OpenApiOperationDescription operationDescription,
            Type controllerType,
            MethodInfo methodInfo,
            OpenApiDocumentGenerator documentGenerator,
            JsonSchemaResolver schemaResolver,
            OpenApiDocumentGeneratorSettings settings,
            IList<OpenApiOperationDescription> allOperationDescriptions)
            : base(document, operationDescription, controllerType, methodInfo, documentGenerator, schemaResolver, settings, allOperationDescriptions)
        {
        }

        /// <inheritdoc cref="Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription"/>
        public ApiDescription ApiDescription { get; set; }
    }
}
