Azure / Azure/azure-functions-openapi-extension
Swagger UI not rendering in .net6 with "Microsoft.EntityFrameworkCore.Cosmos" version >= 7.0.0
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
Research direction
Reproduce the issue with an Azure Functions .NET 6 in-process app and Microsoft.EntityFrameworkCore.Cosmos 7.0.4, following the listed package and FunctionsSkipCleanOutput steps. Start with the binding error for Functions.RenderSwaggerUI and determine why the log parameter is not supplied; done means Swagger UI renders successfully with the required Cosmos dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, openapi
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100