Generate service description on demand

You can access a description of your GWS REST Web service through a query string on the URL of the Web service.

The Genero REST Web service allows for the functions defined in your Web service to be generated according to the OpenAPI specification. You can choose to access the description of, for example, MyService on a Web server by choosing to output it in either the JSON or YAML format:




Note: The MyService GWS service must be running on the specified port in order to provide the Web service information. The GWS server must be behind a GAS in production to handle the load.

The OpenAPI file allows you to see your entire Web service, including:

  • Available resources (paths) and functions, for example, /add, /sub/{f}, /mult/{coef}/hello), etc., and operations (GET, POST, etc.)
  • Parameters, input and output for each function
    Figure: Parameters represented in the OpenAPI specification file

  • Responses, such as error handling specifications, error codes and messages
    Figure: Response codes represented in the OpenAPI specification file

  • Service information, such as title, version, contact, etc.
    Figure: Sample of service information in OpenAPI specification file

Testing the GWS service in stand-alone mode

If you are on a local server, you can start the GWS server as shown in Getting started with REST high-level