-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix / add egg-id to response] - 빠진 egg-id 응답에 추가 #111
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
|
Warning Rate limit exceeded@ekgns33 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 40 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughA new field, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AuthController
participant SignupService
participant EggService
Client->>AuthController: POST /signup
AuthController->>SignupService: signup(request)
SignupService->>EggService: createGreetingEgg()
EggService-->>SignupService: Egg (with id and code)
SignupService-->>AuthController: SignupUserResponse (includes eggId and eggCode)
AuthController-->>Client: Response (egg_id, egg_code, etc.)
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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
🧹 Nitpick comments (3)
src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java (2)
103-129: Consider adding egg_id assertion to other signup tests.The test
회원가입_시_애정포인트_10_지급also performs signup but doesn't verify theegg_idfield. For consistency, consider adding the same assertion to ensure comprehensive test coverage.given() .contentType(ContentType.MULTIPART) .multiPart("request", objectMapper.writeValueAsString(request)) .when() .post("/api/v1/auth/signup") .then() .statusCode(HttpStatus.CREATED.value()) .log().all() .body("payload.nickname", equalTo("username")) .body("payload.token_pair.access_token", notNullValue()) .body("payload.token_pair.refresh_token", notNullValue()) + .body("payload.egg_id", notNullValue()) .extract()
98-99: Good addition of egg_id validation in acceptance test.The assertion correctly verifies that the new
egg_idfield is present and non-null in the signup response, ensuring the API contract is maintained.Consider enhancing the test to verify the actual egg ID value for more comprehensive validation:
.body("payload.token_pair.refresh_token", notNullValue()) -.body("payload.egg_id", notNullValue()); +.body("payload.egg_id", notNullValue()) +.body("payload.egg_id", equalTo(1));src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java (1)
200-201: Constructor update correctly includes the new eggId parameter.The test properly accommodates the updated
SignupUserResponseconstructor by including theeggIdparameter with value1L.Consider using different egg ID values across test cases to better represent varied scenarios:
"example_egg_url", "ECODE", -1L +2L // Different value for this test case
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.java(2 hunks)src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java(1 hunks)src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java(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: Build and analyze
🔇 Additional comments (12)
src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.java (5)
14-15: LGTM! Clean addition of eggId field to the response.The new
eggIdfield is properly added to the record structure alongside the existingeggCodefield.
27-28: LGTM! Constructor correctly populates the new eggId field.The constructor properly maps
greetingEgg.getId()to the neweggIdfield, ensuring the egg ID is included in the response as intended.
14-15: LGTM! Clean addition of the eggId field.The new
eggIdfield is properly positioned and typed, maintaining consistency with the existing structure.
14-15: LGTM! Clean addition of the eggId field.The new
eggIdfield complements the existingeggCodefield appropriately, providing both the code and ID for egg-related information in the response.
27-28: Constructor correctly maps the greeting egg ID.The constructor properly passes
greetingEgg.getId()to the neweggIdfield, maintaining consistency with the existing pattern of extracting egg properties.src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java (2)
98-99: LGTM! Proper acceptance test coverage for the new eggId field.The test correctly verifies that the
egg_idfield is present and not null in the signup response payload, ensuring end-to-end coverage of the new field.
98-99: Good addition of egg_id validation.The assertion correctly verifies that the new
egg_idfield is present and not null in the response.src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java (5)
160-161: LGTM! Test properly updated for the new eggId field.The test correctly includes the new
eggIdparameter (1L) in theSignupUserResponseconstructor, maintaining test compatibility with the extended record structure.
200-201: LGTM! Test properly updated for the new eggId field.The test correctly includes the new
eggIdparameter (1L) in theSignupUserResponseconstructor, maintaining test compatibility with the extended record structure.
154-163: LGTM! Test mock updated correctly.The
SignupUserResponseconstructor call now includes the requiredeggIdparameter. Using1Las a hardcoded value is appropriate for unit testing.
194-203: LGTM! Consistent test mock update.The constructor call properly includes the
eggIdparameter, maintaining consistency with the other test update.
160-161: Constructor update correctly includes the new eggId parameter.The test properly accommodates the updated
SignupUserResponseconstructor by including theeggIdparameter with value1L.
| eggCode, | ||
| greetingEgg.getId() |
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
❓ Verification inconclusive
Verify the API response structure is documented.
The constructor correctly passes the egg ID from the domain object. Ensure that the new egg_id field is properly documented in your API documentation for client consumers.
🏁 Script executed:
#!/bin/bash
# Check if there are any API documentation files that need to be updated
fd -e yaml -e json -e md | xargs grep -l -i "signup.*response\|eggcode" | head -10Length of output: 84
Let’s broaden the search to catch both egg_id and eggId, and also look for any direct mentions of SignupUserResponse in your docs:
🏁 Script executed:
#!/bin/bash
# Search for 'egg_id' or 'eggId' in documentation files
fd -e yaml -e yml -e json -e md | xargs grep -i -l "egg[_]?id"
# Search for any references to the DTO name in documentation
fd -e yaml -e yml -e json -e md | xargs grep -i -l "SignupUserResponse"Length of output: 136
Document the new egg_id field in your API docs
The SignupUserResponse DTO now includes an egg_id property, but it isn’t referenced in any existing API documentation. Please update your docs so client teams know to expect this field.
• In your OpenAPI/Swagger spec (e.g. api.yaml or openapi.yml), add egg_id under the signup response schema.
• Update any Markdown reference guides (e.g. docs/, README.md) that describe the signup endpoint.
• If you have other formats (Asciidoc, JSON examples, etc.), ensure they include the new field.
🤖 Prompt for AI Agents
In src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.java
around lines 27 to 28, the new egg_id field added to the DTO is not documented
in the API specs. Update the OpenAPI/Swagger specification file (such as
api.yaml or openapi.yml) to include egg_id in the signup response schema. Also,
revise any Markdown documentation files like those in docs/ or README.md that
describe the signup endpoint to mention this field. Additionally, ensure any
other documentation formats or example files reflect the inclusion of egg_id.
|



작업내역
Summary by CodeRabbit
New Features
Tests