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:
- Define a
PUBLIC
record with aWSInfo
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 ...
- 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. - Add values for the record fields.