-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Labels
Needs: Triage (Functions)feature: api-descriptionItems related to API descriptionItems related to API descriptionpotential-bugItems opened using the bug report template, not yet triaged and confirmed as a bugItems opened using the bug report template, not yet triaged and confirmed as a bug
Description
Description
I've created a new Azure Functions project with new Aspire in Visual Studio 2022 using net9.0. Then, I've added NuGet depencency Microsoft.Azure.Functions.Worker.Extensions.OpenApi in version 1.5.1. When starting this, the default Function1 and Swagger UI is listed in console output of the App as expected:
Functions:
Function1: [GET,POST] http://localhost:7227/api/Function1
RenderOAuth2Redirect: [GET] http://localhost:7227/api/oauth2-redirect.html
RenderOpenApiDocument: [GET] http://localhost:7227/api/openapi/{version}.{extension}
RenderSwaggerDocument: [GET] http://localhost:7227/api/swagger.{extension}
RenderSwaggerUI: [GET] http://localhost:7227/api/swagger/ui
When I now open http://localhost:7227/api/swagger/ui, I get an error Failed to load API definition. and Fetch error, Failed to fetch http://localhost:57773/api/swagger.json. It looks like the Aspire port 7227 is not picked up by Swagger UI so it tries to load definitions from a wrong address.
Steps to reproduce
See description.
Metadata
Metadata
Assignees
Labels
Needs: Triage (Functions)feature: api-descriptionItems related to API descriptionItems related to API descriptionpotential-bugItems opened using the bug report template, not yet triaged and confirmed as a bugItems opened using the bug report template, not yet triaged and confirmed as a bug