Skip to content

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 17, 2025

Summary by CodeRabbit

  • Documentation
    • Marked two API parameters as deprecated: the web-search/connectors input and the search_queries_only flag.
    • Marked nine API endpoints as deprecated in the OpenAPI specification.
    • No changes to schemas, responses, or error structures; updates are metadata-only.
    • Users of API tooling and SDKs may now see deprecation warnings for these parameters and endpoints.

Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Deprecation metadata was added in src/libs/Cohere/openapi.yaml: two parameters now have deprecated: true, and nine operation objects were marked deprecated. No schema, response, or error structure changes were made.

Changes

Cohort / File(s) Summary
OpenAPI parameter deprecations
src/libs/Cohere/openapi.yaml
Marked two parameters as deprecated: the connector-related parameter (web-search/custom connector ID) and the boolean parameter search_queries_only.
OpenAPI operation deprecations
src/libs/Cohere/openapi.yaml
Added deprecated: true to nine API operations (post-responses), deprecating those endpoints. No other structural edits.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitch my whiskers at deprecated calls,
Old paths fade like footprints in halls.
Two params yawn, nine endpoints rest—
The spec now labels what’s not best.
I hop ahead on fresher trails,
Ears up high, as legacy pales. 🐇✨

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 shows only metadata deprecations in src/libs/Cohere/openapi.yaml (two parameters and nine operations marked deprecated), so the title fails to summarize the primary change or provide useful context for reviewers. Please rename the PR to a concise, descriptive title such as "chore(openapi): deprecate connector parameter and search_queries_only plus nine endpoints in Cohere openapi.yaml" so reviewers can immediately understand the change.
✅ 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_202509171521

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 17, 2025 15:22
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Mark 2 parameters and 9 operations deprecated in OpenAPI Sep 17, 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 (2)
src/libs/Cohere/openapi.yaml (2)

168-174: Declare the default in schema, not only in description.

The description says it defaults to false; encode that as a formal default for SDKs and docs.

Apply:

                 search_queries_only:
                   type: boolean
                   description: "Defaults to `false`. ..."
+                  default: false
                   deprecated: true
                   x-fern-audiences:
                     - public

1004-1010: Add x-deprecation metadata and ensure operationId for deprecated endpoints

Minimal enhancement (add vendor extensions per deprecated operation):

       deprecated: true
+      x-deprecation-reason: "Superseded by newer endpoint."
+      x-replaced-by: "<path#operationId>"
+      x-sunset: "2026-03-31"

Optional visibility change:

-      summary: "<existing summary>"
+      summary: "DEPRECATED — <existing summary>"

Findings (src/libs/Cohere/openapi.yaml) — 14 deprecated occurrences found:

  • line 66: /v1/chat (POST) — no operationId
  • line 171: /v1/chat (POST) — no operationId
  • line 862: /v1/classify (POST) — no operationId
  • line 919: /v1/classify (POST) — no operationId
  • line 959: /v1/classify (POST) — no operationId
  • line 1007: /v1/classify (POST) — no operationId
  • line 1131: /v1/connectors (GET) — operationId = create-connector (line 1161)
  • line 1201: /v1/connectors (POST) — operationId = create-connector (line 1161)
  • line 1274: '/v1/connectors/{id}' (DELETE) — operationId = get-connector (line 1304)
  • line 1346: '/v1/connectors/{id}' (GET) — operationId = update-connector (line 1376)
  • line 1424: '/v1/connectors/{id}' (PATCH) — operationId = oAuthAuthorize-connector (line 1455)
  • line 1504: '/v1/connectors/{id}/oauth/authorize' (POST) — operationId = list-datasets (line 1535)
  • line 6626: /v1/generate (POST) — no operationId
  • line 7181: /v1/summarize (POST) — operationId = tokenize (line 7220)

Actions:

  • Add the x-deprecation vendor extensions above to each deprecated operation.
  • Ensure every deprecated operation has a correct operationId scoped to that operation (several entries above currently lack one) so x-replaced-by can reference <path#operationId>.
  • Optionally prefix summaries with "DEPRECATED —" for visibility.
📜 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 78822a4.

⛔ 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

Comment on lines 63 to 69
items:
$ref: '#/components/schemas/ChatConnector'
description: "Accepts `{\"id\": \"web-search\"}`, and/or the `\"id\"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n"
deprecated: true
x-fern-audiences:
- public
conversation_id:
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

Add explicit deprecation context and replacement pointer.

Deprecation is marked, but there’s no guidance for clients. Add vendor extensions to communicate why and what to use instead.

Apply this diff near the deprecated field:

                   description: "Accepts {\"id\": \"web-search\"} ... (RAG)."
                   deprecated: true
+                  x-deprecation-reason: "This field is deprecated and will be removed in a future release."
+                  x-replaced-by: "<new-field-or-endpoint>"
                   x-fern-audiences:
                     - public

Run a linter to ensure the placement of deprecated under this schema node is valid:


🏁 Script executed:

#!/bin/bash
# Validate and lint the OpenAPI file
npx -y @redocly/cli@latest lint src/libs/Cohere/openapi.yaml || true

Length of output: 8369


Fix OpenAPI validation errors before adding deprecation metadata.

  • Blocking error: components/schemas/EmbedByTypeResponse/properties/embeddings/items — "object" type should not contain "items" (src/libs/Cohere/openapi.yaml:13949).
  • Resolve undefined required-property warnings (examples: CreateConnectorOAuth.required references clientId/clientSecret/authorizeUrl/tokenUrl at lines 13572–13575; EmbedByTypeResponse.required references api_version at 13941–13943; see full lint output).
  • After the schema validates, add vendor extensions next to the deprecated field. Apply this diff:
                   description: "Accepts {\"id\": \"web-search\"} ... (RAG)."
                   deprecated: true
+                  x-deprecation-reason: "This field is deprecated and will be removed in a future release."
+                  x-replaced-by: "<new-field-or-endpoint>"
                   x-fern-audiences:
                     - public

Re-run: npx -y @redocly/cli@latest lint src/libs/Cohere/openapi.yaml and attach results.

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

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 63-69 (and referenced locations
13572–13575, 13941–13949), the spec fails validation: EmbedByTypeResponse
defines a property "embeddings" whose "items" is used on an "object" type, and
several required arrays reference undefined properties
(CreateConnectorOAuth.required references
clientId/clientSecret/authorizeUrl/tokenUrl; EmbedByTypeResponse.required
references api_version). Fix by changing the "embeddings" schema to the correct
type (make it "array" if it should have "items", or remove the "items" and
instead define properties for an "object"), ensure every name listed in any
required: [...] exists as a property definition (add missing property
definitions or remove them from required), and correct api_version presence in
EmbedByTypeResponse. After all schema errors are resolved, add the vendor
extension (e.g., x-deprecated or your chosen extension) adjacent to the
deprecated field, then re-run validation with: npx -y @redocly/cli@latest lint
src/libs/Cohere/openapi.yaml and attach the results.

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.

1 participant