-
Notifications
You must be signed in to change notification settings - Fork 436
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
Import requests document from postman collection. #671
base: master
Are you sure you want to change the base?
Conversation
Accept PostmanCollection in import parameter
In this commit I changed the way of creating requests to set request-specific parameters as rest client variables with request specific names. In this way I prevent from duplications and ensure that there will be no variables missing. Additionaly if postman had some query string variables set - I add those in HTTP url.
This pull request introduces 1 alert when merging ed46bea into 2606ed6 - view on LGTM.com new alerts:
|
Refactor import controller to be easier to catch up. Create IAmImporter interface that will be contract for each importer. Move resolving file content to each specific importer implementation.
Refactored the code to be easier to read and only authorization settings parser left. |
Refactoring make the importing less error-prone. I wanted to achieve the situation where really simple and on the first side uncompleted collection would be parsed anyway in the state it is. I saw also that collections in many situations are throwing when some data aren't filled. Additional thing was importer utilities - it wasn't really helpful and it didn't solve the multi-line comments in a good way. I decided to change it to contains prefix for all the lines.
This pull request introduces 2 alerts when merging 96c05ac into 9f5412e - view on LGTM.com new alerts:
|
Implement authorization parser. Remove redundant marks after return statement.
Update:
|
Did you ever manage to complete this feature @rafek1241 ? |
@ArmindoMaurits |
As in the topic, I've created implementation to automatically import postman collection to the vscode by creating virtual document with HTTP requests within it exactly in a postman format.
Currently unsupported:
I wanted to share it with you early so you can give me your feedback.
I want to restructure this code soon. I want to create a resolver class that will be the factory for the option-specific importers.
Next steps:
etc.
Anyway - if we make good work there then we can receive really nice way to import many things using the good stuff that postmanlabs team delivers. The license is an apache 2.0 so I don't know if that is a problem or not..
Demo: