wip: swagger
This commit is contained in:
27
src/main/java/fr/titionfire/PingPage.java
Normal file
27
src/main/java/fr/titionfire/PingPage.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package fr.titionfire;
|
||||
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import org.eclipse.microprofile.openapi.annotations.Operation;
|
||||
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
|
||||
import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
|
||||
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
|
||||
|
||||
@Tag(name = "Ping API", description = "API pour tester la connectivité")
|
||||
@Path("/api")
|
||||
public class PingPage {
|
||||
|
||||
@Operation(summary = "Renvoie un message de réussite", description = "Cette méthode renvoie un message de réussite si la connexion est établie avec succès.")
|
||||
@APIResponses(value = {
|
||||
@APIResponse(responseCode = "200", description = "Réussite")
|
||||
})
|
||||
@GET
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
public Response get() {
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user