Azure / azure-functions-openapi-extension

This extension provides an Azure Functions app with Open API capability for better discoverability to consuming parties
https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/
MIT License
368 stars 193 forks source link

Swagger UI not rendering in .net6 with "Microsoft.EntityFrameworkCore.Cosmos" version >= 7.0.0 #569

Open karthikd70 opened 1 year ago

karthikd70 commented 1 year ago

Describe the issue We are migrated from .net core 3.1 to .net6 in azure functions projects. After migrating we are facing problem with swagger ui rendering. We need to use Microsoft.EntityFrameworkCore.Cosmos version >= 7.0.0 because of dependency on RBAC which is supported in v7.0.0 onwards.

To Reproduce

  1. Create a azure function app with .net6 in-process target.
  2. Add package reference
  3. Add <_FunctionsSkipCleanOutput>true to surpresss dll not found issue.
  4. Run the project and try to render Swagger UI.
  5. Gives the error message "System.Private.CoreLib: Exception while executing function: Functions.RenderSwaggerUI. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'log'. Microsoft.Azure.WebJobs.Host: No value was provided for parameter 'log'."

Expected The swagger UI should render.

ben-lewis-newday commented 4 months ago

Bump!

ben-lewis-newday commented 2 months ago

I found that downgrading the package Microsoft.Extensions.Logging from 7.0.0 to 6.0.0 fixed my issue.