-
-
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__post #629
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -303,7 +303,7 @@ paths: | |
| tags: | ||
| - serp | ||
| summary: Serp | ||
| operationId: serp_v1_serp__path__get | ||
| operationId: serp_v1_serp__path__post | ||
| parameters: | ||
| - name: path | ||
| in: path | ||
|
|
@@ -327,7 +327,7 @@ paths: | |
| tags: | ||
| - serp | ||
| summary: Serp | ||
| operationId: serp_v1_serp__path__get | ||
| operationId: serp_v1_serp__path__post | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainPOST operationId rename may be API‑breaking; confirm intent and downstream impact If clients/SDKs rely on operationId, this rename can break generated method names. Proceed only if intentional and coordinated (release notes + SDK regen).
🏁 Script executed: #!/bin/bash
set -euo pipefail
file="src/libs/Jina/openapi.yaml"
if [ ! -f "$file" ]; then
echo "FILE_NOT_FOUND: $file"
exit 0
fi
echo "=== SNIPPET: lines 320-340 of $file ==="
nl -ba "$file" | sed -n '320,340p' || true
echo
echo "=== operationId lines in $file (with 2 lines context) ==="
rg -n -C2 'operationId:' "$file" || true
echo
echo "=== All operationId occurrences in repo (file:line:value) ==="
rg -n --hidden 'operationId:' -S -g '!.git/**' || true
echo
echo "=== Duplicate operationId values across repo (showing >1 occurrences) ==="
python - <<'PY'
import re,glob,os
pat=re.compile(r'operationId:\s*(\S.*)$')
counts={}
locs={}
for path in glob.glob('**/*', recursive=True):
if '.git' in path.split(os.sep):
continue
if not (path.endswith('.yaml') or path.endswith('.yml') or path.endswith('.json')):
continue
try:
with open(path,'r',encoding='utf-8') as fh:
for i,line in enumerate(fh,1):
m=pat.search(line)
if m:
v=m.group(1).strip()
counts[v]=counts.get(v,0)+1
locs.setdefault(v,[]).append(f"{path}:{i}")
except Exception:
pass
dups=[(k,counts[k],locs[k]) for k in counts if counts[k]>1]
if not dups:
print("NO_DUPLICATE_OPERATIONIDs_FOUND")
else:
for k,c,ls in sorted(dups, key=lambda x:-x[1]):
print(f"{c}x {k}")
for l in ls:
print(" "+l)
PY
echo
echo "=== Search for serp_v1_serp__path__post / serp_v1_serp__path__get occurrences ==="
rg -n --hidden 'serp_v1_serp__path__post|serp_v1_serp__path__get' -S -g '!.git/**' || trueLength of output: 3568 Duplicate operationId 'serp_v1_serp__path__post' — fix before merge Both occurrences will break client SDK generation; operationId values must be unique.
🤖 Prompt for AI Agents |
||
| parameters: | ||
| - name: path | ||
| in: path | ||
|
|
||
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
Duplicate and incorrect operationId on GET; must be unique and reflect the HTTP method
Both GET and POST use
serp_v1_serp__path__post. This will collide in client code generation and is misleading for the GET operation. Fix by restoring a unique, method‑appropriate id.Apply:
Run to confirm operationId uniqueness:
🏁 Script executed:
Length of output: 476
Fix duplicate operationId in openapi.yaml — make GET id unique
GET and POST both declare
serp_v1_serp__path__post(duplicate; confirmed). Update the GET operationId to a method-appropriate unique value.File: src/libs/Jina/openapi.yaml (GET operation, around line 306)
📝 Committable suggestion
🤖 Prompt for AI Agents