-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Set GET/POST operationId /v1/serp/{path} to serp_v1_serp__path__post #586
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 specification at src/libs/Jina/openapi.yaml updates operationId values for the /v1/serp/{path} endpoint, setting both GET and POST operations to serp_v1_serp__path__post. No other fields in the spec are modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Pre-merge checks (1 passed, 2 warnings)❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
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. 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)
⏰ 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
| - 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.
💡 Verification agent
🧩 Analysis chain
Duplicate operationId for GET/POST /v1/serp/{path} will break client generation
operationId must be unique per operation. GET currently reuses the POST id. Set a distinct GET id to restore uniqueness.
Apply:
- operationId: serp_v1_serp__path__post
+ operationId: serp_v1_serp__path__getOptional: add a CI check to catch this in the future.
Also applies to: 330-330
🏁 Script executed:
#!/bin/bash
# Fail on duplicate operationIds
awk '/operationId:/ {print $2}' src/libs/Jina/openapi.yaml | sort | uniq -d | grep . && { echo "Duplicate operationId found"; exit 1; } || echo "OK"Length of output: 52
Fix duplicate operationId for GET /v1/serp/{path}
The GET and POST operations both use operationId: serp_v1_serp__path__post (lines 306 & 330), which breaks client generation. Update the GET entry to restore uniqueness:
--- a/src/libs/Jina/openapi.yaml
+++ b/src/libs/Jina/openapi.yaml
@@ -330,7 +330,7 @@
summary: Retrieve a SERP result by path
tags:
- serp
- operationId: serp_v1_serp__path__post
+ operationId: serp_v1_serp__path__get
parameters:
- name: path
in: path📝 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 | |
| summary: Retrieve a SERP result by path | |
| tags: | |
| - serp | |
| operationId: serp_v1_serp__path__get | |
| parameters: | |
| - name: path | |
| in: path |
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around line 306, the GET operation for
/v1/serp/{path} incorrectly reuses operationId "serp_v1_serp__path__post";
change that operationId to a unique name (e.g., "serp_v1_serp__path__get") so it
no longer duplicates the POST entry, and ensure any references or generated
client mappings that expect the GET operationId are updated accordingly.
Summary by CodeRabbit