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

Adding CLI support for Postman import #1008

Closed
Celeo opened this issue Dec 26, 2019 · 6 comments
Closed

Adding CLI support for Postman import #1008

Celeo opened this issue Dec 26, 2019 · 6 comments
Assignees
Milestone

Comments

@Celeo
Copy link
Contributor

Celeo commented Dec 26, 2019

Following up with #1004, this is a ticket for https://github.com/intuit/karate/projects/3#card-22529475: adding Postman import to Karate.

Like @ptrthomas mentioned, adding a CLI flag to switch on the behavior is simple. Where, though, should the (very little) logic for this functionality live? Inside com.intuit.karate.cli.Main, or should another CLI "utility" class?

@ptrthomas
Copy link
Member

@Celeo thanks for asking

feel free to ask more questions

@ptrthomas ptrthomas added this to the 0.9.5 milestone Dec 27, 2019
@Celeo
Copy link
Contributor Author

Celeo commented Dec 27, 2019

Great, thanks for the info.

I had come across the second CLI in the karate-netty package when searching for the main method, but figured I'd stick to the one you linked in #1004 unless otherwise noted.

@ptrthomas
Copy link
Member

@Celeo yes I had missed it, it struck me later that a postman import is one of those things that makes more sense for the fat-jar, since anyone who is working with the maven jar would have been doing it via code like you were. so I would actually prioritize the karate-netty CLI.

but the reason I think it makes sense in both places is because the VS Code plugin is really catching on and the debug CLI -d is an example where it is useful for both Maven / Gradle and fat-jar users.

@babusekaran
Copy link
Contributor

@ptrthomas , @Celeo just wanted to understand the proposal here for postman import via CLI.

is it going to be an import flag for existing CLI like,

java -jar karate.jar -i file_name.postman_collection ?

or a subcommand that can support different imports from CLI

java -jar karate.jar import -p file_name.postman_collection ?

@ptrthomas
Copy link
Member

@babusekaran good question, to be honest I have not explored picocli subcommands yet. I leave it to @Celeo - either one is fine for me. IMO the file extension should be a good enough indicator of the type of import - in case we support more than postman in the future

@Celeo Celeo mentioned this issue Dec 30, 2019
5 tasks
@Celeo
Copy link
Contributor Author

Celeo commented Dec 31, 2019

Went with -i/--import <path> in #1011.

@Celeo Celeo closed this as completed Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants