Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postman import spec #106

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

ll931217
Copy link

@ll931217 ll931217 commented Sep 14, 2024

This PR focuses on having the Postman Collection import functionality. The following is how one can use this functionality:

Flags

Flag Values Description
-t/--type openapi, postman Pick which API spec to import
-o/--output Select the directory to output the generated posting requests and variables. If this isn't supplied then the directories and request files will be created where the spec_file is located.

Usage:

posting -t postman postman.collection.json
posting -t postman -o requests postman.collection.json

I wrote a test for it but I am not sure how to include it in the test workflow, the test passes when I run

uv run pytest -d tests/test_postman_import.py

NOTE: I have tested it with Postman API Collection and my company's postman collection, seems to all work.

@ll931217 ll931217 marked this pull request as draft September 14, 2024 07:57
@ll931217 ll931217 marked this pull request as ready for review September 14, 2024 11:21
@ll931217 ll931217 marked this pull request as draft September 14, 2024 11:23
@ll931217 ll931217 marked this pull request as ready for review September 14, 2024 11:34
@darrenburns
Copy link
Owner

Thanks for this very important feature! I'm on a break at the moment but will try to take this for a spin within the next couple of weeks.

fix: Update test

fix: Remove full file path
@darrenburns
Copy link
Owner

darrenburns commented Oct 11, 2024

Pushed a fix for a crash I got when I downloaded a sample Postman collection - PostmanCollection.info and PostmanCollection.variable were optional.

Also from testing it seems like the directory structure is not being respected?

@ll931217
Copy link
Author

Pushed a fix for a crash I got when I downloaded a sample Postman collection - PostmanCollection.info and PostmanCollection.variable were optional.

Also from testing it seems like the directory structure is not being respected?

Sorry been quite busy lately, will work on this when I get time

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.

2 participants