Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 17, 2025

Summary by CodeRabbit

  • Documentation
    • Marked several public API endpoints and some parameters as deprecated in the OpenAPI specification to improve visibility in generated docs and client SDKs.
    • Added deprecation flags to select 504 response entries for clarity.
    • No changes to request/response schemas or runtime behavior.

@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Adds deprecated: true flags to selected operations and a parameter in src/libs/Cohere/openapi.yaml, including a ChatConnector/web-search-related declaration and several path blocks after 504 GatewayTimeout responses. No schema, type, or behavior changes; only OpenAPI deprecation metadata updated.

Changes

Cohort / File(s) Summary
OpenAPI deprecation metadata updates
src/libs/Cohere/openapi.yaml
Marked a ChatConnector/web-search parameter declaration as deprecated and added deprecated: true to multiple path operations (primarily following 504 GatewayTimeout responses). No schema/type modifications.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps the spec with care,
Flags of “deprecated” now declare.
Paths that yawn with 504s,
Get tidy notes along their shores.
No schemas moved, no fields rearranged—
Just little signs: “This part has changed.” 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" is not a clear, single-sentence summary of the changeset; it contains an account/agent handle and gives no indication of what was changed. The PR actually adds deprecated: true markers to multiple OpenAPI operations in src/libs/Cohere/openapi.yaml, which the title does not describe. Therefore the title is misleading and does not meet the concise, descriptive-title guideline. Rename the PR to a concise, descriptive title that highlights the primary change, for example: "chore(openapi): mark multiple Cohere endpoints as deprecated" or "chore(src/libs/Cohere): add deprecated flags to openapi.yaml". Include the scope (openapi or src/libs/Cohere) and the main action (mark deprecated) so reviewers can understand the intent at a glance. After renaming, ensure the PR description briefly lists the affected paths or files for clarity.
✅ 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_202509171242

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


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 12:43
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add deprecation flags to selected OpenAPI operations and a parameter 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 (5)
src/libs/Cohere/openapi.yaml (5)

168-174: Deprecation OK; prefer machine-readable default.

Marking this boolean as deprecated is fine. Consider adding default: false instead of relying on description text for defaults, and briefly point to the replacement field/flow in the description.


1271-1277: Consistent deprecation marker.

All good; consider adding a sunset/EOL date in operation description or via a custom x-sunset extension for consumers.


1343-1349: LGTM; keep docs in sync.

If public docs are generated from this spec, add a short deprecation note guiding users to the replacement endpoint.


1421-1427: LGTM; minor doc hint.

Add a one-line “Use X instead” to ease migrations.


7178-7184: LGTM; consider adding deprecation rationale.

Brief rationale helps downstream SDK users when reading generated docs.

📜 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 f897f39.

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

1004-1010: Operation-level deprecation looks correct; verify indentation is at the Operation level.

deprecated: true should be a sibling of responses, not nested under it. The current placement appears correct; just ensure YAML indentation matches other operation-level fields.


1128-1134: Same as above: confirm operation-level indentation.

Looks good; verify via a linter that deprecated is not under responses.


1198-1204: Operation deprecation acknowledged.

No schema/type impact. Ensure SDK regen flags these as deprecated.


1501-1507: LGTM; batch deprecations consistent.

No further issues.


6623-6629: LGTM; validate entire spec after changes.

After mass-editing, run validation to catch any accidental indentation or structural errors (example script provided in first comment).

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

Fix invalid Schema usage: $ref with sibling keys under items.

items contains $ref alongside description and deprecated. In OAS 3.0.x this is invalid (tools will reject siblings of $ref). Use allOf to extend the referenced schema, or move deprecated to the parameter/schema definition being referenced.

Apply this pattern:

-                items:
-                  $ref: '#/components/schemas/ChatConnector'
-                  description: "Accepts {\"id\": \"web-search\"} ... "
-                  deprecated: true
+                items:
+                  allOf:
+                    - $ref: '#/components/schemas/ChatConnector'
+                    - description: "Accepts {\"id\": \"web-search\"} ... "
+                      deprecated: true

Optional: If the intent is to deprecate the entire parameter (not just item schema), mark the parameter object itself as deprecated: true and keep items as a pure $ref.

Run an OpenAPI validation to catch $ref-sibling issues:

#!/bin/bash
# Validate spec with Swagger online validator
curl -s -X POST -H 'Content-Type: application/yaml' --data-binary @src/libs/Cohere/openapi.yaml https://validator.swagger.io/validator/debug | jq
🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 63 to 69, the OpenAPI uses items
with a $ref plus sibling keys (description and deprecated) which is invalid in
OAS 3.0.x; replace the sibling usage by either (A) using allOf under items to
reference the schema and add description/deprecated (i.e., items: allOf: - $ref:
... - type/object with description/deprecated), or (B) move deprecated to the
parameter/schema object itself and keep items as a pure $ref; after making the
change run an OpenAPI validation (e.g., curl to
https://validator.swagger.io/validator/debug) to confirm no $ref-sibling errors
remain.

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