swagger.json missing "paths" when deployed as Azure Functions from DevOps
See original GitHub issueThis works locally and works when I publish from VS directly to Azure Functions.
When I run this through DevOps Build Pipeline and Release to Azure Functions everything is working except the “paths” property in the swagger.json file is empty.
Windows target system.
{
"swagger": "2.0",
"info": {
"title": "Azure Functions OpenAPI Extension",
"version": "1.0.0"
},
"host": "........azurewebsites.net",
"basePath": "/api/v1",
"schemes": [
"https"
],
"paths": { }
}
No errors in the Azure Functions LogStream.
2021-06-30T21:02:59.179 [Information] Executing ‘Functions.RenderSwaggerDocument’ (Reason=‘This function was programmatically called via the host APIs.’, Id=000000-c94f-4960-9752-5557d5d998e5) 2021-06-30T21:02:59.180 [Information] swagger.json was requested. 2021-06-30T21:02:59.180 [Information] Executed ‘Functions.RenderSwaggerDocument’ (Succeeded, Id=000000-c94f-4960-9752-5557d5d998e5, Duration=1ms)
What reasons might prevent the “paths” property from populating? I assume it’s dynamically generated at runtime?
Does it require any write permissions to the file system for instance?
It’s hard to debug as it doesn’t appear to show any errors.
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Swagger UI not generating in azure .net core but it is ...
this worked for me. Now I am able to see my swagger.json file on my Azure subdomain instead of locally only. I wonder...
Read more >Azure Functions with Swagger - Kloud Blog
Azure Functions instance automatically converts the YAML document to the JSON one. It seems to be very easy. However, there is a critical...
Read more >API Versioning with Swagger, Azure API Management ...
I've recently been working with a number of API's that are deployed on Azure behind the Azure API Management Services.
Read more >Troubleshooting online endpoints deployment and scoring
Learn how to resolve common issues in the deployment and scoring of Azure Machine Learning online endpoints. This document is structured in the ......
Read more >Guide for running C# Azure Functions in an isolated worker ...
Learn how to use a .NET isolated worker process to run your C# functions in Azure, which supports non-LTS versions of .NET and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@justinyoo I prepared the minimum code to send over to you, but then decided to review your yaml settings beforehand.
I noticed that you was performing a restore, build and publish (artifacts) separately and thought I should try this too.
I setup my pipeline in the same way, with the following:
Interestingly this solved the issue… at least it worked when I tested just now 👍
I guess there’s no need to send the minimum code now 😃
It’s odd that the issue exists though and it’s not entirely clear why, happy to investigate further but it does appear to be build related.
Thanks @justinyoo for your help with this matter.
Hi @binarybasher ! As you are using Azure DevOps and I ran in the same issue may I ask you to share the pipeline.yaml file?
Hi @justinyoo - Is this solved in 0.9.0-preview (#225) and when will this be released?