-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Deprecate ChatConnector, search_queries_only, 504s in openapi.yaml #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughDeprecation metadata was added in src/libs/Cohere/openapi.yaml. The ChatConnector operation, the search_queries_only option, and multiple HTTP 504 (Gateway Timeout) response entries across various paths are now marked deprecated. No schemas, parameters, or functional logic were changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/libs/Cohere/openapi.yaml (1)
63-69: Clarify deprecation target: property vs schema.If the intent is to deprecate the entire “connectors” property, this placement is fine. If instead you intend to deprecate the ChatConnector schema (or only the
"web-search"connector), mark#/components/schemas/ChatConnectoras deprecated (or document the specific ID) so other references inherit it. Also confirm the schema block includestype: arrayfor this property; it isn’t visible in the hunk.Example (in components):
components: schemas: ChatConnector: + deprecated: true type: object ...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (21)
src/libs/Cohere/Generated/Cohere.CohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.csis excluded by!**/generated/**src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Cohere/openapi.yaml(11 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test / Build, test and publish
🔇 Additional comments (8)
src/libs/Cohere/openapi.yaml (8)
1421-1427: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
7178-7184: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
1343-1349: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
1198-1204: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
6623-6629: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
1271-1277: Same issue: unintended operation deprecation.- deprecated: trueLikely an incorrect or invalid review comment.
168-174: Deprecation verified in schema and generated C# — ensure docs & clients updated
- src/libs/Cohere/openapi.yaml (match at line 168):
search_queries_onlypresent.- src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs (≈lines 197–201):
JsonPropertyName("search_queries_only")and[Obsolete("This property marked as deprecated.")].- No other occurrences found by the rg scan.
Codegen surfaces the deprecation for C#; ensure docs, other language SDKs, and client defaults/tests do not depend on this property.
1004-1010: Validate OpenAPI spec — fix unintendeddeprecatedflagsrg found multiple
deprecated: trueentries in src/libs/Cohere/openapi.yaml (examples at lines 66, 171, 862, 919, 959, 1007, 1131, 1201, 1274, 1346, 1424, 1504, 6626, 7181). Spectral lint did not run ("No ruleset has been found"). Re-run a linter/validator (Spectral with a ruleset or openapi-generator/Swagger CLI) and confirm/remove/move any accidentaldeprecatedmarkers (operation/parameter/response) before merging.
| $ref: '#/components/responses/ServiceUnavailable' | ||
| '504': | ||
| $ref: '#/components/responses/GatewayTimeout' | ||
| deprecated: true | ||
| x-fern-audiences: | ||
| - public | ||
| x-fern-examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deprecates the entire operation, not only the 504 response.
deprecated: true at this level marks the operation deprecated. OpenAPI does not support deprecating an individual response; use a vendor extension on the response component (e.g., add x-deprecated: true to components.responses.GatewayTimeout) or update its description. Do not attach metadata alongside a $ref at the response instance.
Apply this fix (remove operation deprecation here):
- deprecated: trueThen, in components.responses.GatewayTimeout:
components:
responses:
GatewayTimeout:
+ x-deprecated: true
description: Gateway Timeout.
...📝 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.
| $ref: '#/components/responses/ServiceUnavailable' | |
| '504': | |
| $ref: '#/components/responses/GatewayTimeout' | |
| deprecated: true | |
| x-fern-audiences: | |
| - public | |
| x-fern-examples: | |
| # Operation: remove the operation-level deprecation (do not add `deprecated: true` here) | |
| responses: | |
| '504': | |
| $ref: '#/components/responses/GatewayTimeout' | |
| # components.responses: mark the specific response as deprecated via vendor extension | |
| components: | |
| responses: | |
| GatewayTimeout: | |
| x-deprecated: true | |
| description: Gateway Timeout. | |
| ... |
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1004 to 1010, the operation is
incorrectly marked deprecated (this deprecates the whole operation rather than a
single response); remove the deprecated: true entry from the operation and
instead mark the GatewayTimeout response as deprecated by adding a vendor
extension (e.g., x-deprecated: true) or updating its description under
components.responses.GatewayTimeout; also ensure you do not attach metadata at
the response instance alongside a $ref (leave the response element as a plain
$ref or reference the component without additional keys).
| $ref: '#/components/responses/ServiceUnavailable' | ||
| '504': | ||
| $ref: '#/components/responses/GatewayTimeout' | ||
| deprecated: true | ||
| x-fern-audiences: | ||
| - public | ||
| x-fern-examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue: operation unintentionally deprecated.
Remove this deprecated: true and move deprecation to the GatewayTimeout response component as above.
- deprecated: trueCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1128 to 1134, the operation is
mistakenly marked with `deprecated: true`; remove the `deprecated: true` from
the operation level and instead mark the relevant GatewayTimeout response
component as deprecated (move the deprecation annotation to the GatewayTimeout
response component) so the operation remains active while the specific response
is flagged as deprecated.
| $ref: '#/components/responses/ServiceUnavailable' | ||
| '504': | ||
| $ref: '#/components/responses/GatewayTimeout' | ||
| deprecated: true | ||
| x-fern-audiences: | ||
| - public | ||
| x-fern-examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue: unintended operation deprecation.
- deprecated: trueCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1501 to 1507 an operation has been
marked as deprecated unintentionally; remove the deprecated: true flag (or set
deprecated: false) for the affected operation, validate the YAML (openapi
lint/validator), regenerate any clients/spec artifacts that rely on this file,
and run/update any tests or changelog entries that assumed the operation was
deprecated.
Summary by CodeRabbit