Description: If a Postman collection is exported, and has an empty response body in an example, this application will fail when attempting to generate documentation.
The error logs:
Traceback (most recent call last):
File "postman_doc_gen\postman_doc_gen.py", line 27, in
File "postman_doc_gen\document_generator.py", line 49, in generate_doc
File "postman_doc_gen\document_generator.py", line 182, in add_items
File "postman_doc_gen\document_generator.py", line 219, in add_apis
File "postman_doc_gen\document_generator.py", line 252, in get_examples
TypeError: must be str, not NoneType
[17716] Failed to execute script postman_doc_gen
Build: 1.0.2
Description: If a Postman collection is exported, and has an empty response body in an example, this application will fail when attempting to generate documentation.
The error logs: Traceback (most recent call last): File "postman_doc_gen\postman_doc_gen.py", line 27, in
File "postman_doc_gen\document_generator.py", line 49, in generate_doc
File "postman_doc_gen\document_generator.py", line 182, in add_items
File "postman_doc_gen\document_generator.py", line 219, in add_apis
File "postman_doc_gen\document_generator.py", line 252, in get_examples
TypeError: must be str, not NoneType
[17716] Failed to execute script postman_doc_gen
Example collection which causes failure:
{ "info": { "_postman_id": "8cc8adb1-0da4-48ca-99e1-f7e69b4e3f86", "name": "Example", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Example", "request": { "method": "GET", "header": [], "url": { "raw": "http://example.com", "protocol": "http", "host": [ "example", "com" ] } }, "response": [ { "name": "Example", "originalRequest": { "method": "GET", "header": [], "url": { "raw": "http://example.com", "protocol": "http", "host": [ "example", "com" ] } }, "code": 404, "_postman_previewlanguage": null, "header": null, "cookie": [], "body": null } ] } ], "protocolProfileBehavior": {} }