ThisNetWorks / ThisNetWorks.OrchardCore.OpenApi

Orchard Core Open Api Code Generation Tools based on NSwag
BSD 3-Clause "New" or "Revised" License
18 stars 14 forks source link

Update for Orchard 1.8 and NSwag 14 #40

Open mvarblow opened 5 months ago

mvarblow commented 5 months ago

Any plans to update the module for .NET 8 -- Orchard Core 1.8 and NSwag 14?

If I try that combination with ThisNetWorks.OrchardCore.OpenApi 1.5.0 then I get this at runtime when enabling the Open API feature:

System.MissingMethodException: Method not found: 'System.Action1<NSwag.AspNetCore.SwaggerUi3Settings> ThisNetWorks.OrchardCore.OpenApi.Options.OpenApiMiddlewareOptions.get_SwaggerUi3Settings()'. at ThisNetWorks.OrchardCore.OpenApi.Startup.Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) at OrchardCore.Modules.ShellPipelineExtensions.ConfigurePipelineAsync(IApplicationBuilder builder) at OrchardCore.Modules.ShellPipelineExtensions.BuildPipelineInternalAsync(ShellContext context) at OrchardCore.Modules.ShellPipelineExtensions.BuildPipelineAsync(ShellContext context) at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext() --- End of stack trace from previous location --- at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func2 execute, Boolean activateShell) at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func2 execute, Boolean activateShell) at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func2 execute, Boolean activateShell) at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func2 execute, Boolean activateShell) at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func2 execute, Boolean activateShell) at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

deanmarcussen commented 5 months ago

yes, there's an upgrade to NSwag in OC 1.8 that isn't reflectd in this repository yet.

There is an draft pr here, I just haven't had time to test it, or add the OC 1.8 upgrade as well https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.OpenApi/pull/39

If you are actively using it, and can report issues, then I'd be happy to merge it untested, as I am not in a position to take OC 1.8 easily and test it well myself at the moment.