From 08707e7e738674c1d6c3605c1f55299b2b7c596a Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Sat, 5 Jun 2021 16:10:05 +0200 Subject: [PATCH] feat: added validation to ScenarioConfig --- .../marvelous/gamelibrary/config/ScenarioConfig.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/config/ScenarioConfig.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/config/ScenarioConfig.java index 562370b..08f65ed 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/config/ScenarioConfig.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/config/ScenarioConfig.java @@ -1,5 +1,7 @@ package uulm.teamname.marvelous.gamelibrary.config; +import jakarta.validation.constraints.NotEmpty; + import java.util.Arrays; import java.util.Objects; @@ -8,12 +10,15 @@ import java.util.Objects; */ public class ScenarioConfig { /** An array containing the map based on the {@link FieldType} enum. So, ROCK and GRASS basically. */ + @NotEmpty public FieldType[][] scenario; /** A string containing the name of the author of the scenario config */ + @NotEmpty public String author; /** A string containing the name of the scenario configuration (so basically the map title) */ + @NotEmpty public String name; @Override