feat: Add Author class and AuthorController #26
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 primarily introduces a new feature to the
devopsknowledgeshareapi
application: the ability to handleAuthor
objects. This includes the creation of theAuthor
class, anAuthorService
to manageAuthor
objects, and anAuthorController
to handle HTTP requests related toAuthor
objects. Additionally, a unit test for theAuthorController
was added, and a small modification was made to thePost
class to improve error messaging.New feature - Handling of
Author
objects:src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/Author.java
: A newAuthor
class was introduced, which includesfirstName
andlastName
as attributes.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorService.java
: AnAuthorService
class was added, which currently includes a stub for a method to get all authors.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorController.java
: AnAuthorController
class was introduced, which includes agetAuthors
method to handle HTTP GET requests at the/authors
endpoint.Testing:
src/test/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorControllerTest.java
: A unit test for theAuthorController
was added, which tests the HTTP GET request at the/authors
endpoint.Improvement to existing code:
src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/Post.java
: The error message in thesetLink
method was improved to include the invalid link.