Viewing swagger file through PMF console


To enable swagger in the WebSphere® Application Server Liberty on the PMF console, proceed as follows.

  1. Stop the WebSphere Application Server Liberty.
  2. Copy the mfp-server-swagger-ui war from the PMF package to the following directory.

    <lib_dir>\wlp\usr\servers\<server-name>\apps

  3. Update the server.xml file located in the <lib_dir>\wlp\usr\servers\<server-name>\ directory.
  4. Add the following configuration after the </httpEndpoint> tag.

     <!-- Mobile Foundation Swagger properties start -->
     <application context-root="doc" id="swagger-ui" location="mfp-server-swagger-ui.war" name="swagger-ui" type="war"/>
     <jndiEntry jndiName="mfpadmin/mfp.server.swagger.ui.url" value="/doc/?url=/<context>/api/adapterdoc/<adapterName>"/>
     <!-- Mobile Foundation Swagger properties end -->
    
  5. Restart the server.
  6. To view the Swagger UI through the PMF console, proceed as follows.

    a. Navigate to the PMF Console - > Adapters.

    b. Click on the desired Adapter.

    c. Open the Resources tab.

    d. Click View Swagger to see the API documentation.

Last modified on