Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @apiParamExample breaks swagger.json generation #18

Open
folderol4 opened this issue Jun 30, 2016 · 1 comment
Open

Using @apiParamExample breaks swagger.json generation #18

folderol4 opened this issue Jun 30, 2016 · 1 comment

Comments

@folderol4
Copy link
Contributor

Example apidoc:

/**
 * @api {post} /stuff Create a new stuff
 * @apiName createStuff
 * @apiGroup createStuffGroup
 *
 * @apiSampleRequest http://localhost:17443/stuff
 *
 * @apiParamExample {json} Post-Example: set stuff
 *    {
 *       "name": "stuff"
 *    }
 *
 */

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)

@cxolast
Copy link

cxolast commented Jul 19, 2016

I have seem problem, but no crash. Params from @apiParamExample not isset in swagger.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants