-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Set /v1/serp/{path} operationId to serp_v1_serp__path__post #625
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
WalkthroughOpenAPI spec update: for /v1/serp/{path}, both GET and POST operationId values are set to serp_v1_serp__path__post. No changes to parameters, responses, path definitions, or error handling. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathPostResponse.Json.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathPostResponse.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathPostResponse2.Json.g.csis excluded by!**/generated/**src/libs/Jina/Generated/Jina.Models.SerpV1SerpPathPostResponse2.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__get | ||
| operationId: serp_v1_serp__path__post |
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
operationId collision: GET must not reuse POST’s operationId
GET currently uses serp_v1_serp__path__post, duplicating POST. OpenAPI requires unique operationId per operation; this breaks many client generators and tooling. Rename GET’s operationId to serp_v1_serp__path__get to restore uniqueness and match the convention used elsewhere in the spec.
Apply this diff:
@@
- operationId: serp_v1_serp__path__post
+ operationId: serp_v1_serp__path__getRun to detect any remaining duplicates:
Also applies to: 330-330
🏁 Script executed:
#!/bin/bash
rg -n 'operationId:\s*' src/libs/Jina/openapi.yaml | awk 'match($0,/operationId:\s*([^\s]+)/,a){print a[1]}' | sort | uniq -cdLength of output: 9
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="src/libs/Jina/openapi.yaml"
if [ ! -f "$file" ]; then
echo "File not found: $file" >&2
exit 1
fi
echo "=== operationId occurrences (value : file:line) ==="
awk 'match($0,/operationId:[[:space:]]*([^[:space:]]+)/,a){print a[1] " : " FILENAME ":" FNR}' "$file" | sort
echo
echo "=== duplicate operationId counts ==="
awk 'match($0,/operationId:[[:space:]]*([^[:space:]]+)/,a){print a[1]}' "$file" | sort | uniq -cd
echo
echo "=== full lines where operationId appears ==="
awk 'match($0,/operationId:[[:space:]]*([^[:space:]]+)/,a){print FILENAME ":" FNR ":" $0}' "$file"
echo
echo "=== context for duplicated operationIds ==="
for id in $(awk 'match($0,/operationId:[[:space:]]*([^[:space:]]+)/,a){print a[1]}' "$file" | sort | uniq -d); do
echo
echo "----- DUPLICATE: $id -----"
rg -n -C3 "operationId:\\s*$id" "$file" || true
doneLength of output: 2783
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="src/libs/Jina/openapi.yaml"
if [ ! -f "$file" ]; then
echo "File not found: $file" >&2
exit 1
fi
awk 'match($0,/operationId:[[:space:]]*([^[:space:]]+)/,a){print FNR ":" a[1]}' "$file" | sort -n | while IFS=: read -r ln id; do
start=$((ln-6)); if [ $start -lt 1 ]; then start=1; fi
end=$((ln+6))
echo "----- $file lines $start-$end (operationId: $id at line $ln) -----"
sed -n "${start},${end}p" "$file"
echo
doneLength of output: 6824
operationId collision — rename GET's operationId to serp_v1_serp__path__get
GET at '/v1/serp/{path}' (src/libs/Jina/openapi.yaml:306) reuses the POST operationId (line 330); rename the GET operationId to restore uniqueness.
Apply this diff:
@@
- operationId: serp_v1_serp__path__post
+ operationId: serp_v1_serp__path__get📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| operationId: serp_v1_serp__path__post | |
| operationId: serp_v1_serp__path__get |
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around line 306, the GET operationId currently
duplicates the POST operationId (serp_v1_serp__path__post); change the GET
operationId to a unique name such as serp_v1_serp__path__get to restore
uniqueness, and update any internal references or client generation mappings
that expect the old name so they point to the new operationId.
Summary by CodeRabbit