I Have Azure HttpTrigger Java functions(get, Post) Those are Working Fine in Postman but, as per the Client Requirement I need To create swagger UI file for all those functions(Java) i am searching Refference stuff from lastweek, stil i did not get it,So plese any one share/guide/help me
- How to craete Azure HttpTriggerr Java function project with Springboot Application?
Following this MS Doc, created the Azure Functions Http Trigger in Spring boot.
1st Step is cloning the basic Function code of Sprint Boot Azure Functions Application.
Step 2: In pom.xml, you have to change these properties accordingly:
<functionResourceGroup>HariTestRG</functionResourceGroup>
<functionAppName>my-spring-function-app</functionAppName>
Step 3: Clean and build the packages ./mvnw clean package
and then run using the cmdlet ./mvnw azure-functions:run
Next is to deploy the function code to Azure Function App:
./mvnw azure-functions:deploy
Result:
- How to add Swagger Configuration to it?
Go to the Azure Portal > Deployed Function App > Click on API Management on left Index > Import the Function App APIs in APIM Instance > Then you'll see the Open API Definition which generates the swagger UI file for all the functions: