postdown / Postdown

Generate markdown API document from Postman.
GNU General Public License v3.0
76 stars 26 forks source link

Error on Mac OSX #3

Closed pedrosimao closed 6 years ago

pedrosimao commented 6 years ago

I am running on Mac OSX environment and I am getting the following error:

Traceback (most recent call last):
  File "/usr/local/anaconda3/bin/postdown", line 11, in <module>
    sys.exit(execute())
  File "/usr/local/anaconda3/lib/python3.6/site-packages/postdown/cmdline.py", line 14, in execute
    parse(in_file, out_file)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/postdown/parser.py", line 28, in parse
    request = api['request']
KeyError: 'request'
TitorX commented 6 years ago

image

It's only support Collection v2

You should check if your json file is right version.

or, paste your json file down there. I will fix it.

pedrosimao commented 6 years ago

Hey, I am pretty sure it is version 2. Here is a link to the file: https://drive.google.com/open?id=1CvCbWW1FnmlTBJ_P2kKcKPivs7c8W180

Thanks for your help!

TitorX commented 6 years ago

I figured out what happened.

image

You created a subdirectory in collection. This error was caused by subdirectory.

I didn't write this feature into README, actually, it only support the collection which directly put apis down the collection.

I mean, like this image

No subdirectory.

I already tested your json file in OSX. Successful.

m-ivanov commented 3 years ago

please add to Readme that this script do not support folders. Thanks