In order to create the Server object instead of passing a string to the constructor, the list of the most common protocols could be provided to reduce errors and to normalize the casing.
The list is provided in the specs: REQUIRED. The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, jms, kafka, kafka-secure, mqtt, secure-mqtt, stomp, stomps, ws, wss. (https://www.asyncapi.com/docs/specifications/2.0.0#serversObject).
In order to create the Server object instead of passing a string to the constructor, the list of the most common protocols could be provided to reduce errors and to normalize the casing.
The list is provided in the specs:
REQUIRED. The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, jms, kafka, kafka-secure, mqtt, secure-mqtt, stomp, stomps, ws, wss.
(https://www.asyncapi.com/docs/specifications/2.0.0#serversObject).It is not a limited list.