Skip to content
Merged
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 @@ -25,6 +25,34 @@ that may never merge. They are not releases and are not listed here.
that passes them now fails with an unknown-argument error; drop the
flags. `mapbox search forward` keeps them. (#76)

- `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.

- **Breaking**: `--exclude-fields` removed from `mapbox search forward`
and `mapbox search category`. The `photos` and `reviews` fields it
omitted are only returned for accounts with a specific data provider
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,20 @@ mapbox styles <operation>
mapbox tilesets <operation>
```

`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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 259-266 say the same thing as lines 275-278, so the README repeats itself. This stays after a merge with main. Please keep only the mapbox directions paragraph.

belongs to is decided per operation. So `sprites` and `tilesets` are each
assembled from operations declared by the Styles, Raster Tiles and Vector
Tiles specs. `mapbox tilesets` is also unrelated to `mapbox tilesets-cli`,
which proxies to the separate Python tool.

An operation can nest one level deeper where a group reads better, as in
`mapbox styles draft get`, `draft update` and `draft delete`.

For example:

```sh
Expand Down
Loading
Loading