To enable Swagger for a PASOE instance:
1. Open a PROENV shell and navigate to the working directory.
2. Create a PASOE instance:
$ pasman create -f -p 8890 -P 8891 -s 8892 -m tomcat:tomcat -N Test <workingdirectory>/Test
If running in a production server the -f
will not copy the war files to the instance directory because there are no war files in $CATALINA_HOME.
deploy command instead, war files will be copied to the instance directory properly.
3. Start the PASOE instance in order to have the oemanager directory properly created in \<workingdirectory>\<instancenamedirectory>\webapps
$ pasman pasoestart restart -I Test
4. Navigate to the PASOE new instance directory: \<workingdirectory>\<instancenamedirectory>\webapps\oemanager\WEB-INF
a. Edit the file oemgrSecurity-container.xml,
b. Uncomment the following line (around line 35):
<!-- Access to SwaggerUI. Disabled by default, user has to uncomment the below line to enable it -->
<intercept-url pattern="/doc/**" method="GET" access="hasAnyRole('ROLE_PSCAdmin','ROLE_PSCOper','ROLE_PSCUser')"/>
5. Navigate back to the working directory and then restart the PASOE instance to apply changes
$ pasman pasoestart -restart -I Test
6. Open a web browser and type:
- Ensure the URL has trailing backslash / at the end.
7. User and Password (tomcat/tomcat)
8. Swagger page should be loaded. If not, please verify the steps above and then stop and restart the PASOE instance, with the OpenEdge Explorer Console or tcman stop/start.
For more details about how to access/use Swagger UI please review the following information at Progress Hub
Progress Information Hub -> Manage Progress Application Server (PAS) for OpenEdge - > Monitor PAS for OpenEdge instances -> Use Swagger UI to explore management REST APIs -> Enable Swagger UI for management REST API access:https://docs.progress.com/bundle/pas-for-openedge-admin/page/Enable-Swagger-UI-for-management-REST-API-access.html