karthiks3000 / postman-doc-gen

Generate API documentation from a postman collection
MIT License
254 stars 45 forks source link

How do I get this tool to work under Linux/Deb9 #20

Closed gromran closed 2 years ago

gromran commented 2 years ago

get this error:

python3 postman_doc_gen.py "/home/postman/API.collection.json" -e "/home/postman/v5.environment.json" -o >/tmp/docuhtml/ File "postman_doc_gen.py", line 14 version=f"{parser.prog} Version 1.2.0" ^ SyntaxError: invalid syntax

same with python(2).

I don't have much to do with python and have tried the install steps, but I also get a lot of errors in the requirements.txt

the executable does'nt work too:

-bash: ./postman_doc_gen: Unable to execute the binary: Error in the format of the program file

The Win exe works but that doesn't help me because our Jenkins runs on Linux.

karthiks3000 commented 2 years ago

Try running the command by passing in the location without quotes.

postman_doc_gen /home/postman/API.collection.json -e /home/postman/v5.environment.json -o /tmp/docuhtml/

if that doesn't work, it may have something to do with the collection itself. I tried the latest version on my macos and it worked for me (using a new postman v2 export).

gromran commented 2 years ago

I got it to work after I fiddled around with the Python versions for a long time yesterday.