getAllParameters(asyncapiDocument) {
    const parameters = new Map();
    if (usesNewAPI(this.templateConfig)) {
      asyncapiDocument.channels().all().forEach(channel => {
        channel.parameters().all().forEach(parameter => {
          parameters.set(parameter.id(), parameter);
        });
      });

      asyncapiDocument.components().channelParameters().all().forEach(parameter => {
        parameters.set(parameter.id(), parameter);
      });
    } else {
      if (asyncapiDocument.hasChannels()) {
        asyncapiDocument.channelNames().forEach(channelName => {
          const channel = asyncapiDocument.channel(channelName);
          for (const [key, value] of Object.entries(channel.parameters())) {
            parameters.set(key, value);
          }
        });
      }

      if (asyncapiDocument.hasComponents()) {
        for (const [key, value] of Object.entries(asyncapiDocument.components().parameters())) {
          parameters.set(key, value);
        }
      }
    }

    return parameters;
  }
Returns all the parameters on the AsyncAPI document.

@private
@param  {AsyncAPIDocument} asyncapiDocument AsyncAPI document to use as the source.