Skip to content

Conversation

@ekgns33
Copy link
Contributor

@ekgns33 ekgns33 commented Jul 9, 2025

작업내역

  • SignupResponse에 egg_id 추가
  • 테스트코드 수정

Summary by CodeRabbit

  • New Features

    • Signup responses now include an additional egg ID field, providing more detailed information after registration.
  • Tests

    • Updated signup tests to verify the presence of the new egg ID field in the response.

@ekgns33 ekgns33 self-assigned this Jul 9, 2025
@ekgns33 ekgns33 added the bug Something isn't working label Jul 9, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 9, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between cdb9ea4 and 88bbe15.

📒 Files selected for processing (1)
  • src/test/java/org/runimo/runimo/user/api/UserItemAcceptanceTest.java (1 hunks)

Walkthrough

A new field, eggId, was added to the SignupUserResponse record to provide additional egg-related information in signup responses. Associated constructors and tests were updated to handle and verify the inclusion of the new eggId field in both the response payload and test assertions.

Changes

File(s) Change Summary
src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.java Added eggId field to the record and updated the constructor to initialize it from greetingEgg.
src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java Added assertion to verify the presence and non-null value of egg_id in the signup response.
src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java Updated test constructor calls to include the new eggId argument for SignupUserResponse.

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.)
Loading

Possibly related PRs

  • Run-Us/Runimo#106: Adds a String eggCode field to SignupUserResponse, which is related as both PRs expand egg-related information in the signup response.

Suggested labels

:rocket: feature :rocket:, size/M

Suggested reviewers

  • ekgns33

Poem

A bunny hopped with code in tow,
To add an eggId, nice and slow.
Now signups bring an extra treat,
With eggs and codes, the change is neat!
Testers cheer, the fields align—
In every signup, eggs now shine! 🥚✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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 the egg_id field. 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_id field 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 SignupUserResponse constructor by including the eggId parameter with value 1L.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e38fd2 and cdb9ea4.

📒 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 eggId field is properly added to the record structure alongside the existing eggCode field.


27-28: LGTM! Constructor correctly populates the new eggId field.

The constructor properly maps greetingEgg.getId() to the new eggId field, ensuring the egg ID is included in the response as intended.


14-15: LGTM! Clean addition of the eggId field.

The new eggId field is properly positioned and typed, maintaining consistency with the existing structure.


14-15: LGTM! Clean addition of the eggId field.

The new eggId field complements the existing eggCode field 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 new eggId field, 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_id field 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_id field 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 eggId parameter (1L) in the SignupUserResponse constructor, 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 eggId parameter (1L) in the SignupUserResponse constructor, maintaining test compatibility with the extended record structure.


154-163: LGTM! Test mock updated correctly.

The SignupUserResponse constructor call now includes the required eggId parameter. Using 1L as a hardcoded value is appropriate for unit testing.


194-203: LGTM! Consistent test mock update.

The constructor call properly includes the eggId parameter, maintaining consistency with the other test update.


160-161: Constructor update correctly includes the new eggId parameter.

The test properly accommodates the updated SignupUserResponse constructor by including the eggId parameter with value 1L.

Comment on lines +27 to +28
eggCode,
greetingEgg.getId()
Copy link

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 -10

Length 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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 9, 2025

@ekgns33 ekgns33 merged commit 23fea0e into main Jul 9, 2025
3 checks passed
@ekgns33 ekgns33 deleted the fix/add-egg_id-to-response branch July 9, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants