Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 Isolated example, swagger ui wont render but I see the endpoints listed in the runtime window #663

Open
netbitshift opened this issue Jul 17, 2024 · 2 comments

Comments

@netbitshift
Copy link

netbitshift commented Jul 17, 2024

Describe the issue
following this example
https://github.com/Azure/azure-functions-openapi-extension/blob/main/docs/enable-open-api-endpoints-out-of-proc.md

Only thing I added to my program.cs was
.ConfigureFunctionsWorkerDefaults(worker => worker.UseNewtonsoftJson())

To Reproduce
Setup a new Azure v4 function app using .net 8 isolated
Add the references like in the example for out-of-proc examples
Add the attributes to my function

I can see the swagger ui url getting called in the execution window, but the browser window is completely blank.

Expected behavior
Show swagger ui, but when I go the the swagger url, I see only a blank screen
.

@deltastateonline
Copy link

Hi there,
i have the exact same problem, following all the instructions, is there a work around or a possible solution

@MvdDonk
Copy link

MvdDonk commented Oct 17, 2024

Try using

.ConfigureFunctionsWebApplication(worker => worker.UseNewtonsoftJson())

instead of

.ConfigureFunctionsWorkerDefaults(worker => worker.UseNewtonsoftJson())

see: https://dotnet-worker-rules.azurewebsites.net/rules?ruleid=AZFW0014

Visual Studio and Visual Studio Code are both giving a warning in the IDE:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants