Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 749 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 749 Bytes

Why

See the following discussions in the Postman project:

What to sort

  1. For Environments
    • Variables
  2. For Collections
    • Variables
    • Folders (can be nested)
    • Requests
    • Requests' Params
    • Requests' Examples (including example's Params)

How to use

  1. In Postman, export a Collection or Environment to a JSON file (e.g. unsorted.json) in v2.1 format.

  2. Run

    python3 pm-sort.py unsorted.json > sorted.json
    # or
    python3 pm-sort.py < unsorted.json > sorted.json
    
  3. In Postman, import sorted.json. (To be safe, choose Import as Copy when prompted.)