Closed Strandfelt closed 1 week ago
This issue also exists in net6.0. Spend couple of hours to fix and find out what I did wrong. It happens exactly as in the above description.
I can confirm the same issue in 1.16.0, and as well in 1.16.1. Rolling back to 1.15.1 solves the issue and the http trigger endpoints for OpenAPI reappears. On .net7 and v4 and Windows. All other nugets on latest versions.
So, I've discovered more details about the issue. Since the referenced assembly, that holds the OpenAPI, contains the function http triggers and the old behaviour of the Microsoft.Azure.Functions.Worker.Sdk was to scan ALL assemblies for functions, internal or public, and register them it worked fine. I have my own set of nugets, that contain internal function triggers (timers). They also dissappear with the 1.16.0 SDK. So, the issue has nothing to do with the http or OpenAPI, but seems to be a change in scanning/discovery of triggers in other assemblies than the "main assembly".
Can also confirm the issue with Microsoft.Azure.Functions.Worker.Sdk 1.16.x
where 1.15.1 works.
irm the issue with
Microsoft.Azure.Functions.Worker.Sdk 1.16.x
where 1.15.1 works.
For me this is also the case
Just ran into this. Can confirm also - have had to downgrade to 1.15.1. Well done for opening this @Strandfelt.
Please see Azure/azure-functions-dotnet-worker#2052 (comment)
Yes this release works for me, thank you for the fast implementation of the solution.
Yes, 1.16.2 release solves the problem. Thank you.
This issue should be closed, since it's a problem that doesn't originate in this repo's code.
Describe the issue When upgrading the
Microsoft.Azure.Functions.Worker.Sdk
package to1.16.0
which was released on November 7, the Open API is not able to generate if there are HTTP triggers.It is worth to note that in a vanilla function project with NO triggers, the documents will actually be rendered, but when you add an HTTP triggered function to the project, the Open API endpoints will vanish.
To Reproduce Steps to reproduce the behavior:
dotnet-isolated
Azure Function referencingMicrosoft.Azure.Functions.Worker.Sdk
1.15.1
without any Functionsfunc init MyOpenApiFunctionApp --worker-runtime dotnetIsolated --target-framework net7.0
Microsoft.Azure.Functions.Worker.Extensions.OpenApi
1.5.1
Microsoft.Azure.Functions.Worker.Sdk
to1.16.0
Microsoft.Azure.Functions.Worker.Sdk
to1.15.1
Expected behavior Open API documents are generated for a Functions project referencing
Microsoft.Azure.Functions.Worker.Sdk
package to1.16.0
when there are triggers in the projectEnvironment (please complete the following information, if applicable):
net7.0
v4