Swagger Integration with APIM
below are the simple steps to integrate the swagger with APIM,
Requirements
Below are the configuration changes in the Application
- Application Side changes in the java spring boot code
Changes to be done in APIM to access the swagger ui for the microservice running in AKS.
1. Disable ocip subscription key for the API & operations. Click on the API and then select Settings in the tab, disable the subscription required box.
2. In the API, add a new Get operation which is used for accessing the swagger UI
- Make sure the frontend configuration is having the context path as ‘/*’
- The backend path is mentioned correctly to the microservice with swagger ui.
3. Disable cors policy for this operation
- Select All API and go to Inbound processing and edit Cors policy.
4. provide ‘*’ in the allowed origins and save the changes.
above are the simple step for the integration