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 by choosing to output it in either the JSON or YAML format:
http://host:port/gas/ws/r/group/xcf/resource?openapi.json
Or
http://host:port/gas/ws/r/group/xcf/resource?openapi.yaml
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
- Responses, such as error handling specifications, error codes and messages
- Service information, such as title, version, contact, etc.
Generating the stub file
You can use the fglrestful tool provided by the Genero Web Services package to generate a stub file from the openapi.json file. The stub file is a Genero BDL file with code that will manage calls made by your client application to the Web service. For details, see the Get the RESTful Web service information page.
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