using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;

namespace SharpRSS.API.Net
{
    public class SwaggerSessionHeader : IOperationFilter
    {
        public void Apply(OpenApiOperation operation, OperationFilterContext context)
        {
            operation.Parameters.Add(new OpenApiParameter()
            {
                Name = "SRSS-Session",
                In = ParameterLocation.Header,
                Required = false,
                Schema = new OpenApiSchema() { Type = "string" }
            });
        }
    }
}