I am trying to generate swagger file using dotnet swagger command for my azure functions but getting error runtimeconfig.json does not exist. Please guide me on this on how to generate swagger file for azure functions using dotnet swagger command.
Asked
Active
Viewed 1,009 times
1 Answers
0
I have 2 ways for this
WAY -1
Please check if you are giving the correct command. The command is no longer dotnet swagger
. It is swagger
only.
You can find more information in the SO Threads you can refer more HERE which discusses the similar related issue.
WAY-2 You can leverage the following approach which is to use APIM along with Functions. These APIs are described using an OpenAPI definition. This JSON / YAML file contains information on what operations are available in an API. By integrating your function app, you can have API Management generate these OpenAPI definitions.
Steps to follow in order to get the OpenAPI definition
- Create the API Management Instance and hence it enables the
Enable Application Insights
option. As so, we can send the logs to the same place as function Application.- Import your HTTP triggered function endpoints.
- Now you can download the OpenAPI definition from API Management instance.
Refer the following LINK to get a step by step procedure

SwethaKandikonda
- 7,513
- 2
- 4
- 18
-
Thanks for the response. I will go through them. – samssagar Jun 30 '21 at 15:14
-
I am trying to do this automation for APIM only. In my scenario I am trying to generate the swagger file automatically and by the help of ARM template, I am trying to automate the update of APIM APIs. – samssagar Jun 30 '21 at 15:16