Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lukasz Gornicki <[email protected]>
  • Loading branch information
jonaslagoni and derberg authored Sep 14, 2023
1 parent 7037151 commit 1ca6188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parser.parse = (asyncapi, oldOptions, generator) => {
};

/**
* If the template expect one of the new parser API versions, it must be above 0
* If the template expect one of the Parser-API versions, it must be above 0
*/
parser.usesNewAPI = (templateConfig = {}) => {
return Number(this.sanitizeTemplateApiVersion(templateConfig.apiVersion)) > 0;
Expand All @@ -38,7 +38,7 @@ parser.usesNewAPI = (templateConfig = {}) => {
parser.getProperApiDocument = (asyncapiDocument, templateConfig = {}) => {
const apiVersion = this.sanitizeTemplateApiVersion(templateConfig.apiVersion);
if (apiVersion === undefined) {
// Convert to old version
// Convert to old API from JS Parser v1
return convertToOldAPI(asyncapiDocument);
}
return ConvertDocumentParserAPIVersion(asyncapiDocument, apiVersion);
Expand Down

0 comments on commit 1ca6188

Please sign in to comment.