Claudia Sebestin - Backend take home assignment #295
Open
Clusi wants to merge 6 commits intoTekmetric:masterfrom
Open
Claudia Sebestin - Backend take home assignment #295Clusi wants to merge 6 commits intoTekmetric:masterfrom
Clusi wants to merge 6 commits intoTekmetric:masterfrom
Conversation
…al exception handling
…onfig. Adapt exising controller tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation description
This backend provides a Spring Boot REST API that implements CRUD operations for a single domain object (
RepairOrder) persisted in an in-memory H2 database. The API supports:POST /api/repair-orders(create)GET /api/repair-orders/{id}andGET /api/repair-orders(read single + list)PUT /api/repair-orders/{id}(update)DELETE /api/repair-orders/{id}(delete)Technologies used
4.0.3) with Spring Web, Spring Data JPA, Validation, Spring Security, Actuator, and Springdoc OpenAPI25)ddl-autodisabled so schema is not generated implicitly)src/main/resources/db/migration)src/main/resources/database/data.sqlUpgrades performed
ApiErrorDto)@EnableMethodSecurity+@PreAuthorize)@Versionto prevent lost updates/api/repair-orders/**Architecture principles applied
Resource/Controller(HTTP) ->Service(use cases/transactions) ->Repository(data access) -> JPAEntityPostman collection (manual API testing)
A Postman collection is included to test the full
/api/repair-ordersflow end-to-end:backend/repair-order.postman_collection.jsonTo run it:
Importthe collection JSON file "repair-order.postman_collection.json".3Run the request group named
Scenario Runner (Admin Create -> User Checks -> Admin Delete):Run(Collection Runner) and set iterations to1.postman.setNextRequest(...)to execute steps in sequence.