Skip to content

Add postman import spec - #106

Merged
darrenburns merged 17 commits into
darrenburns:mainfrom
ll931217:postman-import
Apr 19, 2025
Merged

Add postman import spec#106
darrenburns merged 17 commits into
darrenburns:mainfrom
ll931217:postman-import

Conversation

@ll931217

@ll931217 ll931217 commented Sep 14, 2024

Copy link
Copy Markdown
Contributor

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 import -t postman postman.collection.json
posting import -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

image

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
Copy Markdown
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.

Comment thread src/posting/__main__.py Outdated
Comment thread src/posting/importing/postman.py Outdated
@darrenburns

darrenburns commented Oct 11, 2024

Copy link
Copy Markdown
Owner

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
Copy Markdown
Contributor 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

@github-carlos

Copy link
Copy Markdown

Hello, guys. Any predictions for closing this pull request? This is a very good feature for switching easily to posting :D

@ll931217

Copy link
Copy Markdown
Contributor Author

Hello, guys. Any predictions for closing this pull request? This is a very good feature for switching easily to posting :D

Ah, sorry about the delay, was working 2 jobs and recently my main job wasn't doing well financially so I resigned and busy doing interview preparations again as well as doing my side job. Will probably be able to fix this up when I have free time, probably in a month.

It is only missing a test, so if someone can help add it in, would be appreciated.

@ll931217

Copy link
Copy Markdown
Contributor Author

@darrenburns Hey Darren, I fixed up the test and also fixed up the import spec function some more with the latest changes. Let me know what you think, thanks and sorry for the delay

chore: Fix format

chore(doc): Remove Importing from Postman section in README
@darrenburns

Copy link
Copy Markdown
Owner

Thanks for this. I'll try to review it tomorrow.

@darrenburns

Copy link
Copy Markdown
Owner

Sorry for the delay - I fixed up a few issues I found in this PR (the collection was being saved twice in 2 different locations, as was the README). Should be able to merge and release this soon (likely this week).

@darrenburns
darrenburns merged commit 19a4b73 into darrenburns:main Apr 19, 2025
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.

3 participants