Function makeWsApi

If name is omitted, it will be generated as:

`WS ${api.routeType} ${api.url}`