feat: add controller endpoint functionality. #30
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.
This pull request introduces several new features and enhancements to the
devopsknowledgeshareapi
project, including new endpoints, a new entity, and corresponding tests. The most important changes include the addition of theAuthor
entity and its controller, enhancements to thePost
entity and its controller, and new test cases for the controllers and entities.New Features:
src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/Author.java
: Added theAuthor
entity withid
andname
fields, along with their getters and setters.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorController.java
: CreatedAuthorController
with a/authors
endpoint to return a list of authors.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/InfoController.java
: AddedInfoController
with a/info
endpoint that returns a welcome message.Enhancements to Existing Features:
src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/Post.java
: AddeddateUpdated
field with corresponding getter and setter methods.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/PostController.java
: Introduced new endpoints inPostController
to filter posts by title, first name, and link. Also added aPUT
endpoint to update posts.Tests:
src/test/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorControllerTest.java
: Added tests forAuthorController
to verify the/authors
endpoint.src/test/java/com/liatrio/dojo/devopsknowledgeshareapi/PostTest.java
: Added tests for the newdateUpdated
field in thePost
entity.Miscellaneous:
src/functionalTest/java/com/liatrio/dojo/devopsknowledgeshareapi/InfoControllerTest.java
: Commented out theInfoControllerTest
class.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/PostRepository.java
: Added methods toPostRepository
to find posts by title, first name, and link.