Many of the execute and management REST API methods in a Corticon Server WAR file can be exposed in Swagger,
the popular OpenAPI Specification tool for describing, producing, consuming, and
visualizing REST Web services. Swagger is built-in to every Corticon Server WAR file.
You can use Swagger through BASIC authentication and HTTPS
connections.
Note: Get more information about
Swagger at swagger.io
Enabling Swagger
To enable Swagger on a Server installation:
Confirm that the installation has
<Corticon_Home>/Server/lib/CcSwagger.jar.
Note: If the
installation does not have the Swagger JAR, such as when you use Docker, go to
the Progress download site, and then navigate to
PROGRESS_CORTICON_xx_SERVER.zip >
PROGRESS_CORTICON_xx_WAR_CONTAINER.zip > Swagger >
CcSwagger.jar.
Copy CcSwagger.jar, and then paste it into
<Tomcat>/webapps/axis/WEB-INF/lib. That effectively adds
the JAR to the server classpath.
Edit <Tomcat>/webapps/axis/WEB-INF/web.xml to change the parameter
value for enabling Swagger to true:
to change the swagger.api.basepath parameter value
to:
<param-value>/Java_UAT/corticon</param-value>
and then save the file.
Restart the server.
Disabling Swagger on a Server
To disable Swagger on a Server, edit its web.xml file to add comment markers as shown:
<servlet>
<servlet-name>Corticon REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.corticon.eclipse.rest.CorticonRestApplication</param-value>
</init-param>
<!-- Swagger documentation for the REST APIs -->
<!-- disable Swagger
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>io.swagger.jaxrs.json;com.corticon.eclipse.rest;
io.swagger.jaxrs.listing</param-value>
</init-param>
-->
<!-- End of Swagger documentation for the REST APIs -->
and
<!-- Swagger Rest API documentation -->
<!-- disable Swagger
<servlet>
<servlet-name>DefaultJaxrsConfig</servlet-name>
<servlet-class>io.swagger.jaxrs.config.DefaultJaxrsConfig</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>1.1.8</param-value>
</init-param>
<!-- Change this if you deployed you server in a different location -->
<init-param>
<param-name>swagger.api.basepath</param-name>
<param-value>/axis/corticon</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
-->
When you restart the server, access to Swagger on the Server is
disabled. Clear the comment delimiters to again enable Swagger on the server.