yiyungent / PluginCore

🔌 ASP.NET Core lightweight plugin framework | ASP.NET Core 轻量级 插件框架 - 一分钟集成 | Vue.js frontend | JavaScript SDK
https://yiyungent.github.io/PluginCore/
GNU Lesser General Public License v3.0
457 stars 87 forks source link

response status is 500 https://localhost:7287/swagger/v1/swagger.json #12

Closed yiyungent closed 2 years ago

yiyungent commented 2 years ago
SwaggerGeneratorException: Ambiguous HTTP method for action - PluginCore.Controllers.AppCenterController.Plugins (PluginCore). Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0
Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable<ApiDescription> apiDescriptions, SchemaRepository schemaRepository)
Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable<ApiDescription> apiDescriptions, SchemaRepository schemaRepository)
Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(string documentName, string host, string basePath)
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

image

image

image

yiyungent commented 2 years ago

PluginCore + Swashbuckle.AspNetCore 配合使用就容易导致此错误,需要给 PluginCore.Controllers.AppCenterController.Plugins 打上 HTTP 特性