karthiks3000 / postman-doc-gen

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

Unable to generate the documentation for the imgur collection #12

Closed catalinzanfir-am closed 1 year ago

catalinzanfir-am commented 3 years ago

Hello, I have wanted to see how the fully documented api documentation for the Imgur app is displayed, but i had errors in the generation process.

  File "postman_doc_gen/postman_doc_gen.py", line 29, in <module>
    output_dir = d.generate_doc(args.collection, args.env, args.out, args.download)

  File "/tmp/postman-doc-gen/postman_doc_gen/document_generator.py", line 39, in generate_doc
    json_collection = self.validate_collection(collection_file_name)

  File "/tmp/postman-doc-gen/postman_doc_gen/document_generator.py", line 125, in validate_collection
    validate(json_schema, json_collection)

  File "/venv/lib/python3.7/site-packages/fastjsonschema/__init__.py", line 105, in validate
    return compile(definition, handlers, formats)(data)

  File "<string>", line 37, in validate_https___schema_getpostman_com_json_collection_v2_1_0
fastjsonschema.exceptions.JsonSchemaException: data.item[3] must be valid exactly by one of oneOf definition

The collection link is here: https://apidocs.imgur.com/

Steps to reproduce:

  1. goto https://apidocs.imgur.com/
  2. click on the upper right button ' run in postman '
  3. export the collection as Collection v2.1 (recommended)
  4. use the postman-doc-gen tool with the exported collection.
karthiks3000 commented 3 years ago

Looks like the json schema validation failed. have you tried with an older collection version?