mirror of
https://github.com/nsnail/IGeekFan.AspNetCore.Knife4jUI.git
synced 2025-12-16 07:05:48 +08:00
添加项目文件。
This commit is contained in:
14
test/Basic/Swagger/AssignRequestBodyVendorExtensions.cs
Normal file
14
test/Basic/Swagger/AssignRequestBodyVendorExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Microsoft.OpenApi.Any;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
||||
namespace Basic.Swagger
|
||||
{
|
||||
public class AssignRequestBodyVendorExtensions : IRequestBodyFilter
|
||||
{
|
||||
public void Apply(OpenApiRequestBody requestBody, RequestBodyFilterContext context)
|
||||
{
|
||||
requestBody.Extensions.Add("x-purpose", new OpenApiString("test"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user