Skip to content

Commit f75bce7

Browse files
authored
Merge pull request #114 from mapbox/fix/help-descriptions
Fix help and schema descriptions, and let true/false flags send false
2 parents 12eb543 + d4154f6 commit f75bce7

28 files changed

Lines changed: 958 additions & 174 deletions

‎CHANGELOG.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,42 @@ that may never merge. They are not releases and are not listed here.
2929
API for the per-browser, per-country and per-host breakdown, which it now
3030
sends only on request. Without the flag the request is unchanged, and each
3131
product's `dimensions` in `-o json` is `{}`.
32+
- `static get-image`, `static get-tile` and `tilesets get-tile` no longer
33+
need their trailing optional positionals: `<highRes>`, `<format>` and
34+
`<quality>` can be left off instead of passed as `""`. Writing `""` still
35+
works, so existing scripts are unaffected. `--schema` now reports these
36+
arguments as not required.
37+
- A flag for a true/false API parameter now takes `=false`:
38+
`--attribution=false` sends `attribution=false`. Alone it still sends
39+
`true`, as before. Where the API defaults to `true` (`--attribution`,
40+
`--logo`, `--autocomplete`, `--dedupe`, `--continue-straight` on driving
41+
profiles), this is the only way to turn the setting off. A workflow
42+
step's `false` still leaves the flag out, as before.
43+
- `directions --snapping-include-closures` and
44+
`--snapping-include-static-closures` take a value: `true` or `false` per
45+
coordinate, semicolon-separated (`true;false`). They were switches that
46+
sent a single `true`, which the API rejects with a 422 for any route, so
47+
no working command changes. In `--schema` they change from a boolean
48+
flag to a string option; this is a fix rather than a breaking change for
49+
the same reason.
50+
- `--help` shows each parameter's whole description rather than its first
51+
sentence, so the allowed values and what else a parameter needs
52+
("Requires `overview=full`") are no longer cut off.
53+
- An API command's `--help` shows the opening of its description as plain
54+
text, followed by a `Docs:` link, instead of the whole Markdown page with
55+
its headings, tables and curl examples (`geocoder batch` was 113 lines).
56+
`--schema` still carries the full description.
57+
- `--id` on a command that is not an API command (`history show`,
58+
`auth profiles`, `config list` and the like) is now a usage error, exit
59+
code 2. It used to be ignored: `history show --id x` printed the newest
60+
run as if it were `x`.
61+
- `--schema`: `env` and `default` are filled for every argument, including
62+
the ones read by hand (`--timeout`, `--output`, `--no-color`, `--profile`,
63+
`workflow install --repo`/`--ref`), which only mentioned them in their
64+
description. A new top-level `groups` list carries what a command group's
65+
own help says, such as `mapbox history`, which `commands` (leaves only)
66+
never included.
67+
- `feedback` moved from the Search help group to Maps and data.
3268

3369
## 1.1.1 - 2026-10-22
3470

‎Cargo.lock‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ terminal-colorsaurus = "1"
119119
# a signal handler takes `unsafe` this crate does not have. Installed by
120120
# that command only; every other command keeps the default.
121121
ctrlc = { version = "3", features = ["termination"] }
122+
# Reads the specs' Markdown descriptions for `--help`: the opening prose
123+
# only, with its inline markup rendered rather than printed. A parser rather
124+
# than pattern matching, because stripping markers by hand is what turned
125+
# the code spans `and` and `x` into "and or x". Default features off: they
126+
# are the HTML renderer and a command-line binary.
127+
pulldown-cmark = { version = "0.13", default-features = false }
122128

123129
[target.'cfg(unix)'.dependencies]
124130
# For `workflow run`: passing a SIGTERM on to the running step, which a

‎custom-openapi/directions/openapi/directions.yaml‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ paths:
5858
live traffic), `mapbox/driving`, `mapbox/walking`, or
5959
`mapbox/cycling` are documented, but not necessarily
6060
exhaustive: some accounts have additional profiles of their
61-
own. Sent exactly as typed; the API is the authority on
62-
whether a value is valid, not this description.
61+
own. Any other value is sent as typed.
6362
schema:
6463
type: string
6564
minLength: 1
@@ -251,8 +250,8 @@ paths:
251250
required: false
252251
description: >-
253252
Zero-based indices into `coordinates` marking which ones get
254-
their own arrival instruction — must include `0` and the last
255-
index. Requires `steps=true`.
253+
their own arrival instruction, semicolon-separated — must
254+
include `0` and the last index. Requires `steps=true`.
256255
schema:
257256
type: string
258257
example: "0,2"
@@ -292,12 +291,6 @@ paths:
292291
- name: "alley_bias"
293292
in: query
294293
required: false
295-
# Content before the profile note, not after: `first_sentence` in
296-
# `src/main.rs` cuts a `--help` line at the first `.`, and
297-
# `` `mapbox/driving` only. `` — a real sentence on its own — was
298-
# eating everything that followed it. `--schema` and
299-
# `docs/commands.md` show the description in full either way —
300-
# this ordering is only for the one-line case.
301294
description: >-
302295
Bias the route against (negative) or toward (positive) alleys,
303296
-1 to 1. `mapbox/driving` only.
@@ -352,22 +345,29 @@ paths:
352345
type: number
353346
minimum: 0
354347
maximum: 100
348+
# One value per coordinate, not one switch: a lone `true` with two
349+
# coordinates is a 422 ("one entry per coordinate, separated by
350+
# ';'"), verified against production on 2026-10-23.
355351
- name: "snapping_include_closures"
356352
in: query
357353
required: false
358354
description: >-
359-
Allow snapping to roads carrying a live-traffic closure.
360-
`mapbox/driving-traffic` only.
355+
Whether each coordinate may snap to a road carrying a live-traffic closure —
356+
`true` or `false` per coordinate, semicolon-separated, with an
357+
empty entry to skip one (`true;;false`). `mapbox/driving-traffic`
358+
only.
361359
schema:
362-
type: boolean
360+
type: string
363361
- name: "snapping_include_static_closures"
364362
in: query
365363
required: false
366364
description: >-
367-
Allow snapping to roads carrying a long-term closure.
368-
`mapbox/driving-traffic` only.
365+
Whether each coordinate may snap to a road carrying a long-term closure —
366+
`true` or `false` per coordinate, semicolon-separated, with an
367+
empty entry to skip one (`true;;false`). `mapbox/driving-traffic`
368+
only.
369369
schema:
370-
type: boolean
370+
type: string
371371
- name: "walking_speed"
372372
in: query
373373
required: false

‎custom-openapi/feedback/openapi/feedback.yaml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ paths:
2626
Every feedback item on the account, oldest received first by
2727
default — filterable by id, status, category, a free-text search
2828
phrase, trace id, or a time window on when it was created,
29-
received, or last updated. Paginated with `--after`/`start_cursor`/
30-
`end_cursor` the way every other listing on this CLI is.
29+
received, or last updated. Paginated: pass a response's
30+
`end_cursor` to `--after` for the next page.
3131
parameters:
3232
- name: "access_token"
3333
in: query
@@ -111,10 +111,6 @@ paths:
111111
the feedback.
112112
schema:
113113
type: string
114-
# "ISO 8601" trails each of these six rather than leads them:
115-
# `first_sentence` in `src/main.rs` cuts a `--help` line at the
116-
# first `.`, and "ISO 8601." on its own left `--help` showing just
117-
# that. `--schema` and `docs/commands.md` still show each in full.
118114
- name: "created_before"
119115
in: query
120116
required: false
@@ -207,11 +203,19 @@ paths:
207203
description: >-
208204
The feedback category. Not checked against a list;
209205
`feedback list` shows the ones already in use.
206+
# The API accepts any coordinates here and never returns the
207+
# feature, so the order is GeoJSON's by definition rather than
208+
# by test: on 2026-10-23 both [95, 24.94] and [24.94, 95] were
209+
# accepted. docs.mapbox.com says [latitude, longitude].
210210
feature:
211211
type: object
212212
description: >-
213213
A GeoJSON Feature the feedback is about, with coordinates
214214
in GeoJSON's [longitude, latitude] order.
215+
# Verified against production on 2026-10-23: bare base64 is a
216+
# 400 ("Image must be a base64 data URI of one of: image/png,
217+
# image/jpeg, image/jpg"), a data URI is accepted.
218+
# docs.mapbox.com says plain base64, which is wrong.
215219
screenshot:
216220
type: string
217221
description: >-

‎custom-openapi/isochrone/openapi/isochrone.yaml‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ paths:
4747
live traffic), `mapbox/driving`, `mapbox/walking`, or
4848
`mapbox/cycling` are documented, but not necessarily
4949
exhaustive: some accounts have additional profiles of their
50-
own. Sent exactly as typed; the API is the authority on
51-
whether a value is valid, not this description.
50+
own. Any other value is sent as typed.
5251
schema:
5352
type: string
5453
minLength: 1
@@ -113,14 +112,6 @@ paths:
113112
- name: "denoise"
114113
in: query
115114
required: false
116-
# Spelled "0 to 1"/"1", not "0.0-1.0"/"1.0": `first_sentence` in
117-
# `src/main.rs` cuts a `--help` line at the first `.`, and this
118-
# value's own bounds are the first digits that would appear no
119-
# matter where in the sentence they sit, so a literal decimal
120-
# point anywhere before the end truncates it — not just at the
121-
# front, the way `directions.yaml`'s own fix assumed. `--schema`
122-
# and `docs/commands.md` still show the fuller description below
123-
# in full, decimals included.
124115
description: >-
125116
A larger value removes more of the smaller contours, 0 to 1,
126117
defaulting to 1. A value of 1 returns only the largest contour

‎custom-openapi/map-match/openapi/map-match.yaml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ paths:
4949
live traffic), `mapbox/driving`, `mapbox/walking`, or
5050
`mapbox/cycling` are documented, but not necessarily
5151
exhaustive: some accounts have additional profiles of their
52-
own. Sent exactly as typed; the API is the authority on
53-
whether a value is valid, not this description.
52+
own. Any other value is sent as typed.
5453
schema:
5554
type: string
5655
minLength: 1
@@ -95,9 +94,10 @@ paths:
9594
in: query
9695
required: false
9796
description: >-
98-
Which side of the road to approach each waypoint from,
99-
semicolon-separated — `unrestricted` or `curb` per coordinate.
100-
Requires `--steps`.
97+
Which side of the road to approach each waypoint from, one per
98+
waypoint (every coordinate unless `--waypoints` picks some),
99+
semicolon-separated — `unrestricted` or `curb`. Requires
100+
`--steps`.
101101
schema:
102102
type: string
103103
- name: "geometries"

‎custom-openapi/matrix/openapi/matrix.yaml‎

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ paths:
4646
# named beyond `driving`/`walking`/`cycling`. Same fix as
4747
# `directions.yaml`'s `profile`.
4848
description: >-
49-
The routing profile. `mapbox/driving-traffic` (accounts for
50-
live traffic, caps at 10 coordinates instead of 25),
51-
`mapbox/driving`, `mapbox/walking`, and `mapbox/cycling` are
49+
The routing profile — `mapbox/driving-traffic` (accounts for
50+
live traffic, 10 coordinates at most instead of 25),
51+
`mapbox/driving`, `mapbox/walking`, or `mapbox/cycling` are
5252
documented, but not necessarily exhaustive: some accounts have
53-
additional profiles of their own. Sent exactly as typed, the
54-
API is the authority on whether a value is valid, not this
55-
description.
53+
additional profiles of their own. Any other value is sent as
54+
typed.
5655
schema:
5756
type: string
5857
minLength: 1
@@ -100,17 +99,18 @@ paths:
10099
filtering the road segments considered by direction of travel.
101100
schema:
102101
type: string
102+
# Semicolons, never commas: verified against production, a
103+
# comma-separated list is a 422 ("may be \"all\" or
104+
# semicolon-separated list of 0-based integer indices"). Other index
105+
# lists on the Navigation commands vary per parameter, so this one
106+
# says so explicitly.
103107
- name: "sources"
104108
in: query
105109
required: false
106110
description: >-
107-
Which coordinates act as sources (matrix rows) — `all`
108-
(the default), or zero-based indices, semicolon-separated.
109-
Verified against production: a comma-separated list is a 422,
110-
"may be \"all\" or semicolon-separated list of 0-based integer
111-
indices" — unlike every other index/value list on this CLI's
112-
Navigation commands, which are comma- or semicolon-separated
113-
per parameter but never comma where this API wants semicolons.
111+
Which coordinates act as sources (matrix rows) — `all` (the
112+
default), or zero-based indices separated by semicolons
113+
(`0;2`), not commas.
114114
schema:
115115
type: string
116116
example: "0;2"
@@ -119,18 +119,14 @@ paths:
119119
required: false
120120
description: >-
121121
Which coordinates act as destinations (matrix columns) — `all`
122-
(the default), or zero-based indices, semicolon-separated. See
123-
`sources` above — comma-separated is a 422 here specifically.
122+
(the default), or zero-based indices separated by semicolons
123+
(`0;2`), not commas.
124124
schema:
125125
type: string
126126
example: "1;3"
127127
- name: "fallback_speed"
128128
in: query
129129
required: false
130-
# Content before "Legacy", not after: `first_sentence` in
131-
# `src/main.rs` cuts a `--help` line at the first `.`, and
132-
# "Legacy." on its own left `--help` showing just that word.
133-
# `--schema` and `docs/commands.md` still show it in full.
134130
description: >-
135131
Replaces a `null` (unreachable) cell with a straight-line
136132
estimate at this speed, km/h, rather than leaving it `null`.

‎custom-openapi/places/openapi/places.yaml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ paths:
3636
post:
3737
operationId: batch
3838
summary: Full detail for one or more places.
39+
# `places` has no subcommand, so this, not `info.description`, is
40+
# what `mapbox places --help` shows. It always sends the batch
41+
# request, one id or many, so there is no get/batch choice to offer.
3942
description: >-
40-
Each `mapbox_id` comes from a Search Box API result (`search
41-
forward`/`reverse`/`category`) — this API does not look places up
42-
by name or location itself. Always sends a batch request, one id
43-
or many, so a single id reads the same way, no `get`/`batch`
44-
choice to make. Up to 100 ids in one call.
43+
Full detail for one or more places — hours, phone, website,
44+
photos, address, coordinates — by the `mapbox_id`s a Search Box
45+
result returned (`search forward`, `reverse` or `category`). Up to
46+
100 ids per call. Public Preview, with a 1000-records-per-account
47+
monthly quota.
4548
parameters:
4649
- name: "access_token"
4750
in: query

0 commit comments

Comments
 (0)