Add mapbox optimization submit/get/list - #51
Closed
mattpodwysocki wants to merge 1 commit into
Closed
mattpodwysocki wants to merge 1 commit into
mattpodwysocki wants to merge 1 commit into
Conversation
Sixth API this session, the first outside the naming doc's V1 scope
(marked Support in V1: false there) — continuing per the user's own call to
do all 8 anyway. Hand-authored into custom-openapi/ since openapi-specs has
no spec for this API either.
Solves a multi-vehicle, multi-stop routing problem as an asynchronous job:
submit (POST, 202 with a job id), get (poll by id — 202 while solving, 200
with the routes once done), list (every submitted job and its status).
submit's whole problem is one JSON document through --data, the same shape
styles create already uses — locations, vehicles, and one or both of
services/shipments, with no per-field flag for something this shape.
No profile path parameter here, so no new ARG_NAME_OVERRIDES row.
Smoke-tested against production end to end: submitted a real 3-stop
problem, polled it to a solved 4-stop route (start, two services in the
solver's chosen order, end) with real etas and a running odometer, and
confirmed list reports it as a bare JSON array of {id, status}.
488 tests, fmt and clippy clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
Closing as out of scope for V1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same stacking situation as the rest of this stack. Once #43/#44/#45/#48/#49
merge in order, this should be retargeted to `main` (`gh pr edit --base
main`).
What
`mapbox optimization submit`/`get`/`list` — the sixth API added this
session, and the first one outside the API-naming doc's V1 scope (marked
`Support in V1: false` there — proceeding anyway per the explicit call to
do all 8 candidates regardless). Hand-authored into `custom-openapi/`
since openapi-specs has no spec for this API either (v2; v1 is retired).
Solves a multi-vehicle, multi-stop routing problem as an asynchronous job:
(locations, vehicles, and one or both of services/shipments) as one JSON
document through `--data` — no per-field flag makes sense for something
this shape, the same call `styles create` already made.
solved routes once done.
to track ids itself.
No `profile` path parameter here, so no new `ARG_NAME_OVERRIDES` row —
unaffected by the collision the first four commands added this session hit.
Verification
Smoke-tested against production end to end, not just unit tests: submitted
a real 3-stop problem, polled it to a solved 4-stop route (start, two
services in the order the solver actually chose, end) with real ETAs and a
running odometer, and confirmed `list` reports it back as a bare JSON
array of `{id, status}`.
488 tests, `cargo fmt --check` and `cargo clippy --all-targets -- -D
warnings` both clean.
🤖 Generated with Claude Code