Repository navigation
Fabric reference: use plural call_flows and conference_rooms paths - #857
Conversation
|
Review verdict: Ready to merge Checked against prime-rails main ( Optional follow-ups, pre-existing and outside this diff:
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.
|
@Manny-r31 thanks for the review. Both optional follow-ups are handled:
Your note about the Python SDK stands: the docs will be ahead of the SDK on these paths until the SDK update lands. |
Summary
The Fabric reference documented the
call_flowandconference_roomsub-resource paths in the singular, and those return 404. prime-railsconfig/routes.rbdeclares only the plural forms:resources :call_flowswith nestedaddressesandversions, andresources :conference_roomswith nestedaddresses.Changes
GETandPOST /call_flow/{id}/versionsbecome/call_flows/{id}/versions.GET /call_flow/{id}/addressesbecomes/call_flows/{id}/addresses.GET /conference_room/{id}/addressesbecomes/conference_rooms/{id}/addresses.call_flows/segment it was missing.Operation IDs and summaries are unchanged, so no reference URLs move.
fern/redirects.ymlandfern/llms.txtneed no changes.Verification
yarn build:specspasses.yarn fern-md-checkpasses.yarn fern-checkcould only fail its missing-redirects step: Fern's server returned 403. CI should confirm.Closes #845