-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Mark 2 parameters and 9 operations deprecated in OpenAPI #269
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: two parameters now have deprecated: true, and nine operation objects were marked deprecated. No schema, response, or error structure changes were made. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ 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: 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 endpointsMinimal 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
⛔ 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
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: |
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.
🧩 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.
Summary by CodeRabbit