feat: SDK with x-speakeasy-name-override schema naming#358
Draft
louis-sanna-dev wants to merge 3 commits intomainfrom
Draft
feat: SDK with x-speakeasy-name-override schema naming#358louis-sanna-dev wants to merge 3 commits intomainfrom
louis-sanna-dev wants to merge 3 commits intomainfrom
Conversation
c493a25 to
0f16983
Compare
Generated from V2 spec with x-speakeasy-name-override for cleaner type names.
Naming convention (follows OpenAI/Google patterns):
- Entity: {Entity} (e.g., BatchJob, FileObject, Library)
- Request: {Verb}{Entity}Request (e.g., CreateBatchJobRequest)
- Response: {Verb}{Entity}Response (e.g., ListFilesResponse, GetFileResponse)
Related: dashboard#17924
Shows how to use typed Entity, Response schemas: - BatchJob, Library, FileObject (entities) - ListBatchJobsResponse, ListFilesResponse (responses) This file is type-checked by mypy in scripts/lint_custom_code.sh.
0f16983 to
86c46de
Compare
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.
Summary
SDK regenerated from V2 spec with improved schema naming.
Related: dashboard#17924
Naming Convention
We use
x-speakeasy-name-overrideto control SDK type names. The convention follows OpenAI/Google patterns:1. Request Body Schemas (POST/PUT body)
Pattern:
{Verb}{Entity}Request2. Response Schemas (list/delete wrappers)
Pattern:
{Verb}{Entity}Response3. Entity Schemas (the actual resource)
Pattern: Just the entity name
Example Usage
Where users see each type:
BatchJob,FileObject) - Return type ofcreate(),get(), items in list responsesListBatchJobsResponse) - Return type oflist(), wraps entities + paginationCreateBatchJobRequest) - Internal, users pass kwargs insteadTest plan