Skip to content

Fix incorrect param-combination claims on phone number search#383

Merged
Devon-White merged 4 commits into
mainfrom
Devon/fix-phone-search-param-combinations
Jun 4, 2026
Merged

Fix incorrect param-combination claims on phone number search#383
Devon-White merged 4 commits into
mainfrom
Devon/fix-phone-search-param-combinations

Conversation

@Devon-White
Copy link
Copy Markdown
Collaborator

@Devon-White Devon-White commented Jun 4, 2026

Closes #382

Problem

The Relay REST Search Available Phone Numbers endpoint documented combination restrictions on the region and city query params that the backend does not enforce. Requests combining areacode + region (and areacode + region + city) return 200 OK with results.

Changes

specs/signalwire-rest/relay-rest/phone-numbers/main.tsp (@doc decorators), with fern/apis/signalwire-rest/openapi.yaml regenerated:

  • region — removed the false "Cannot be used in combination with areacode."; added that it's supported for local searches only (not toll-free).
  • city — removed the unsupported "Cannot be used in combination with areacode, starts_with, contains, or ends_with." sentence; kept "Must be used in combination with region." (the one rule the backend enforces); added that it's supported for local searches only (not toll-free).

Verification

  • yarn build:specs regenerates openapi.yaml; diff limited to the two description lines.
  • yarn fern-check passes (0 errors).
  • Repo-wide grep confirms the incorrect phrasing exists nowhere else in the docs; SDK reference pages and the Compatibility API don't carry these constraints.

The Search Available Phone Numbers endpoint documented combination
restrictions on the region and city query params that the backend does
not enforce. Confirmed against the Rails source: for local searches the
only combination rules are that starts_with/contains/ends_with are
mutually exclusive and that city requires region. Nothing restricts
areacode, region, or city against each other.

- region: remove the false 'Cannot be used in combination with areacode.'
- city: remove the unsupported 'Cannot be used in combination with
  areacode, starts_with, contains, or ends_with.' sentence; keep the
  'Must be used in combination with region.' rule the backend enforces

Regenerated fern/apis/signalwire-rest/openapi.yaml from the spec.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Devon-White and others added 3 commits June 4, 2026 16:44
For number_type=toll-free, the backend's Search::Tollfree::{Inteliquent,
Belle} contracts reject region or city with a 422
('does not support those search filters'). Document that region and
city apply to local searches only.
@Devon-White Devon-White merged commit 47f8b28 into main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Correction] Relay REST API | Search Available Phone Numbers' region and city Query Params

1 participant