Generate service description on demand (OpenAPI)

Access a description of a RESTful web service through a query string on the URL of the web service.

OpenAPI provides a standardized model for defining operations in RESTful web services. For a web service that supports OpenAPI, you can output the description from the URL of the web service in a browser in either JSON or YAML.

In the examples in this task, the web service is running on the Genero Application Server. The GWS service must be running in order to provide the output.

  1. Get the OpenAPI service description for a web service.
    • To generate the OpenAPI description in JSON, add the "?openapi.json" query string to the URI:

      http://myServer:myPort/gas/ws/r/myXcf/myService?openapi.json

    • To generate the OpenAPI description in YAML, add the "?openapi.yaml" query string to the URI:

      http://myServer:myPort/gas/ws/r/myXcf/myService?openapi.yaml
      Warning:

      The feature for generating the OpenAPI documentation in YAML format is experimental and may change.

  2. Get the OpenAPI service description for a version of the web service.

    To generate the OpenAPI documentation in JSON for a specific version of operations, add the "&version=version_name" query string to the URI:

    http://myServer:myPort/gas/ws/r/myXcf/myService?openapi.json&version=v3

The OpenAPI service description provides information about the operations defined in a web service. For an understanding of the description, go to Generate service description on demand.