Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • Documentation
    • Marked 11 API operations as deprecated in the Cohere OpenAPI spec.
    • Marked the ChatConnector array item parameter as deprecated.
    • Marked the search_queries_only parameter as deprecated.
    • Deprecation flags will surface in generated API docs, client SDKs, and tooling (e.g., codegen), potentially triggering warnings.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Marked additional OpenAPI elements as deprecated in src/libs/Cohere/openapi.yaml: added deprecated: true to two parameters (ChatConnector array item and search_queries_only) and to 11 operations across multiple paths. No schema, request/response, or description changes beyond deprecation flags.

Changes

Cohort / File(s) Summary
Operation deprecations
src/libs/Cohere/openapi.yaml
Added deprecated: true to 11 operations at the operation level (placed after 504 GatewayTimeout responses).
Parameter deprecations
src/libs/Cohere/openapi.yaml
Marked the array item referencing #/components/schemas/ChatConnector as deprecated; marked the boolean parameter search_queries_only as deprecated.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A bunny taps its spec with care,
“Deprecated, deprecated—beware!”
Eleven paths now softly dim,
Two params hum a quieter hymn.
I twitch my whiskers, file saved tight—
Hop along, future, to the new light. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title "feat:@coderabbitai" is not descriptive of the actual changes; the diff adds deprecation annotations to the Cohere OpenAPI spec (a ChatConnector parameter item, the search_queries_only parameter, and eleven operation-level deprecations), so the title reads like a bot tag and will not help reviewers or future history readers. Please replace the title with a concise, human-readable summary of the main change, for example: "Mark ChatConnector param, search_queries_only, and 11 operations as deprecated in Cohere OpenAPI spec".
✅ 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_202509161830

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 16, 2025 18:31
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Deprecate 2 params and 11 operations in src/libs/Cohere/openapi.yaml Sep 16, 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: 1

🧹 Nitpick comments (8)
src/libs/Cohere/openapi.yaml (8)

63-69: Clarify deprecation scope for the connectors array.

Right now, deprecated: true is at the same level as items, which deprecates the whole array property. If the intent is to deprecate only the item type (i.e., specific ChatConnector entries) but keep the array itself, move deprecated under items:

-                items:
-                  $ref: '#/components/schemas/ChatConnector'
-                description: "Accepts ... (truncated)"
-                deprecated: true
+                items:
+                  allOf:
+                    - $ref: '#/components/schemas/ChatConnector'
+                  deprecated: true
+                description: "Accepts ... (truncated)"

Also, please confirm this property’s schema block includes type: array elsewhere; otherwise some generators will misinterpret it.


168-174: Add deprecation guidance for consumers.

Consider adding a short deprecation message and the recommended alternative so SDKs/docs surface it prominently:

                 search_queries_only:
                   type: boolean
                   description: "Defaults to `false`. ... (truncated)"
                   deprecated: true
+                  x-deprecation-message: "Will be removed in a future release. Use <replacement> instead."

If this is a query parameter (not a request-body property), ensure deprecation is applied on the Parameter Object (with schema.type) rather than a naked Schema Object.


1128-1134: LGTM: operation marked deprecated.

Same ask as above: lint to confirm scope; consider adding a brief deprecation note in description.


1198-1204: LGTM, ensure changelog/docs reflect this deprecation.

Flag this in release notes and SDK regen to avoid silent breaking changes for users filtering deprecated ops.


1271-1277: Consistent developer experience for deprecated ops.

Consider adding a uniform x-deprecation-message across all deprecated operations so generators surface a consistent message.


1343-1349: Double-check tag grouping.

If docs group routes by tags, add a “Deprecated” tag or prefix in summary to make these stand out in rendered docs.


1421-1427: Consider timeline metadata.

If you have an internal EOL date, add x-sunset: '2025-12-31' (or similar) for internal tooling, even if you also emit the Sunset header.


6623-6629: Docs linkage.

Add a link in description to a migration guide if one exists. Keeps users on the happy path.

📜 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 10f535b.

⛔ 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 (2)
src/libs/Cohere/openapi.yaml (2)

1501-1507: SDK impact check.

Many generators exclude deprecated operations by default; confirm this won’t remove needed endpoints from generated clients before you ship.


7178-7184: Final nits:

  • Keep x-fern-audiences consistent with deprecation status (if Fern supports a deprecation-specific audience or message, apply it).
  • Verify these 11 ops are the full intended set; partial deprecation can confuse users.

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

🧩 Analysis chain

Operation-level deprecation: validate placement and add a Sunset plan.

Looks correct (operation-level, after responses). Please lint to ensure indentation/scope is on the Operation Object, not within responses.

Optional: publish a deprecation plan via headers:

       responses:
         '504':
           $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
+      deprecated: true
+      description: |
+        Deprecated. This operation will be removed after the sunset date.
+      parameters:
+        - in: header
+          name: Sunset
+          schema:
+            type: string
+          description: RFC 8594 Sunset header indicating planned removal date.

Run a quick validation:


🏁 Script executed:

#!/bin/bash
# Lint the spec and fail on deprecation/structural issues
npx @redocly/cli@latest lint src/libs/Cohere/openapi.yaml || true

Length of output: 8461


Operation-level deprecation: fix OpenAPI validation errors first, then add Sunset plan.

Redocly lint returned 1 error + 20 warnings — fix the schema error and the undefined required-properties before applying operation-level deprecation or adding headers.

  • Critical error: src/libs/Cohere/openapi.yaml:13949 (#/components/schemas/EmbedByTypeResponse) — "type: object" must not contain "items". Either change to "type: array" with "items" or move the items block into an array property; objects must use "properties".
  • Fix undefined required properties flagged by lint (examples: CreateConnectorOAuth required entries at ~line 13572 — clientId, clientSecret, authorizeUrl, tokenUrl; EmbedByTypeResponse/api_version at ~13943; EmbedFloatsResponse/api_version at ~15255; path patch required finetuned_model at ~6343; others listed in the lint output). Add the missing property definitions or remove them from the required lists.
  • Optional: remove/resolve unused components reported by the linter (CreateClusterJobRequest/Response, FeedbackResponse, etc.).
  • After those fixes, place deprecated: true at the Operation Object level (after responses), not inside responses. Optionally add a Sunset header. Re-run lint: npx @redocly/cli@latest lint src/libs/Cohere/openapi.yaml and ensure no errors before merging.

Optional Sunset header diff (place at the operation level, after responses):

       responses:
         '504':
           $ref: '#/components/responses/GatewayTimeout'
-      deprecated: true
+      deprecated: true
+      description: |
+        Deprecated. This operation will be removed after the sunset date.
+      parameters:
+        - in: header
+          name: Sunset
+          schema:
+            type: string
+          description: RFC 8594 Sunset header indicating planned removal date.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 1004 to 1010 (and referencing the
linter locations cited: ~13949, ~13943, ~15255, ~13572, ~6343), the OpenAPI has
a critical schema error where a schema declared as "type: object" contains
"items" (EmbedByTypeResponse) — change that schema to "type: array" with "items"
or convert the items block into a named array property under an object using
"properties"; next audit each linter-flagged required list (e.g.,
CreateConnectorOAuth required: clientId, clientSecret, authorizeUrl, tokenUrl;
EmbedByTypeResponse/api_version; EmbedFloatsResponse/api_version;
finetuned_model path param) and either add the missing property definitions with
proper types/description or remove those names from the required arrays so the
schema validates; optionally remove or mark unused components
(CreateClusterJobRequest/Response, FeedbackResponse, etc.) if truly unused; then
move any deprecation indication to the Operation Object level (place deprecated:
true after responses) and, if desired, add a Sunset header at the operation
level; finally re-run the Redocly linter (npx @redocly/cli@latest lint
src/libs/Cohere/openapi.yaml) and iterate until there are zero errors before
merging.

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