Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • Documentation
    • Marked select API operations and options as deprecated in the published API specification.
    • Deprecated the Chat Connector operation and the search_queries_only option.
    • Flagged several 504 Gateway Timeout response entries as deprecated across multiple endpoints.
    • No runtime behavior changes; updates affect docs and generated client SDKs only.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Deprecation 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

Cohort / File(s) Summary
ChatConnector operation deprecated
src/libs/Cohere/openapi.yaml
Added deprecated: true to the OpenAPI operation for the ChatConnector endpoint.
search_queries_only option deprecated
src/libs/Cohere/openapi.yaml
Added deprecated: true to the OpenAPI declaration for the search_queries_only path/operation.
504 response deprecations across paths
src/libs/Cohere/openapi.yaml
Marked multiple HTTP 504 (Gateway Timeout) response entries as deprecated across several paths in the spec.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I thump my paws on YAML plains,
Marking routes with sunset stains—deprecated!
Chat whispers hush, timeouts fade,
Queries bow, retire to shade.
In tidy lines, the map’s updated—
A carrot check, my work annotated.
Hop along; the paths are clearly slated. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is vague and does not describe the actual changes in this PR, which are OpenAPI metadata updates marking ChatConnector, search_queries_only, and several 504 responses as deprecated in src/libs/Cohere/openapi.yaml; it therefore fails to communicate the primary change to reviewers or future readers. Please update the title to clearly summarize the change, for example: "chore(openapi): mark ChatConnector, search_queries_only, and related 504 responses as deprecated" or "docs(openapi): deprecate ChatConnector and search_queries_only entries in src/libs/Cohere/openapi.yaml".
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509180137

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HavenDV HavenDV enabled auto-merge (squash) September 18, 2025 01:38
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate ChatConnector, search_queries_only, 504s in openapi.yaml Sep 18, 2025
Copy link

@coderabbitai coderabbitai bot left a 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/ChatConnector as deprecated (or document the specific ID) so other references inherit it. Also confirm the schema block includes type: array for 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

📥 Commits

Reviewing files that changed from the base of the PR and between 111c2a6 and 4c98fe8.

⛔ Files ignored due to path filters (21)
  • src/libs/Cohere/Generated/Cohere.CohereClient.Chat.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Classify.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Generate.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.CohereClient.Summarize.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.CreateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.DeleteConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.GetConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.ListConnectors.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.OAuthAuthorizeConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ConnectorsClient.UpdateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Chat.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Classify.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Generate.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.ICohereClient.Summarize.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.CreateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.DeleteConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.GetConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.ListConnectors.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.OAuthAuthorizeConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.IConnectorsClient.UpdateConnector.g.cs is excluded by !**/generated/**
  • src/libs/Cohere/Generated/Cohere.Models.ChatRequest.g.cs is 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: true

Likely an incorrect or invalid review comment.


7178-7184: Same issue: unintended operation deprecation.

-      deprecated: true

Likely an incorrect or invalid review comment.


1343-1349: Same issue: unintended operation deprecation.

-      deprecated: true

Likely an incorrect or invalid review comment.


1198-1204: Same issue: unintended operation deprecation.

-      deprecated: true

Likely an incorrect or invalid review comment.


6623-6629: Same issue: unintended operation deprecation.

-      deprecated: true

Likely an incorrect or invalid review comment.


1271-1277: Same issue: unintended operation deprecation.

-      deprecated: true

Likely 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_only present.
  • 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 unintended deprecated flags

rg found multiple deprecated: true entries 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 accidental deprecated markers (operation/parameter/response) before merging.

Comment on lines 1004 to 1010
$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
x-fern-audiences:
- public
x-fern-examples:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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: true

Then, 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.

Suggested change
$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).

Comment on lines 1128 to 1134
$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
x-fern-audiences:
- public
x-fern-examples:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Same issue: operation unintentionally deprecated.

Remove this deprecated: true and move deprecation to the GatewayTimeout response component as above.

-      deprecated: true

Committable 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.

Comment on lines 1501 to 1507
$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
deprecated: true
x-fern-audiences:
- public
x-fern-examples:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Same issue: unintended operation deprecation.

-      deprecated: true

Committable 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants