🚑 Allow Pokemong with no moves #6

Merged
alexis.drai merged 1 commits from fix/allow-pkmng-with-no-moves into main 2 years ago

@ -93,8 +93,8 @@ public class PokemongService extends GenericService<Pokemong> {
if (moveSet == null) { if (moveSet == null) {
errors.add("pokemong move set was null"); errors.add("pokemong move set was null");
} else { } else {
if (moveSet.size() == 0 || moveSet.size() > 4) { if (moveSet.size() > 4) {
errors.add("pokemong move set was empty or had more than 4 moves"); errors.add("pokemong move set had more than 4 moves");
} }
for (PokemongMove move : moveSet) { for (PokemongMove move : moveSet) {
String moveId = move.getId(); String moveId = move.getId();

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

Loading…
Cancel
Save