1.2 Local deployment of Swagger UI

This topic provides an overview of deploying Swagger UI on your local machine or server.

Local deployment of Swagger UI enables you to host and access the Swagger API documentation interface on your own machine or within your organization’s environment.

Follow the below steps to host the Swagger UI locally:

  1. Obtain the Oracle Banking Payments ZIP package that includes the plato-swagger-api folder.
    Swagger UI needs an HTTP Server to render itself. User run a standalone HTTP Server using Python.
  2. Assuming the Swagger UI is deployed on a Windows machine in the following path D:\OBVAM\swaggerUI, run the following cmd>cd D:\OBPM command to start a HTTP Server using Python.
    8888 is the port for the HTTP server to listen.
  3. Run the following command from the browser.
    • python -m SimpleHTTPServer 8888, if Python version is older than Python 3.
    • python -m http.server 8888, if Python version is Python 3.

    To use a port other than 8888, first ensure the new port is available for listening. Then, update all instances of 8888 in the commands above with the new port number. Make sure to also update the port number in the URL below accordingly.

    Note:

    SWAGGERUI is ROOT CONTEXT, and should not be in the above path when HTTP Server is started.
  4. Navigate to SwaggerUIIndex at http://localhost:8888/plato-swagger-api/index.html to access the Swagger UI.
    The Swagger UI screen appears.

    Figure 1-4 Swagger UI Home Screen_Swagger API Option



  5. Click the Swagger API option.
    The following screen is displayed.

    Figure 1-5 Swagger UI_Oracle Banking Payments



  6. On the screen, select Oracle Banking Payments and you will be redirected to the REST APIs page.

    Figure 1-6 Swagger UI_REST APIs



  7. Click the desired service in the left panel, then select the required YAML file or functionality in the right panel to access the corresponding API.
    A sample screenshot is shown below:

    Figure 1-7 Select the Required YAML



  8. Click the desired endpoint to expand and view its details.
    A sample screenshot is shown below:

    Figure 1-8 Click the Desired Endpoint