Skip to content
Open
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
2 changes: 1 addition & 1 deletion client.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ A client ignores a field that this contract does not use, in a lookup, a reverse
- A `lng` that is not finite or is outside -180 to 180. The scenario `reverse-invalid-lng` tests it.
- A `maxDistanceM` below 0 or above 250. The OpenAPI file gives the range 0 to 250. NIPOST's OpenAPI file says that the gateway cuts a larger value to 250 without a sign. Gatepost did not test this, so the client rejects it. It does not return a result for another radius. The scenarios `reverse-invalid-max-distance` and `reverse-invalid-negative-distance` test it. The scenarios `reverse-max-distance-zero` and `reverse-max-distance-250` test that both limits pass.
- The client writes each number in the query in its shortest decimal form, with no exponent and no trailing zero: `lat=9`, not `lat=9.0` and not `lat=9e0`. A negative zero is written `0`. A small value is written in full: `0.0000001`, not `1e-7`. Languages print numbers in different forms, so one fixed form gives every client the same query for the same input. The mock server compares numbers by value, so it also accepts `9.0`. The scenarios `reverse-plain-decimal` and `reverse-whole-number` test this rule.
- `autocomplete` normalises its text with the core. Empty text, text of more than 11 characters, and text with a character other than A to Z and 0 to 9 raise `invalid_input`, and the client sends no request. The gateway does not answer an empty `q`. The request sends the normalised text: `q=FC01Z`. The scenarios `autocomplete-empty-input`, `autocomplete-too-long`, `autocomplete-bad-character` and `autocomplete-district` test this rule.
- `autocomplete` normalises its text with the core. Text of more than `maxInputCodePoints` code points (64 in `data/format.json`) raises `invalid_input` before the client normalises it, and the client sends no request. Empty text, text of more than 11 characters, and text with a character other than A to Z and 0 to 9 raise `invalid_input`, and the client sends no request. The gateway does not answer an empty `q`. The request sends the normalised text: `q=FC01Z`. The scenarios `autocomplete-empty-input`, `autocomplete-too-long`, `autocomplete-bad-character` and `autocomplete-district` test this rule.

## Errors

Expand Down