Skip to content

Fabric reference: use plural call_flows and conference_rooms paths - #857

Merged
Devon-White merged 5 commits into
mainfrom
fix/845-fabric-plural-paths
Oct 29, 2026
Merged

Devon-White merged 5 commits into
mainfrom
fix/845-fabric-plural-paths

Conversation

@Devon-White

Copy link
Copy Markdown
Collaborator

Summary

The Fabric reference documented the call_flow and conference_room sub-resource paths in the singular, and those return 404. prime-rails config/routes.rb declares only the plural forms: resources :call_flows with nested addresses and versions, and resources :conference_rooms with nested addresses.

Changes

  • Plural paths:
    • GET and POST /call_flow/{id}/versions become /call_flows/{id}/versions.
    • GET /call_flow/{id}/addresses becomes /call_flows/{id}/addresses.
    • GET /conference_room/{id}/addresses becomes /conference_rooms/{id}/addresses.
  • Example pagination links now use the plural route the serializers build. The call-flow addresses example also gains the call_flows/ segment it was missing.
  • Server SDK reference pages. Eight Python and TypeScript pages embedded the old endpoint strings and would have lost their schema and response snippets; only those attributes changed. The Python SDK itself still calls the singular paths, which signalwire-python#171 tracks.

Operation IDs and summaries are unchanged, so no reference URLs move. fern/redirects.yml and fern/llms.txt need no changes.

Verification

  • yarn build:specs passes.
  • yarn fern-md-check passes.
  • Locally, yarn fern-check could only fail its missing-redirects step: Fern's server returned 403. CI should confirm.

Closes #845

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

@Manny-r31

Copy link
Copy Markdown
Collaborator

Review verdict: Ready to merge

Checked against prime-rails main (775a2b5) config/routes.rb:1431-1443 (namespace :resources under /api/fabric): call_flows/{id}/addresses (GET), call_flows/{id}/versions (GET, POST) and conference_rooms/{id}/addresses (GET) exist only in the plural form; there is no singular route or alias. The PR head has no leftover singular paths, TypeSpec and openapi.yaml agree, all 8 SDK snippet endpoints match, and operationIds are unchanged so no redirects are needed. CI passes.

Optional follow-ups, pre-existing and outside this diff:

  1. openapi.yaml ~L36274-36292: the generic ResourceAddressPaginationResponse examples use resources/{uuid}/addresses with no type segment; no such route exists.
  2. openapi.yaml ~L47856: the swml_script addresses example uses singular swml_script/; the route is swml_scripts only (routes.rb:1436).

Note: the docs will be ahead of the Python SDK on these paths until signalwire-python#171 lands.

The `prev` pagination example for the SWML script addresses response
pointed at /api/fabric/resources/swml_script/{id}/addresses. prime-rails
only routes the plural swml_scripts form, so the example now matches the
other links in the same model. Regenerated openapi.yaml.
The links on every Fabric resource addresses list are built by
API::Fabric::Resources::AddressesSerializer through
generate_pagination_links, so all of them share one shape:

- path: /api/fabric/resources/<plural type>/{id}/addresses, or
  /api/fabric/resources/{id}/addresses for the generic endpoint
- self:  page_number, page_size, type
- first: page_size, type (page_number and page_token are dropped)
- next:  page_number+1, page_size, page_token=PA<id>, type
- prev:  page_number-1, page_size, page_token=PB<id>, type
- type is always present on the typed endpoints (each controller sets
  it) and absent on the generic one; query keys are sorted

Fixes in the examples:
- cxml_scripts pointed at the list URL instead of {id}/addresses
- cxml_applications used the laml_applications alias path
- subscribers, sip_gateways and swml_scripts omitted type
- swml_scripts self/first/next had the wrong page params
- first links carried page_number=0 on most endpoints
- prev links used a PA token instead of PB

Regenerated openapi.yaml.
@Devon-White

Copy link
Copy Markdown
Collaborator Author

@Manny-r31 thanks for the review. Both optional follow-ups are handled:

  1. Generic ResourceAddressPaginationResponse examples: no route change needed, because the generic route exists. GET /api/fabric/resources/{id}/addresses lists the addresses of any Resource, whatever its type. c346e04 updates the examples' pagination links to match the shape the API returns.
  2. Singular swml_script/ in the SWML script addresses example: fixed in e9054d5. It now uses the plural swml_scripts, and there are no singular paths left in the specs or the generated OpenAPI.

Your note about the Python SDK stands: the docs will be ahead of the SDK on these paths until the SDK update lands.

@Devon-White
Devon-White merged commit 745c85a into main Oct 29, 2026
2 checks passed
@Devon-White
Devon-White deleted the fix/845-fabric-plural-paths branch October 29, 2026 15:19
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.

Fabric reference: call_flow / conference_room endpoints documented with singular paths that return 404

2 participants