Commit b5f95db
Bench-173: Aligining Category with API spec (#77)
* BENCH-63 Added MapStruct dependency into the POM
* BENCH-63 Added maven compiler plugin to add MapStruct support to POM
* BENCH-63 Added CategoryMapper interface.
* BENCH-63 Added ItemMapper interface.
* BENCH-63 Added OrderMapper interface
* BENCH-63 Renamed AddOrderRequest.java to OrderRequest.java
* BENCH-63 Integration of MapStruct into service layer.
* BENCH-63 Added update order endpoint, fixed issue relating to get all orders
* BENCH-63 Fixed bug relating to get all orders by adding the fetch type as EAGER, also initialised the status within the zero-argument constructor
* BENCH-63 Added setters as these are required by the MapStruct library to map objects successfully
* BENCH-63 Added unit test.
* BENCH-63 Removed star import to comply with check style
* BENCH-63 Fixed validation bug, reverted back to parameter-level validation
* BENCH-63 Improved readability
* BENCH-36 (WIP) - Refactoring in progress
* BENCH-81 added unit tests for Category
* BENCH-81 adding verification to Category service tests
* BENCH-81 checkstyle fixes
* BENCH-81 fixing category tests
* BENCH-81 updated category tests
* BENCH-63 Improved readability
* BENCH-63 Added unit test to test update order.
* BENCH-63 Updated unit test.
* BENCH-46 @builder added to help with tests, also equal and hashcodes with ToString methods manually added to entities
* BENCH-85: adding logging to different classes (#17)
* BENCH-63 Added MapStruct dependency into the POM
* BENCH-63 Added maven compiler plugin to add MapStruct support to POM
* adding logging to different classes
* BENCH-63 Added CategoryMapper interface.
* BENCH-63 Added ItemMapper interface.
* BENCH-63 Added OrderMapper interface
* BENCH-63 Renamed AddOrderRequest.java to OrderRequest.java
* BENCH-63 Integration of MapStruct into service layer.
* BENCH-63 Added update order endpoint, fixed issue relating to get all orders
* BENCH-63 Fixed bug relating to get all orders by adding the fetch type as EAGER, also initialised the status within the zero-argument constructor
* BENCH-63 Added setters as these are required by the MapStruct library to map objects successfully
* putting a proper annotation for class level
* BENCH-63 Added unit test.
* BENCH-63 Removed star import to comply with check style
* standardizing API code
* reverting test changes
* BENCH-63 Fixed validation bug, reverted back to parameter-level validation
* BENCH-63 Improved readability
* merge conflicts
* merge conflict
* merge conflicts resolution
* reverting test changes
* BENCH-63 Improved readability
* BENCH-63 Added unit test to test update order.
* BENCH-63 Updated unit test.
* enabling lombok with mapstruct
* merge conflicts
* reverting test changes
* merge conflicts
* merge conflict
* merge conflicts resolution
* reverting test changes
* enabling lombok with mapstruct
* merge conflicts
* reverting test changes
* merge resolution
* reverting test changes
Co-authored-by: Martin Taylor <[email protected]>
* BENCH-87 Updated Category and Item controller tests to reflect endpoint naming changes.
* Renamed request mappings to plural
* BENCH-46 Conflicts resolved
* BENCH-87 Updated Category and Item controller tests to reflect endpoint naming changes.
* Updated README to link to Amazon Correto 17
* Bench 85 cleanup (#20)
* cleanup and adding missing spring-security-test
* pom revert
* cleanup
* BENCH-87 Updated Category and Item controller tests to reflect endpoint naming changes.
* Renamed request mappings to plural
* Updated README to link to Amazon Correto 17
* BENCH-87 Updated Category and Item controller tests to reflect endpoint naming changes.
* BENCH-86 order total price added
* BENCH-46 add and remove item functions added to category. also items ignored on json in category request
* BENCH-46 category equals updated to check name not id.
* BENCH-86 Order total price included
* BENCH-86 OrderItem total price updated
* BENCH-86 imports optimized
* BENCH-81: fixing rest endpoint issue (#23)
* fixing rest endpoint issue
* transaction update
* fixing order adding issue (#24)
* BENCH-NONE Added start-answerking.sh script for docker
* fixing persistance loading issues (#25)
* adding jacoco (#26)
* BENCH-69: build workflow (#27)
* build workflow
* change workflow name
* adding jacoco (#26)
* adding cache to speed up build process
* build workflow
* change workflow name
* adding cache to speed up build process
* BENCH-58 Refactored package names, also changed package names from plural to singular as per BENCH-58 description.
* BENCH-58 Fixed PR comment, renamed AnswerkingApplication to AnswerKingApplication and subsequent tests
* BENCH-58-FIX Temporarily removed redundant test agreed with Oleksii, will integrate later when more purpose is added.
* BENCH-58-FIX Removed OrderControllerIT.java as it was empty and served no purpose. Will re-write.
* BENCH-58-FIX Temporarily removed redundant test agreed with Oleksii, will integrate later when more purpose is added.
* BENCH-58-FIX Removed OrderControllerIT.java as it was empty and served no purpose. Will re-write.
* adding docker build pipeline (#31)
* BENCH-108: Bench 108 push images (#32)
* build docker images
* change branch name
* renaming branches
* docker image workflow (#33)
* adjusting repo name (#34)
* BENCH-108: Bench 108 push images4 (#35)
* adjusting repo name
* docker compose push adjustment
* permission change (#37)
* BENCH-108: Bench 108 push images6 (#38)
* permission change
* permission delete
* permission delete
* change log in (#39)
* BENCH-108: Bench 108 push images8 (#40)
* change log in
* adding another push
* BENCH-108: Bench 108 push images9 (#41)
* change log in
* adding another push
* syntax error
* syntax error
* adding repo name (#42)
* push changes (#43)
* docker push config (#45)
* BENCH-125 refactored error responses to RFC-7807 format
* BENCH-125 refactored handling for MethodArgumentNotValidException
* BENCH-125 adding errors & traceId fields to RFC-7807 error responses
* adjusting github repo name (#46)
* repo name update (#47)
* tag image (#48)
* BENCH-108-REFACTORING Refactored build_docker_package.yml as per requirements by Oleksii.
* BENCH-96 Static code analysis added
* BENCH-96 Static code analysis property added
* BENCH-96 java version specified
* BENCH-161 Refactored codebase
* BENCH-161 Fixed README.md
* BENCH-161 Updated CategoryServiceTest
* BENCH-161 Changes reflecting Andrews observations
* BENCH-159: change to be compliant with the latest openapi version (#54)
* change to be compliant with the latest openapi version
* BENCH-161 Refactored codebase
* BENCH-161 Fixed README.md
* change to be compliant with the latest openapi version
* BENCH-161 Updated CategoryServiceTest
* rebase with main
* add permission
* BENCH-161 Changes reflecting Andrews observations
* swagger config changes
* change to be compliant with the latest openapi version
* rebase with main
* rebase conflict
* add permission
* swagger config changes
Co-authored-by: martintaylor1635 <[email protected]>
* adding api tags (#56)
* BENCH-153 Updated SQL files to reflect new retired fields added in models.
* BENCH-153 Created RetirementException to be thrown when dealing with retirements.
* BENCH-153 Added retired field to category
* BENCH-153 Updated CategoryController to reflect changes
* BENCH-153 Added logic to CategoryService and ItemService
* BENCH-153 Updated ItemController to reflect changes
* BENCH-153 Updated unit tests in accordance with the new features
* BENCH-161 Test
* BENCH-161 Test
* BENCH-153 Removed available field from Item, and reflected it thoughout
* BENCH-153 Addressed PR comments from Andrew
* BENCH-153 Addressed PR comments from Andrew
* BENCH-153 Updated RetirementException to reflect 404 not found rather than bad request
* BENCH-153 Refactored RetirementException returning 410 GONE status
* BENCH-153 Refactored Product model, added retired field to constructor
* BENCH-153 Explicitly configured the ProductMapper to default the retired field to false when mapping a ProductRequest to a Product
* BENCH-153 Addressed Andrews PR Comment: relocated constructor in Category model
* BENCH-153 Addressed Andrews PR Comment: renamed local variable name within retireProduct in ProductService
* BENCH-153 Addressed Andrews PR Comment: I would also suggest searching the codebase for any strings matching 'available' and see if there are any other ones we've missed
* BENCH-153 Addressed Andrews PR Comment: Was this a mistake with the rebase? Seems a bit sparse
* BENCH-56 v2 academy package removed.
* BENCH-108-REFACTORING Refactored build_docker_package.yml as per requirements by Oleksii.
* BENCH-108-REFACTORING Added the develop branc
* BENCH-108-REFACTORING Added the master branch
* BENCH-108-REFACTORING Added develop branch to the build_integration_and_code_analysis.yml workflow
* Dependabot Yaml Set Up
* Automatically approve dependabot pull requests
* Updated package-ecosystem to Maven
* Bump springdoc-openapi-maven-plugin from 0.2 to 1.4
Bumps [springdoc-openapi-maven-plugin](https://github.com/springdoc/springdoc-openapi-maven-plugin) from 0.2 to 1.4.
- [Release notes](https://github.com/springdoc/springdoc-openapi-maven-plugin/releases)
- [Commits](springdoc/springdoc-openapi-maven-plugin@v0.2...v1.4)
---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <[email protected]>
* Added github-actions ecosystem to dependabot.yml
* Bump dependabot/fetch-metadata from 1.1.1 to 1.3.5
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.1.1 to 1.3.5.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](dependabot/fetch-metadata@v1.1.1...v1.3.5)
---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected]>
* Bump actions/cache from 1 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v1...v3)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <[email protected]>
* BENCH-108-REFACTORING Refactored build_docker_package.yml as per requirements by Oleksii.
* BENCH-108-REFACTORING Added the develop branc
* BENCH-108-REFACTORING Added the master branch
* BENCH-108-REFACTORING Added develop branch to the build_integration_and_code_analysis.yml workflow
* Bump maven-wrapper-plugin from 3.1.0 to 3.1.1 (#60)
Bumps [maven-wrapper-plugin](https://github.com/apache/maven-wrapper) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/apache/maven-wrapper/releases)
- [Commits](apache/maven-wrapper@maven-wrapper-parent-3.1.0...maven-wrapper-3.1.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-wrapper-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* BENCH-108-REFACTORING Refactored build_docker_package.yml as per requirements by Oleksii.
* BENCH-108-REFACTORING Added the develop branc
* BENCH-108-REFACTORING Added the master branch
* BENCH-108-REFACTORING Added develop branch to the build_integration_and_code_analysis.yml workflow
* Added github.actor check to dependabot workflow
* sonar key update to project name.
* github action checkout updated to v3
* Updated dependabot.yml pull request limit + prefix
* BENCH-174 Added get category by ID endpoint
* BENCH-172 Created NameUnavailableException and ProductAlreadyPresentException
* BENCH-172 Updated services to reflect changes
* BENCH-172 Updated tests to reflect changes
* BENCH-148 Refactored SecurityConfig and added dependency for Snake YAML
* BENCH-148 Fixed checkstyle complaints
* BENCH-148 Added scope to POM dependency
* Replaced primitive longs with Wrapper Class Longs
* adding missing fields as per API spec
* adding missing fields as per API spec
* BENCH-179 Updated the MySQL dependency within the POM
* BENCH-180 Refactored Spring Security Config and resolved warnings
* BENCH-180 Addressed checkstyle warnings
* test adjustments
* test adjustments
* small method optimization
* small method optimization
* adding missing fields as per API spec
* adding missing fields as per API spec
* test adjustments
* test adjustments
* small method optimization
* small method optimization
* BENCH-184 getting order 500 error fixed on all endpoints.
* BENCH-162 Updated status codes for create product and category
* BENCH-162 Reflected changes within tests
* BENCH-185 Refactored Dockerfile, removed maintainer reference and switched to corretto image
* BENCH-185 Created a batch script from Windows users to initialise Docker
* BENCH-185 Updated bash script to initialise Docker
* BENCH-185 Updated bash and batch script
* BENCH-185 Updated bash script, changed operations order
* BENCH-185 Overridden the banner for startup
* adding more swagger docs (#80)
* adding missing fields as per API spec
* adding missing fields as per API spec
* test adjustments
* test adjustments
* small method optimization
* small method optimization
* rebase with main
* rebase with main
* rebase with main
* rebase with main
* adding full stops
* adding full stops
* BENCH-184 made removing item from basket transactional
* added missed final
* adding missing fields as per API spec
* test adjustments
* small method optimization
* rebase with main
* rebase with main
* rebase
* rebase
* rebase
* rebase
* rebase
* adding full stops
* added missed final
* rebase
* rebase
* rebase with main
* rebase with main
* rebase
* rebase
* rebase
* removing empty lines
* rebase
* rebase with main
* rebase with main
* rebase
* rebase
* added missed final
* rebase
* rebase with main
* rebase with main
* rebase
* rebase
* rebase
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Martin Taylor <[email protected]>
Co-authored-by: Andy Flint <[email protected]>
Co-authored-by: AudriusPutys <[email protected]>
Co-authored-by: AndyFlintAnswerDigital <[email protected]>
Co-authored-by: MohammadIqbalAD <[email protected]>
Co-authored-by: AudriusPutys <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MohammadIqbalAD <[email protected]>1 parent f310976 commit b5f95db
File tree
8 files changed
+79
-33
lines changed- src
- main
- java/com/answerdigital/answerking
- config
- controller
- mapper
- model
- resources
- test/java/com/answerdigital/answerking/controller
8 files changed
+79
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 13 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 48 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
68 | 59 | | |
| 60 | + | |
69 | 61 | | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | | - | |
| 14 | + | |
10 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
12 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
13 | 28 | | |
14 | 29 | | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
60 | 75 | | |
61 | 76 | | |
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
67 | 86 | | |
68 | 87 | | |
69 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| |||
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| |||
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
| 143 | + | |
131 | 144 | | |
132 | 145 | | |
133 | 146 | | |
| |||
0 commit comments