Skip to content

fix: use method-specific Schema types for calling REST client pages#344

Merged
Devon-White merged 2 commits into
mainfrom
devin/1780410419-fix-calling-schema-types
Jun 2, 2026
Merged

fix: use method-specific Schema types for calling REST client pages#344
Devon-White merged 2 commits into
mainfrom
devin/1780410419-fix-calling-schema-types

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented Jun 2, 2026

Summary

Every calling REST client method page (dial, play, record, etc.) was using <EndpointSchemaSnippet endpoint="POST /api/calling/calls" />, which rendered the full Calling.CallRequest union — all 35 command variants on every single page.

Replaced with Fern's <Schema> component pointing to each method's specific type:

- <EndpointSchemaSnippet endpoint="POST /api/calling/calls" />
-
- ## **Response Example**
-
- <EndpointResponseSnippet endpoint="POST /api/calling/calls" />
+
+ ## **Request**
+
+ <Schema type="Calling.CallPlayRequest" api="signalwire-rest" exclude={["command"]} />
+
+ ## **Response**
+
+ <Schema type="Calling.CallResponse" api="signalwire-rest" />

Changes:

  • Each method now shows only its own request schema (e.g. Calling.CallCreateRequest for dial, Calling.CallPlayRequest for play)
  • command property excluded via exclude={["command"]} since the SDK sets it automatically
  • Added ## **Request** and ## **Response** headers for better page organization
  • Response now uses <Schema type="Calling.CallResponse"> instead of EndpointResponseSnippet

Affects 74 files total — both TypeScript and Python reference pages.

Requested by: Fern Support

Replace generic EndpointSchemaSnippet (which rendered all 35 command
variants) with Fern's Schema component pointing to each method's
specific type (e.g. Calling.CallPlayRequest for play, Calling.CallCreateRequest
for dial). Also excludes the 'command' property since the SDK sets it
automatically based on the method called.

Affects both TypeScript and Python reference pages (74 files total).

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

@fern-api
Copy link
Copy Markdown
Contributor Author

fern-api Bot commented Jun 2, 2026

Requested by: Devon White
Slack thread: View conversation

- Add '## **Request**' header above the Schema component
- Replace '## **Response Example**' with '## **Response**'
- Replace EndpointResponseSnippet with Schema type='Calling.CallResponse'
  to show the structured response type definition

Co-Authored-By: bot_apk <apk@cognition.ai>
@Devon-White Devon-White self-requested a review June 2, 2026 15:48
@Devon-White Devon-White merged commit fdf7da8 into main Jun 2, 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.

1 participant