async parseInput(asyncapiDocument, parseOptions = {}) {
    const isAlreadyParsedDocument = isAsyncAPIDocument(asyncapiDocument);
    // use the expected document API based on `templateConfig.apiVersion` value
    if (isAlreadyParsedDocument) {
      this.asyncapi = getProperApiDocument(asyncapiDocument, this.templateConfig);
    } else {
      /** @type {AsyncAPIDocument} Parsed AsyncAPI schema. See {@link https://github.com/asyncapi/parser-js/blob/master/API.md#module_@asyncapi/parser+AsyncAPIDocument|AsyncAPIDocument} for details on object structure. */
      const { document, diagnostics } = await parse(asyncapiDocument, parseOptions, this);
      if (!document) {
        const err = new Error('Input is not a correct AsyncAPI document so it cannot be processed.');
        err.diagnostics = diagnostics;
        for (const diag of diagnostics) {
          console.error(
            `Diagnostic err: ${diag['message']} in path ${JSON.stringify(diag['path'])} starting `+
            `L${diag['range']['start']['line'] + 1} C${diag['range']['start']['character']}, ending `+
            `L${diag['range']['end']['line'] + 1} C${diag['range']['end']['character']}`
          );
        }
        throw err;
      } else {
        this.asyncapi = document;
      }
    }
  }
Parse the generator input based on the template `templateConfig.apiVersion` value.