-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Set GET/POST /v1/serp/{path} operationId to serp_v1_serp__path__get #545
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
Conversation
WalkthroughThe OpenAPI spec in src/libs/Jina/openapi.yaml updates operationId values for the /v1/serp/{path} GET and POST methods, setting both to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (4)
src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathGetResponse.Json.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathGetResponse.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathGetResponse2.Json.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathGetResponse2.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Jina/openapi.yaml(2 hunks)
| - serp | ||
| summary: Serp | ||
| operationId: serp_v1_serp__path__post | ||
| operationId: serp_v1_serp__path__get |
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.
💡 Verification agent
🧩 Analysis chain
Duplicate operationId for GET and POST violates OpenAPI’s uniqueness rule
Both operations use serp_v1_serp__path__get, which will break client/server codegen and tooling that expects unique operationIds.
Apply this diff to the POST operation:
- operationId: serp_v1_serp__path__get
+ operationId: serp_v1_serp__path__postRun this script to verify operationId uniqueness across the spec:
Also applies to: 330-330
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="src/libs/Jina/openapi.yaml"
python - <<'PY'
import sys, yaml, collections
p = yaml.safe_load(open("src/libs/Jina/openapi.yaml"))
dups = []
seen = {}
ops = ("get","put","post","delete","options","head","patch","trace")
for path, item in (p.get("paths") or {}).items():
for m in ops:
op = item.get(m)
if not isinstance(op, dict): continue
oid = op.get("operationId")
if not oid: continue
if oid in seen:
dups.append((oid, seen[oid], (path, m)))
else:
seen[oid]=(path,m)
if dups:
print("Duplicate operationIds found:")
for oid,(p1,m1),(p2,m2) in dups:
print(f" {oid}: {m1.upper()} {p1} <-> {m2.upper()} {p2}")
sys.exit(1)
print("OK: All operationIds are unique.")
PYLength of output: 168
Fix duplicate operationId for POST /v1/serp/{path}
Rename the POST operationId from serp_v1_serp__path__get to serp_v1_serp__path__post to ensure uniqueness:
- operationId: serp_v1_serp__path__get
+ operationId: serp_v1_serp__path__postApply at src/libs/Jina/openapi.yaml around lines 306 and 330.
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around lines 306 and 330, the POST operation
currently has a duplicate operationId "serp_v1_serp__path__get"; update the POST
operationId to "serp_v1_serp__path__post" (or another unique, consistent name)
so it no longer collides with the GET operationId, ensuring both endpoints have
unique operationId values and preserving OpenAPI naming conventions.
Summary by CodeRabbit
Documentation
Refactor