Closed Jabher closed 6 years ago
Hi @Jabher ! Thanks for reporting. This will be fixed in next version 3.0.27.
Hi I have this in my RAML file creating in Design Center body: application/json: type: array
Api Console gives this error.
api-console-vendor.min.js:77 TypeError: Cannot read property 'type' of undefined
at extractArrayType (api-console.min.js:3)
at Object.
Hi @mannuiitd! Are you using the latest version?
What happens
Some RAML 1.0 files causes console to not load and crashes with following error in devtools. Error description, reasons, fix are provided below; I can implement a PR if this fix correct from RAML spec position, and is sane and sound.
Stages to reproduce
Load RAML doc of that kind in console:
Error
This happens due to this line: https://github.com/mulesoft/api-console/blob/c15b4b11154335af7ae02270dd984020b6a2d3de/src/app/factories/raml-expander.js#L46
which is executed if
arrayNode.type === 'array'
However, arrayNode do not containitems
, this line will cause the crash.Fix
This can be easily fixed with line quoted above to be changed in the following way: