pksunkara / alpaca

Given a web API, Generate client libraries in node, php, python, ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve reporting of invalid API defition in JSON file

v9n opened this issue · comments

When something is wrong in doc.json

  • missing class def
  • missing param

I got some general error like:

template: php/readme.md:188:20: executing "php/readme.md" at <index $data.Doc $cla...>: error calling index: index of nil pointer

or

template: php/readme.md:170:6: executing "php/readme.md" at <index $data.Doc . "t...>: error calling index: index of nil pointer

Should we improve this error message? Like missing definition of class, or missing param def of method...

Yes, this definitely needs to be improved. If you look at the code, there's Check.... functions where the checking for missing things needs to go.