Skip to content

Refactor: Added Service Layer for EmployeeController #95

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

supalvasani
Copy link

Pull Request Template

Description

Refactored the codebase by extracting business logic from EmployeeController and moving it into a new EmployeeService class. This improves code readability, modularity, and makes the controller more concise and maintainable.

Also updated the controller methods to use service layer methods.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Refactor (non-breaking change that improves code structure)

✅ How Has This Been Tested?

  • Verified all existing endpoints (GET, POST, PUT, DELETE) using Postman.
  • Ensured that API responses remain unchanged after refactoring.
  • Keploy test generation and replay will be done after this PR is reviewed/merged.

🧩 New Additions

  • Integrated Swagger UI for better API documentation and testing.
    • Available at: http://localhost:8080/swagger-ui/index.html

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have tagged the reviewers in a comment below incase my pull request is ready for a review
  • I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command.

@supalvasani
Copy link
Author

Added a service layer to extract business logic from the controller.
Improves maintainability and separation of concerns.
Will add Keploy tests after resolving Java version issues.
Ready for review.

@supalvasani
Copy link
Author

I've fixed the DCO issue and force-pushed the signed commit.
Please review and approve the workflow when convenient. 🙏

@pratik-mahalle
Copy link

Hey @supalvasani, Thank you for raising the pr. Our team will review this pr soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants