feat: swagger

This commit is contained in:
2024-07-20 09:12:50 +02:00
parent b3bfb7e267
commit cc00da4e5e
17 changed files with 151 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ package fr.titionfire.ffsaf.utils;
import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.Data;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
@@ -9,9 +10,13 @@ import java.util.List;
@Data
@RegisterForReflection
public class PageResult<T> {
@Schema(description = "Le numéro de la page courante.", example = "1")
private int page;
@Schema(description = "Le nombre d'éléments par page.", example = "10")
private int page_size;
@Schema(description = "Le nombre total de pages.", example = "5")
private int page_count;
@Schema(description = "Le nombre total d'éléments.", example = "47")
private long result_count;
private List<T> result = new ArrayList<>();
}