vitalybibikov / AzureExtensions.Swashbuckle

This extension enriches Azure Functions with Swagger/ Open API support
https://www.linkedin.com/in/vitali-bibikov/
MIT License
68 stars 54 forks source link

Error with JsonSerializer options #112

Closed mandarsj closed 6 months ago

mandarsj commented 7 months ago

I am adding swashbuckle to azure functions on .net framework 8.0.

services.AddSwashBuckle(Assembly.GetExecutingAssembly(), opts => { opts.AddCodeParameter = true; opts.Documents = new[] { new SwaggerDocument { Name = "v1", Title = "Swagger document", Description = "Integrate Swagger UI With Azure Functions", Version = "v2" } };

});

it's just this code. However I get strange error. JsonSerializerOptions instance must specify a TypeInfoResolver setting before being marked as read-only.

Does anybody already face this? what exactly is wrong ?

vitalybibikov commented 7 months ago

Can you specify more details? What version of package are you using? Can you provide any repro? thanks

Please update to the latest, coz I think it was fixed in beta

dotnet add package AzureExtensions.Swashbuckle --version 4.0.1

vitalybibikov commented 6 months ago

Failed to reproduce, guess fixed while in beta, please reopen a new one if needed