swagger-to-PDF
swagger-to-PDF copied to clipboard
TypeError: Cannot read property 'properties' of undefined
I receive an error "TypeError: Cannot read property 'properties' of undefined" steps:
- downloaded the swagger json file from my app
- npm install phantomjs-pdf
- I've ran "node index.js swagger.json" command
any suggestion?
Hi Bertuccig,
That error looks like it is coming from the "renderDefinition" function. Line 744 then it tries to access properties of the swagger definition on line 760. I would recommend adding a console.log in that function to see if there's an issue with the parameters being passed in.
Bertuccig,
I've run this against a sample file from Swagger.io and all seems to be OK. Can you double check the Swagger file is valid? Are you running this on Windows?