apiazure-functionsswaggerswagger-editorazure-java-sdk

How to generate swagger file to azure Java Functions without springboot


  1. I have Azure Http trigger java Functions works for copy files from one container to another container, generate Sas token etc by using BlobServiceClient java class... These functions i created without using springboot now my requirement is I need to generate swagger Ui to this Functions please help me how to generate swagger file/ Ui for these functions

  2. I tried swagger editor but swagger editor expecting Json input in my case i need to pass only one parameter

My api link:

http://functionapp name.net/api/functionname?file=filename

Please help me how to edit swagger Ui for above api in https://editor.swagger.io/


Solution

  • Written the sample code for generating the SAS Token and copying the blob in Java Azure Functions without Spring Boot by following this MS Doc:

    enter image description here

    Then deployed to Azure Function App in Portal > Linked the APIM Service by adding this Http Trigger API to it > Click on Open API definition where you'll see the Swagger UI Json file:

    enter image description here

    You can modify the Open API file in any section according to your requirement: enter image description here