feat: swagger
This commit is contained in:
@@ -7,48 +7,62 @@ import fr.titionfire.ffsaf.utils.RoleAsso;
|
||||
import jakarta.ws.rs.FormParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import lombok.Getter;
|
||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||
import org.jboss.resteasy.reactive.PartType;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
public class FullMemberForm {
|
||||
@Schema(description = "L'identifiant du membre.", example = "1")
|
||||
@FormParam("id")
|
||||
private String id = null;
|
||||
|
||||
@Schema(description = "Le nom du membre.", example = "Dupont")
|
||||
@FormParam("lname")
|
||||
private String lname = null;
|
||||
|
||||
@Schema(description = "Le prénom du membre.", example = "Jean")
|
||||
@FormParam("fname")
|
||||
private String fname = null;
|
||||
|
||||
@Schema(description = "La catégorie du membre.", example = "SENIOR")
|
||||
@FormParam("categorie")
|
||||
private Categorie categorie = null;
|
||||
|
||||
@Schema(description = "L'identifiant du club du membre.", example = "1")
|
||||
@FormParam("club")
|
||||
private Long club = null;
|
||||
|
||||
@Schema(description = "Le genre du membre.", example = "H")
|
||||
@FormParam("genre")
|
||||
private Genre genre;
|
||||
|
||||
@Schema(description = "Le numéro de licence du membre.", example = "12345")
|
||||
@FormParam("licence")
|
||||
private int licence;
|
||||
|
||||
@Schema(description = "Le pays du membre.", example = "FR")
|
||||
@FormParam("country")
|
||||
private String country;
|
||||
|
||||
@Schema(description = "La date de naissance du membre.")
|
||||
@FormParam("birth_date")
|
||||
private Date birth_date = null;
|
||||
|
||||
@Schema(description = "L'adresse e-mail du membre.", example = "jean.dupont@example.com")
|
||||
@FormParam("email")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "Le rôle du membre dans l'association.", example = "MEMBRE")
|
||||
@FormParam("role")
|
||||
private RoleAsso role;
|
||||
|
||||
@Schema(description = "Le grade d'arbitrage du membre.", example = "ASSESSEUR")
|
||||
@FormParam("grade_arbitrage")
|
||||
private GradeArbitrage grade_arbitrage;
|
||||
|
||||
@Schema(description = "La photo du membre.")
|
||||
@FormParam("photo_data")
|
||||
@PartType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
private byte[] photo_data = new byte[0];
|
||||
|
||||
@@ -3,22 +3,28 @@ package fr.titionfire.ffsaf.rest.from;
|
||||
import jakarta.ws.rs.FormParam;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||
|
||||
@Getter
|
||||
@ToString
|
||||
public class LicenceForm {
|
||||
@FormParam("id")
|
||||
@Schema(description = "L'identifiant de la licence. (-1 si nouvelle demande de licence)", required = true)
|
||||
private long id;
|
||||
|
||||
@FormParam("membre")
|
||||
@Schema(description = "L'identifiant du membre.", example = "1", required = true)
|
||||
private long membre;
|
||||
|
||||
@FormParam("saison")
|
||||
@Schema(description = "La saison de la licence.", example = "2025", required = true)
|
||||
private int saison;
|
||||
|
||||
@FormParam("certificate")
|
||||
@Schema(description = "Nom du médecin sur certificat médical.", example = "M. Jean", required = true)
|
||||
private String certificate = null;
|
||||
|
||||
@FormParam("validate")
|
||||
@Schema(description = "Licence validée (seuls les admin pourrons enregistrer cette valeur)", example = "true", required = true)
|
||||
private boolean validate;
|
||||
}
|
||||
|
||||
@@ -3,19 +3,24 @@ package fr.titionfire.ffsaf.rest.from;
|
||||
import jakarta.ws.rs.FormParam;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||
|
||||
@Getter
|
||||
@ToString
|
||||
public class MemberPermForm {
|
||||
@Schema(description = "Indique si le membre est un administrateur de la fédération.", example = "false", required = true)
|
||||
@FormParam("federation_admin")
|
||||
private boolean federation_admin;
|
||||
|
||||
@Schema(description = "Indique si le membre est un utilisateur SAFCA.", example = "false", required = true)
|
||||
@FormParam("safca_user")
|
||||
private boolean safca_user;
|
||||
|
||||
@Schema(description = "Indique si le membre peut créer des compétitions sur SAFCA.", example = "false", required = true)
|
||||
@FormParam("safca_create_compet")
|
||||
private boolean safca_create_compet;
|
||||
|
||||
@Schema(description = "Indique si le membre est un super administrateur SAFCA.", example = "false", required = true)
|
||||
@FormParam("safca_super_admin")
|
||||
private boolean safca_super_admin;
|
||||
}
|
||||
|
||||
@@ -3,25 +3,32 @@ package fr.titionfire.ffsaf.rest.from;
|
||||
import jakarta.ws.rs.FormParam;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||
|
||||
@ToString
|
||||
@Getter
|
||||
public class PartClubForm {
|
||||
@FormParam("id")
|
||||
@Schema(description = "Identifiant du club", example = "1", required = true)
|
||||
private String id = null;
|
||||
|
||||
@FormParam("contact")
|
||||
@Schema(description = "Les contacts du club", example = "{\"SITE\": \"www.test.com\", \"COURRIEL\": \"test@test.com\"}", required = true)
|
||||
private String contact = null;
|
||||
|
||||
@FormParam("training_location")
|
||||
@Schema(description = "Liste des lieux d'entraînement", example = "[{\"text\":\"addr 1\",\"lng\":2.24654,\"lat\":52.4868658},{\"text\":\"addr 2\",\"lng\":2.88654,\"lat\":52.7865456}]", required = true)
|
||||
private String training_location = null;
|
||||
|
||||
@FormParam("training_day_time")
|
||||
@Schema(description = "Liste des jours et horaires d'entraînement (jours 0-6, 0=>lundi) (temps en minute depuis 00:00, 122=>2h02)", example = "[{\"day\":0,\"time_start\":164,\"time_end\":240},{\"day\":3,\"time_start\":124,\"time_end\":250}]", required = true)
|
||||
private String training_day_time = null;
|
||||
|
||||
@FormParam("contact_intern")
|
||||
@Schema(description = "Contact interne du club", example = "john.doe@test.com")
|
||||
private String contact_intern = null;
|
||||
|
||||
@FormParam("address")
|
||||
@Schema(description = "Adresse postale du club", example = "1 rue de l'exemple, 75000 Paris", required = true)
|
||||
private String address = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user