Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ that may never merge. They are not releases and are not listed here.

## Unreleased

- `mapbox directions`, routes between 2-25 waypoints for driving (with
or without live traffic), walking, or cycling. No subcommand: this API
has one operation, so — like `mapbox usage` — there's nothing a second
word would disambiguate; see `spec::FLATTENED_SERVICES`. Hand-authored
into `custom-openapi/` rather than waiting on an upstream spec — the whole
Navigation API category had no CLI coverage before this; excludes the
~30 electric-vehicle-routing parameters (`engine=electric` and everything
under it), which describe one vehicle's charge/discharge curve down to
the watt and are a poor fit for a hand-typed CLI flag — left for a
follow-up.

The routing profile (`mapbox/driving` etc.) is a free-form value, not a
fixed set of four: an early version rejected anything else client-side,
which would have broken this command for exactly the accounts that most
need it, since some (OEM agreements, mainly) have additional profiles of
their own never published to docs.mapbox.com. Reported in review before
this shipped anywhere. Two path-parameter bugs surfaced while wiring the
original four up and are fixed for every command, not just this one: a
spec parameter literally named `profile` (the routing profile) silently
collided with the global `--profile` credentials flag, since clap has one
namespace of ids per command and a positional of the same name replaced it
outright; and a path parameter whose every legitimate value contains a
literal `/` (`mapbox/driving`) was being percent-encoded to `%2F` by the
same escaping that stops a free-text value from smuggling in extra path
segments — safe to skip for a parameter named in a small table
(`UNESCAPED_PATH_PARAMS`) as one whose values are trusted to carry that
character on purpose.

- `MAPBOX_CLI_EXTRA_QUERY` appends raw query parameters to every request, in
the same `k1=v1&k2=v2` shape as a URL's own query string — for an API
parameter this CLI's specs don't declare a flag for.
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,18 @@ Each API is a top-level subcommand, one sub-subcommand per operation:
mapbox accounts *
mapbox fonts *
mapbox geocoder *
mapbox rasterarrays *
mapbox search *
mapbox sprites *
mapbox static-images *
mapbox static-tiles *
mapbox static *
mapbox styles *
mapbox tilequery *
mapbox tilesets *
```

`mapbox directions` is the one exception: its API has a single operation,
so there's a bare command with no subcommand at all, the same shape
`mapbox usage` already has — see [docs/commands.md](./docs/commands.md) for
its own parameters.

A command group is not the same thing as a spec file: which one an operation
belongs to is decided per operation. So `sprites` and `tilesets` are each
assembled from operations declared by the Styles, Raster Tiles and Vector
Expand Down
Loading
Loading