🚑 Allow Pokemong with no moves (#6)

Co-authored-by: alexis.drai@etu.uca.fr <alexis.drai@etu.uca.fr>
Reviewed-on: #6
Alexis Drai 2 years ago
parent 686cf02318
commit 6c714b47ba

@ -93,8 +93,8 @@ public class PokemongService extends GenericService<Pokemong> {
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();

@ -344,7 +344,6 @@ components:
$ref: '#/components/schemas/Type'
moveSet:
type: array
minItems: 1
maxItems: 4
items:
$ref: '#/components/schemas/PokemongMove'

Loading…
Cancel
Save