Version an operation with multiple versions
If an operation is valid in one or more versions, you can set this in the WSVersion attribute.
In the example, the function "prices_v1v2" is versioned for two versions, "v1" and "v2".
Multiple versions
PUBLIC FUNCTION prices_v1v2(nb INTEGER ATTRIBUTE(WSParam))
 ATTRIBUTES (WSGet,WSPath="/prices/{nb}",WSVersion="v1,v2")
 RETURNS (INTEGER)
   DEFINE price INTEGER
   # function code ...
  RETURN price
END FUNCTION
The GWS will select this operation when you generate the OpenAPI documentation for either version "v1" or "v2": 
- http://myhost:6394/gas/ws/r/myGroup/myXcf/myService?openapi.json&version=v1
 - http://myhost:6394/gas/ws/r/myGroup/myXcf/myService?openapi.json&version=v2