You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I leverage the OpenApiOperation attribute, and the related attributes, to describe several HttpTrigger functions in my netcoreapp3.1 Azure Functions project.
It works successfully, when I navigate to my local swagger endpoint: 'http://localhost:7071/api/swagger/ui', but when I have deployed it (through Github Actions), the generated Swagger on the endpoint 'https://mysite-tst.azurewebsites.net/api/swagger.json' is empty and does not contain operations.
The UI page indicates: No operations defined in spec!
To Reproduce
Steps to reproduce the behavior:
Add relevant attributes such as OpenApiOperation, OpenApiSecurity, OpenApiResponseWithBody... to functions that contain a HttpTrigger binding.
Hello @justinyoo
Thanks to the suggestion of @RealGoodAnthony , I changed my build so that the dotnet publish was not using the .sln , but was pointing to the specific csproj project file. And that seemed to solve the problem.
So, I did the following steps:
Created a copy of the .sln file and removed the test project from that
Updated the csproj file of the Test project to include the following line: <IsPublishable>false</IsPublishable>
Changed the following line: dotnet publish ${{ env.SOLUTION }} -c ${{ env.BUILD_CONFIG }} -o ${{env.DOTNET_ROOT}}/myapp
to dotnet publish ${{ env.WORKER_PROJECT }} -c ${{ env.BUILD_CONFIG }} -o ${{env.DOTNET_ROOT}}/myapp
in my .yaml workflow
Describe the issue
I leverage the
OpenApiOperation
attribute, and the related attributes, to describe severalHttpTrigger
functions in my netcoreapp3.1 Azure Functions project.It works successfully, when I navigate to my local swagger endpoint: 'http://localhost:7071/api/swagger/ui', but when I have deployed it (through Github Actions), the generated Swagger on the endpoint 'https://mysite-tst.azurewebsites.net/api/swagger.json' is empty and does not contain operations.
The UI page indicates: No operations defined in spec!
To Reproduce
Steps to reproduce the behavior:
OpenApiOperation
,OpenApiSecurity
,OpenApiResponseWithBody
... to functions that contain aHttpTrigger
binding.Expected behavior
Swagger file should be the same , regardless of hosting environment
The text was updated successfully, but these errors were encountered: