Skip to content

Conversation

@Zaidusyy
Copy link

Summary

Fixes #879. This update preserves the folder hierarchy when importing Postman v2.1 collections by including the folder path in the request name (e.g., Users/Auth/Login instead of just Login).

Problem

Previously, when a collection with nested folders was imported, all requests were placed at the root level. This removed context, made organization harder, and broke the structure users set up in Postman.

Solution

The logic in postman_utils.dart has been updated so that:

  • Folder paths are tracked recursively while iterating through items
  • Request names include the accumulated folder structure using /
  • Root-level requests continue to import normally with no breaking changes

Key Changes

  • Added an optional folderPath parameter to both parsing functions
  • Prepended paths for nested folder requests (e.g., Users/Create User)
  • Updated recursive traversal to build paths safely
  • Added new tests to confirm the hierarchy is preserved

Testing

# Run Postman package tests
cd packages/postman && dart test

# (Optional) Run full project tests
flutter test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing postman collection doesn't respect folder structure

1 participant