From 66ff74b51449a2f1bda63af759f46b27ff20a2ca Mon Sep 17 00:00:00 2001 From: "alexis.drai@etu.uca.fr" Date: Mon, 12 Jun 2023 14:50:47 +0200 Subject: [PATCH] :ambulance: Allow Pokemong with no moves --- src/main/java/fr/uca/iut/services/PokemongService.java | 4 ++-- src/main/resources/META-INF/openapi.yaml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/uca/iut/services/PokemongService.java b/src/main/java/fr/uca/iut/services/PokemongService.java index a3c0743..085d300 100644 --- a/src/main/java/fr/uca/iut/services/PokemongService.java +++ b/src/main/java/fr/uca/iut/services/PokemongService.java @@ -93,8 +93,8 @@ public class PokemongService extends GenericService { if (moveSet == null) { errors.add("pokemong move set was null"); } else { - if (moveSet.size() == 0 || moveSet.size() > 4) { - errors.add("pokemong move set was empty or had more than 4 moves"); + if (moveSet.size() > 4) { + errors.add("pokemong move set had more than 4 moves"); } for (PokemongMove move : moveSet) { String moveId = move.getId(); diff --git a/src/main/resources/META-INF/openapi.yaml b/src/main/resources/META-INF/openapi.yaml index ab5d825..ba0cc4b 100644 --- a/src/main/resources/META-INF/openapi.yaml +++ b/src/main/resources/META-INF/openapi.yaml @@ -344,7 +344,6 @@ components: $ref: '#/components/schemas/Type' moveSet: type: array - minItems: 1 maxItems: 4 items: $ref: '#/components/schemas/PokemongMove' -- 2.36.3