WSTypeDescription
Describes a user-defined type.
Syntax
WSTypeDescription=" description "
Where:
- description provides a description of the user-defined type it is applied to.
WSTypeDescription
is an optional attribute.
Usage
You use this attribute to provide useful description for any user-defined type declared at the module level of the high-level REST web service.
Information you specify with this attribute, is generated in
the OpenAPI documentation file. You can control generation of descriptions in the stub file with the
--comment
option of the fglrestful tool.
Example using WSTypeDescription in a type definition
In this example, the
WSTypeDescription
attribute describes the
profileType
record.
PUBLIC TYPE profileType RECORD ATTRIBUTE(WSTypeDescription = "profile of user")
id INTEGER ATTRIBUTES (WSDescription="Internal Identifier"),
name VARCHAR(100) ATTRIBUTES (WSDescription="Lastname"),
email VARCHAR(255),
category VARCHAR(10) ATTRIBUTES (WSDescription="User Demographic"),
status INTEGER,
ccode VARCHAR(3) ATTRIBUTES (WSDescription="Country Code")
# ...
END RECORD
In the OpenAPI documentation, the profileType
will be referenced in the
#/components/schema
section. The GWS engine exposes the description property in the
schema
of the JSON object.
The output shown is from the Firefox® browser, which converts JSON to human readable format.
The output may vary depending on your browser.