Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Jul 31, 2024
1 parent a7edc61 commit 70efe52
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
18 changes: 18 additions & 0 deletions server/application-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
<version>2.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.therapi</groupId>
<artifactId>therapi-runtime-javadoc</artifactId>
<version>0.15.0</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -148,6 +153,19 @@
<outputDir>.</outputDir>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.github.therapi</groupId>
<artifactId>therapi-runtime-javadoc-scribe</artifactId>
<version>0.15.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class Hello {
private Long id;

/**
* The timestamp indicating when the Hello entity was created.
* The timestamp of when the Hello entity was created.
* This field is mandatory.
*/
@Column(nullable = false)
private Instant timestamp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public HelloController(HelloService helloService) {
}

/**
* Handles GET requests for retrieving all Hello entities.
* Retrieves all {@link Hello} entities.
*
* @return a list of all Hello entities
* @return A list of all Hello entities
*/
@GetMapping
public List<Hello> getAllHellos() {
return helloService.getAllHellos();
}

/**
* Handles POST requests for creating a new Hello entity.
* Creates a new {@link Hello} entity with the current timestamp.
*
* @return the newly created Hello entity
* @return The created Hello entity
*/
@PostMapping
public Hello addHello() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public HelloService(HelloRepository helloRepository) {
}

/**
* Retrieves all Hello entities from the repository.
* Retrieves all {@link Hello} entities from the repository.
*
* @return a list of all Hello entities
* @return A list of all Hello entities
*/
public List<Hello> getAllHellos() {
var hellos = helloRepository.findAll();
Expand All @@ -30,9 +30,9 @@ public List<Hello> getAllHellos() {
}

/**
* Creates and saves a new Hello entity with the current timestamp.
* Creates a new {@link Hello} entity with the current timestamp and saves it to the repository.
*
* @return the newly created Hello entity
* @return The created Hello entity
*/
public Hello addHello() {
Hello hello = new Hello();
Expand Down

0 comments on commit 70efe52

Please sign in to comment.