Default version of the OpenAPI document
Set a default set of operations to display in the OpenAPI documentation.
A Web service information record may contain a WSVersion (module) attribute set to a specific version of operations of the Web service that are displayed in the OpenAPI document.
OpenAPI
Setting a default version is optional but if not specified, and you do not request a version in
the query string of the URI to generate the OpenAPI documentation, the client will get a 404
(Not found)
error response and internally the server will throw error
41.
- operations whose version name matches the version name set in the
WSVersion
of REST functions.Tip:First version
It is possible to use a version name which is not used in any operation. This new version will only display operations without
WSVersion
or withWSVersion="default"
. This option is useful if you want to use versioning in the first release of your Web service (for example,WSVersion="v1"
), where, in fact, no operation has been versioned. It will introduce clients to the concept of version control in your Web service. - operations with a default version. These are operations which are general to all versions as
they either do not have a
WSVersion
set in the function or are set withWSVersion=default
.
Default OpenAPI version
WSVersion
is set to "v3". This defines version v3 as the default
version of operations displayed in the OpenAPI documentation of the Web service.When using WSVersion
at the module level, be aware that it can only
contain one value, and the value must not be called "default". Setting more than
one version or setting WSVersion ="default"
is only allowed with
WSVersion(Function)
, but causes compilation error-9140 to be
thrown when detected at the module level.
PUBLIC DEFINE myInfo RECORD ATTRIBUTES(WSInfo, WSVersion = "v3")
title STRING
# ...
END RECORD