Provide service information

Provide information about the service, such as title, version, contact details, etc., that is generated in the OpenAPI documentation.

In your service module:

  1. Define a PUBLIC record with a WSInfo attribute as the service information record.

    If you do not set a service information record, the name of the service module is used for the service title.

    The service information record allows you to provide metadata about your REST service, which can be generated in the openapi.json documentation according to the OpenAPI standard and used by clients. This example record follows that OpenAPI specification:
    # Web service server module
    
    PUBLIC DEFINE serviceInfo
       RECORD ATTRIBUTES(WSInfo, WSScope = "myusers",
                        WSVersion = "myv2", WSVersionMode = "uri")
          title STRING,
          description STRING,
          termOfService STRING,
          contact RECORD
            name STRING,
            url STRING,
            email STRING
          END RECORD,
          version STRING
       END RECORD = ( title: "my service", version: "1.0",
                      contact: ( email:"helpdesk@mysite.com" ) )
    
    # ... service functions ...
  2. Add record fields as required. The GWS does not check the record structure used with WSInfo attribute. You are therefore allowed to add the fields you want to be available in the OpenAPI documentation.
  3. Add values for the record fields.