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

Command line utility for requests and serialization #451

Closed
1ec5 opened this issue Aug 28, 2020 · 2 comments · Fixed by #469
Closed

Command line utility for requests and serialization #451

1ec5 opened this issue Aug 28, 2020 · 2 comments · Fixed by #469
Assignees
Labels
command line tool improvement Improvement for an existing feature.

Comments

@1ec5
Copy link
Contributor

1ec5 commented Aug 28, 2020

In addition to the existing Example application that runs on iOS, this project should have an example command line tool target that runs on macOS and Linux.

At a minimum, the command line tool would be able to round-trip an arbitrary, JSON-formatted Directions or Map Matching API response through model objects and back to JSON. RouteOptions or MatchOptions properties would need to be specified as command line options and flags, since those properties aren’t part of the API response format. This functionality would enable us to more easily test integration with the API in a headless environment to catch issues like #447. With this functionality in place, it would be trivial to also add the ability to fetch a route from the API and return it as JSON or print out statistics about the route, which could make the tool useful for other mobile QA purposes.

The command line tool in MapboxSpeech can serve as a model to follow. It uses SwiftCLI. To run on Linux, the new target would need to be compatible with SPM. ArgumentParser is another great option, but it only works with SPM, whereas this project is still designed to use either SPM or Carthage internally.

/cc @mapbox/navigation-ios @danpaz

@Udumft
Copy link
Contributor

Udumft commented Oct 27, 2020

Implementation tracking in /mapbox-directions-swift/pull/469

@1ec5 1ec5 linked a pull request Oct 27, 2020 that will close this issue
This was referenced Oct 27, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Nov 3, 2020

To run on Linux, the new target would need to be compatible with SPM.

Tracking Linux support in #484.

@1ec5 1ec5 added this to the v1.2.0 milestone Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command line tool improvement Improvement for an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants