microsoft / microsoft/aspire

using AddAzureFunctionsProject() in conjunction with openapi for azure functions breaks swagger ui

Open
#11,775 3 comments 0 reactions 0 assignees View on GitHub
area-integrations
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Note: May be related to issue 10958 because it seems to be a port mismatch.

Using aspire to launch an azure function app that uses openapi following the steps outlined here:

https://github.com/Azure/azure-functions-openapi-extension/blob/main/docs/openapi-out-of-proc.md

and here:

https://learn.microsoft.com/en-us/dotnet/aspire/serverless/functions?tabs=dotnet-cli&pivots=vscode

results in a broken swagger ui due to port mismatch (see attachment)

Image

### Expected Behavior

Swagger UI should work the same as when launching the function app by itself.

### Steps To Reproduce

Follow the steps outlined here:

https://github.com/Azure/azure-functions-openapi-extension/blob/main/docs/openapi-out-of-proc.md

and here:

https://learn.microsoft.com/en-us/dotnet/aspire/serverless/functions?tabs=dotnet-cli&pivots=vscode

### Exceptions (if any)

_No response_

### .NET Version info

.NET SDK:
Version: 9.0.305
Commit: 3fc74f3529

### Anything else?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.