feat:Update OpenAPI spec with new webhook model and LLM identifiers#155
feat:Update OpenAPI spec with new webhook model and LLM identifiers#155
Conversation
WalkthroughThe OpenAPI specification for the ElevenLabs API was updated to include a new webhook response model for the speech-to-text endpoint, added two new LLM model identifiers to the LLM schema, and removed the nullable property from the speech-to-text response schema. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant Webhook
Client->>API: POST /v1/speech-to-text
alt Synchronous Response
API-->>Client: SpeechToTextChunkResponseModel or MultichannelSpeechToTextResponseModel
else Asynchronous/Webhook Response
API-->>Client: SpeechToTextWebhookResponseModel (acceptance)
API->>Webhook: Sends transcription result asynchronously
end
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/libs/ElevenLabs/openapi.yaml (2)
17882-17888: Consider alphabetically sorting theLLMenum to minimise future merge noiseThe two new identifiers land mid-list. Keeping the enum alphabetised (
qwen3-*beforewatt-*, etc.) makes diffs smaller and avoids accidental duplicates.
21973-21990: Nit: align naming & add basic format constraints forSpeechToTextWebhookResponseModel
- Title capitalisation: “ID” is normally uppercase (
Request ID) to match other schemas.request_idwould benefit from a simple pattern (^[A-Za-z0-9_-]+$) or at leastformat: uuidif that is the intended shape.- Add a short
descriptionto the schema itself for parity with neighbours.- request_id: - title: Request Id + request_id: + title: Request ID + pattern: '^[A-Za-z0-9_-]+$' # or `format: uuid`These tweaks improve client generation and documentation clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (7)
src/libs/ElevenLabs/Generated/ElevenLabs..JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.ISpeechToTextClient.CreateSpeechToText.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.LLM.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToTextWebhookResponseModel.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToTextWebhookResponseModel.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.SpeechToTextClient.CreateSpeechToText.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/ElevenLabs/openapi.yaml(3 hunks)
| anyOf: | ||
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | ||
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | ||
| - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel' | ||
| oneOf: | ||
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | ||
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | ||
| nullable: true | ||
| examples: |
There was a problem hiding this comment.
Add webhook schema to oneOf or remove oneOf—current mix breaks spec validation
The schema now has both anyOf (with the new SpeechToTextWebhookResponseModel) and oneOf (without it).
OpenAPI generators treat oneOf as a mutually exclusive discriminator set; having a broader anyOf directly above it that contains an extra option makes the specification ambiguous and will fail validation in tools such as swagger-cli validate or openapi-generator.
Either extend oneOf to include the new model or drop oneOf entirely if exclusivity is no longer required.
oneOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
+ - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| anyOf: | |
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | |
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | |
| - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel' | |
| oneOf: | |
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | |
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | |
| nullable: true | |
| examples: | |
| anyOf: | |
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | |
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | |
| - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel' | |
| oneOf: | |
| - $ref: '#/components/schemas/SpeechToTextChunkResponseModel' | |
| - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel' | |
| - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel' | |
| examples: |
🤖 Prompt for AI Agents
In src/libs/ElevenLabs/openapi.yaml around lines 5626 to 5633, the schema
defines both anyOf and oneOf with inconsistent sets, where anyOf includes
SpeechToTextWebhookResponseModel but oneOf does not, causing spec validation
errors. To fix this, either add SpeechToTextWebhookResponseModel to the oneOf
list to keep exclusivity or remove the oneOf property entirely if exclusivity is
not needed, ensuring the schema is consistent and valid.
Summary by CodeRabbit