Giter VIP home page Giter VIP logo

docs-from-postman's Introduction

docs-from-POSTMAN

Python script which generates docs from POSTMAN collection url

How to run?

  1. Create a folder doc and place it where you likes (mostly inside the project's root folder). And also place docs.py file inside the doc folder.
  2. From inside the doc folder, run the below command. It automatically create doc files for you :-)
python docs.py postman_collection_url

Example:

  1. Clone this repository.
  2. Move to the cloned directory from terminal.
  3. Run the below command, it would generate 4 doc files. :-)
python docs.py https://www.getpostman.com/collections/9b3bf6b5d5ff087bdb1d

Screenshot:

Generated doc

docs-from-postman's People

Contributors

avinash-raj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docs-from-postman's Issues

Basic issues

I had a few issues.

  1. Is this library still maintained?

  2. There's no mention of which Python version you are using and what modules are needed to run this code. For example, I found it was written in Python2, not Python3. Also, I needed to install requests to run this code.

Error at running the code

The command is showing errors. I'm attaching the error report log from terminal here.

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/urllib3/util/ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
Traceback (most recent call last):
  File "docs.py", line 226, in <module>
    main()
  File "docs.py", line 148, in main
    r = requests.get(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.getpostman.com', port=443): Max retries exceeded with url: /collections/7c0541fecf2e4570253a (Caused by SSLError(SSLError(1, '_ssl.c:503: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),))

AttributeError: 'NoneType' object has no attribute 'group'

I'm getting following error

Traceback (most recent call last):
  File "docs.py", line 226, in <module>
    main()
  File "docs.py", line 174, in main
    base_api_path = re.search(r'^([^,]+)[^,]*(?:,\1[^,]*)*$', ','.join(urls)).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.