Repository navigation
Name the paginated call and assistant list endpoints in the SDKs - #1400
Draft
chris-garber-vapi wants to merge 2 commits into
Draft
chris-garber-vapi wants to merge 2 commits into
chris-garber-vapi wants to merge 2 commits into
Conversation
Add Fern overrides for GET /v2/call and GET /v2/assistant so the SDKs expose them as calls.listPaginated and assistants.listPaginated rather than names derived from the controller. Describe the shared PaginationMeta fields for any resource, not only phone numbers. Overlay fixes so every exposed /v2/call and /v2/assistant parameter works from the SDKs: - Type `customer` and `assistantOverrides` and mark them deepObject. As untyped objects, the SDKs send them as JSON strings, which the API rejects. - Drop the top-level `structuredOutputs` and `score` parameters. The API reads those filters from the nested `artifact` object and rejects them at the top level. - Drop `sortBy` from /v2/assistant, which always sorts by creation time. - Replace the `cursor` description, which named an internal ticket. Merge only after the API change publishing these routes is deployed and the nightly spec sync has added them to openapi.json. Before then, these overrides generate an empty listPaginated() method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
🌿 Preview your docs: https://vapi-preview-01a1aed1-a8d6-75de-bc58-8ba508728ee8.docs.buildwithfern.com |
Contributor
|
🌿 Preview your docs: https://vapi-preview-01a1aed2-8ae1-761e-bd4c-edc0d7225195.docs.buildwithfern.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Names the two paginated list endpoints in the SDKs and the API reference:
GET /v2/call→calls.listPaginated("List Calls (Paginated)")GET /v2/assistant→assistants.listPaginated("List Assistants (Paginated)")Without overrides, Fern would derive the names from the controller (
callControllerFindAllPaginated), as it already does forphoneNumbers.phoneNumberControllerFindAllPaginated.Rewords the shared
PaginationMetadescriptions so they fit any resource (they said "phone numbers"), documentsnextCursor,hasNextPage,totalPagesandsortOrder, and adds descriptions forCallPaginatedResponseandAssistantPaginatedResponse.Overlay fixes so every exposed parameter works from the SDKs:
customerandassistantOverrideson/v2/callare typed and markeddeepObject. As untyped objects, the SDKs sent them as JSON strings, which the API rejects with a 400.structuredOutputsandscorefrom/v2/call. The API reads these only inside the nestedartifactobject and rejects them at the top level.sortByfrom/v2/assistant, which always sorts by creation time.cursordescription, which named an internal ticket.Generated TypeScript (local
fern generate --local,fernapi/fern-typescript-sdk3.63.0, with both paths spliced intoopenapi.json):Request URLs captured from the generated client, both accepted by the API's request validation:
Testing Steps
fern check --api api: 0 errors, same 15 warnings asmain(with and without the two paths inopenapi.json)/api-reference/calls/list-paginatedin the docs preview🤖 Generated with Claude Code