2020-09-07 10:17:58 +00:00
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
|
|
using Swashbuckle.AspNetCore.Swagger;
|
2018-08-27 12:59:47 +00:00
|
|
|
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2018-08-27 14:14:20 +00:00
|
|
|
|
using System.Linq;
|
2018-08-27 12:59:47 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.WebHost
|
|
|
|
|
|
{
|
2020-09-07 10:17:58 +00:00
|
|
|
|
//public class SwaggerFileUploadOperation : IOperationFilter
|
|
|
|
|
|
//{
|
2018-08-27 14:14:20 +00:00
|
|
|
|
|
2020-09-07 10:17:58 +00:00
|
|
|
|
// public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// if (operation.OperationId == "Import")
|
|
|
|
|
|
// {
|
|
|
|
|
|
// operation.Parameters.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
// operation.Parameters.Add(new OpenApiParameter
|
|
|
|
|
|
// {
|
|
|
|
|
|
// Name = "uploadedFile",
|
|
|
|
|
|
// In = "formData",
|
|
|
|
|
|
// Description = "Upload Zip File, meta.json is the extra data for customized function.",
|
|
|
|
|
|
// Required = true,
|
|
|
|
|
|
// Type = "file"
|
|
|
|
|
|
// });
|
|
|
|
|
|
// operation.Consumes.Add("multipart/form-data");
|
|
|
|
|
|
// operation.
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
2018-08-27 12:59:47 +00:00
|
|
|
|
}
|