apidoc and swagger are two nice projects which are focusing on documentation of APIs. This project is a middle tier which tries to bring them together in a sense that it uses apidoc to convert inline documentation to json schema and later convert it to swagger json schmea.
Other
252
stars
129
forks
source link
Using @apiParamExample breaks swagger.json generation #18
Causes this issue:
error: Cannot read property 'Parameter' of undefined
debug: TypeError: Cannot read property 'Parameter' of undefined
at createPathParameters (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:275:45)
at createPostPushPutOutput (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:76:19)
at extractPaths (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:62:19)
at Object.toSwagger (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:13:18)
at Object.createApidocSwagger (/stuff/node_modules/apidoc-swagger/lib/index.js:107:63)
at Object. (/stuff/node_modules/apidoc-swagger/bin/apidocSwagger.js:143:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
Example apidoc:
Causes this issue: error: Cannot read property 'Parameter' of undefined debug: TypeError: Cannot read property 'Parameter' of undefined at createPathParameters (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:275:45) at createPostPushPutOutput (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:76:19) at extractPaths (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:62:19) at Object.toSwagger (/stuff/node_modules/apidoc-swagger/lib/apidocToSwagger.js:13:18) at Object.createApidocSwagger (/stuff/node_modules/apidoc-swagger/lib/index.js:107:63) at Object. (/stuff/node_modules/apidoc-swagger/bin/apidocSwagger.js:143:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)