使用了services.AddDynamicWebApi()这个默认配置后启动报错
Opened this issue · 1 comments
按照源码默认运行时,在Service中继承了IDynamicWebApi的服务类并没有生成swagger文档
改用services.AddDynamicWebApi()时,启动报错:
Microsoft.AspNetCore.Hosting.Diagnostics[6]
Application startup exception
System.NullReferenceException: Object reference not set to an instance of an object.
at Panda.DynamicWebApiSample.Dynamic.ServiceActionRouteFactory.CreateActionRouteModel(String areaName, String controllerName, ActionModel action) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\samples\Panda.DynamicWebApiSample\Dynamic\ServiceActionRouteFactory.cs:line 17
at Panda.DynamicWebApi.DynamicWebApiConvention.CreateActionRouteModel(String areaName, String controllerName, ActionModel action) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 345
at Panda.DynamicWebApi.DynamicWebApiConvention.NormalizeSelectorRoutes(String areaName, String controllerName, ActionModel action) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 321
at Panda.DynamicWebApi.DynamicWebApiConvention.ConfigureSelector(String areaName, String controllerName, ActionModel action) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 233
at Panda.DynamicWebApi.DynamicWebApiConvention.ConfigureSelector(ControllerModel controller, DynamicWebApiAttribute controllerAttr) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 212
at Panda.DynamicWebApi.DynamicWebApiConvention.ConfigureDynamicWebApi(ControllerModel controller, DynamicWebApiAttribute controllerAttr) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 83
at Panda.DynamicWebApi.DynamicWebApiConvention.Apply(ApplicationModel application) in C:\Users\Administrator\Downloads\Panda.DynamicWebApi-master\Panda.DynamicWebApi-master\src\Panda.DynamicWebApi\DynamicWebApiConvention.cs:line 45
升级一下 swagger Swashbuckle.AspNetCore