-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Deprecate parameters and nine operations in Cohere OpenAPI #260
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 specific parameters and nine operations as deprecated within the Cohere OpenAPI specification. Changes are limited to metadata in src/libs/Cohere/openapi.yaml, adding deprecated: true to a ChatConnector-related parameter, the search_queries_only parameter, and several operation declarations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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: 0
🧹 Nitpick comments (7)
src/libs/Cohere/openapi.yaml (7)
63-69: Parameter-level deprecation looks correct; confirm intent vs. item/schema-level.Placing
deprecated: trueat the parameter level deprecates the entire parameter, not specific connector items. If the goal was to deprecate only certain connector values, OpenAPI lacks first-class per-enum/value deprecation; consider documenting replacements in the parameter description.Optionally switch the long escaped description to a YAML block scalar for readability.
1004-1010: Operation marked deprecated; add rationale/replacement pointer.Consider adding a brief deprecation reason and link to the replacement operation in
descriptionor anx-deprecation-reasonvendor field for better DX.
1128-1134: Same here—operation-level deprecation is fine.Add a short “Use X instead” note to help consumers migrate.
1198-1204: Consistent deprecation metadata.Looks good; ensure tags/summary in docs flag this as deprecated.
1271-1277: Deprecation status applied.No structural issues spotted. Optional: include a deprecation timeline (e.g., Sunset date) via vendor extension.
1343-1349: OK; consider example hygiene.If
x-fern-examplesstill show usage, add a note that the endpoint is deprecated to discourage new adoption.
7178-7184: Final operation deprecation looks consistent.No further issues. If you have a public changelog, add these deprecations with target removal dates.
📜 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 (4)
src/libs/Cohere/openapi.yaml (4)
168-174: Schema property deprecation is valid; ensure downstream SDKs reflect it.Marking
search_queries_onlyas deprecated at the schema/property level is valid in OAS3. Ensure codegen (e.g., Fern/SDKs) surfaces this as deprecation notices.
1421-1427: LGTM; keep audiences consistent.
x-fern-audiences: [public]withdeprecated: trueis acceptable.
1501-1507: LGTM; verify no stray, similar operations remain unmarked.Run a quick grep to ensure all intended operations were updated.
6623-6629: Validate OpenAPI spec and re-run deprecation scan — previous script failed (ModuleNotFoundError: openapi_spec_validator)The earlier validation aborted because openapi_spec_validator is missing. Re-run validation for src/libs/Cohere/openapi.yaml using one of the options below.
Option A — install and run full OpenAPI v3 validator:
#!/bin/bash set -euo pipefail python -m pip install --user openapi-spec-validator PyYAML python - <<'PY' import yaml,sys from openapi_spec_validator import validate_v3_spec spec_path = "src/libs/Cohere/openapi.yaml" with open(spec_path, "r", encoding="utf-8") as f: spec = yaml.safe_load(f) validate_v3_spec(spec) print("OpenAPI validation: OK") PYOption B — quick checks without installing the validator (YAML parse + schema presence + list deprecated entries):
#!/bin/bash set -euo pipefail python - <<'PY' import yaml,sys spec_path = "src/libs/Cohere/openapi.yaml" try: yaml.safe_load(open(spec_path,"r",encoding="utf-8")) print("YAML parse: OK") except Exception as e: print("YAML parse failed:", e) sys.exit(1) PY rg -nP '^\s*ChatConnector\s*:' src/libs/Cohere/openapi.yaml -C2 || { echo "Missing ChatConnector schema definition?" >&2; exit 1; } echo "Deprecated entries:" rg -n '^\s*deprecated:\s*true\s*$' src/libs/Cohere/openapi.yaml -n -C1 || trueIf this runs in CI, add openapi-spec-validator to the test/dependency list so validation is reproducible in automation.
Summary by CodeRabbit