feat:OpenAPI: add x-stainless-naming, remove go variant constructor skip#209
feat:OpenAPI: add x-stainless-naming, remove go variant constructor skip#209
Conversation
WalkthroughOpenAPI spec updated to adjust vendor extensions. Removed x-stainless-go-variant-constructor: skip and introduced x-stainless-naming with Python-specific model_name and param_model_name for tool-call union naming. No structural or discriminator changes elsewhere. Changes
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: 0
🧹 Nitpick comments (1)
src/libs/tryAGI.OpenAI/openapi.yaml (1)
8553-8556: Optional: Define naming for other SDKs to avoid cross-language driftIf you generate multiple SDKs, consider also setting x-stainless-naming for other targets (e.g., typescript, go, java) to keep union naming aligned across languages.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/libs/tryAGI.OpenAI/openapi.yaml(1 hunks)
🔇 Additional comments (2)
src/libs/tryAGI.OpenAI/openapi.yaml (2)
8553-8556: Stainless Python Naming Keys Verified
- Stainless supports
x-stainless-naming.python.model_nameandparam_model_nameunder schema nodes.- No duplicate
model_namevalues were detected—each appears only once in the spec.- Naming follows the same snake_case pattern as the existing union at lines 10364–10366 (
chat_completion_tool_union/chat_completion_tool_union_param).All checks pass—no further action needed.
8552-8556: Please confirm x-stainless-go-variant-constructor vs. x-stainless-naming usageI ran a repo-wide grep and can confirm both the original
x-stainless-go-variant-constructor: skip
and the newx-stainless-naming: python: model_name: chat_completion_message_tool_call_union param_model_name: chat_completion_message_tool_call_union_paramare present on lines 8552–8556. To keep the SDKs in sync:
• Do you intend to keep the Go-specific
variant-constructor: skip, or should it be removed in favor of the naming extension?
• Should similarx-stainless-namingblocks be added for other languages (e.g., Go, Java, Kotlin) for this union type, as seen elsewhere in the file?No syntax errors detected.
Summary by CodeRabbit