diff --git a/lib/apidocToSwagger.js b/lib/apidocToSwagger.js index fbff12c..0e2ef4e 100644 --- a/lib/apidocToSwagger.js +++ b/lib/apidocToSwagger.js @@ -316,14 +316,14 @@ function createPathParameters(verbs) { } if (verbs.parameter && verbs.parameter.fields.Path) { - for (var y = 0; i < verbs.parameter.fields.Path.length; y++) { - var path = verbs.parameter.fields.Path[i]; + for (var y = 0; y < verbs.parameter.fields.Path.length; y++) { + var path = verbs.parameter.fields.Path[y]; pathItemObject.push({ name: path.field, in: path.type === 'file' ? 'formData' : 'path', required: !path.optional, type: path.type.toLowerCase(), - description: removeTags(param.description) + description: removeTags(path.description) }); } diff --git a/package.json b/package.json index b12d3c1..4c812cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steplix-apidoc-swagger", - "version": "0.4.3", + "version": "0.4.4", "description": "Convert api doc json to swagger json, including aws api-gateway attributes", "author": "Bahman Fakhr Sabahi", "license": "MIT",