-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Deprecate 2 params and 11 operations in src/libs/Cohere/openapi.yaml #262
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
WalkthroughMarked 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
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 (8)
src/libs/Cohere/openapi.yaml (8)
63-69: Clarify deprecation scope for the connectors array.Right now,
deprecated: trueis at the same level asitems, which deprecates the whole array property. If the intent is to deprecate only the item type (i.e., specificChatConnectorentries) but keep the array itself, movedeprecatedunderitems:- 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: arrayelsewhere; 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-messageacross 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
summaryto 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
descriptionto a migration guide if one exists. Keeps users on the happy path.
📜 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 (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-audiencesconsistent 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.
| $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.
🧩 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 || trueLength 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.
Summary by CodeRabbit