Hello,
Help wanted.
I'm developing Swagger documentation package for Azure Functions, which is dependent on
Microsoft.Azure.WebJobs.Extensions.Http
Microsoft.Azure.Functions.Extensions
packages
Currently, it's not possible for me to update the version System.Text.Json. from 4.7.0 => 4.7.2 (or 4.7.1, 5.0.0) as I'm getting the following error:
'Method not found: 'Void Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter..ctor(System.Text.Json.JsonSerializerOptions)'.'
The issue is described here: https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/issues/30
Provide the steps required to reproduce the problem
Download the repo (https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/tree/dev)
Update from 4.7.0 to 4.7.2 both TestFunction and AzureFunctions.Extensions.Swashbuckle
Start the project.
Works
'Method not found: 'Void Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter..ctor(System.Text.Json.JsonSerializerOptions)'.'

I was trying to investigate it is much as possible in here => https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/tree/branch/trying-update-json
I have substituted SystemTextJsonOutputFormatter with my version => SystemTextJsonOutputFormatter2, which uses it's own TranscodingWriteStream, as they are both sealed and internal, it was not possible to override anything.
Now it fails during function call => http://localhost:7071/api/Swagger/ui
though with the same error:

I think, that is related to the fact that one of these projects has not been updated fully.
Hi,
Any updates on this one?
@v-anvari @fabiocav
Hi,
Any updates on this one?
@v-anvari @fabiocav
Hi,
Any updates on this one?
@v-anvari @fabiocav
Apologies for the delayed response here.
This is a reasonable request. I'll move it to the host repo, where we'd have to address this (that's the component performing the unification) and track it for the next sprint.
I just ran into this. Ugh. I brought in HtmlTags package which depends on System.Text.Json >= 5.0.0. I guess no Swagger docs for this function app for now. :(
Are there any workarounds (ugly or not) that you've found in the meantime? @fabiocav @vitalybibikov
The current release is locked with multiple sprints. Pushing this to the next sprint as it will be part of a separate release.
Most helpful comment
Apologies for the delayed response here.
This is a reasonable request. I'll move it to the host repo, where we'd have to address this (that's the component performing the unification) and track it for the next sprint.