summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/ChooseNameAction.java3
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/CreateGameAction.java2
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/JoinGameAction.java2
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java2
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/ReorderPlayersAction.java2
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/actions/UpdateSettingsAction.java2
6 files changed, 11 insertions, 2 deletions
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/ChooseNameAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/ChooseNameAction.java
index fb5f7ec9..be5e97ea 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/ChooseNameAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/ChooseNameAction.java
@@ -12,8 +12,7 @@ import org.jsondoc.core.annotation.ApiObjectField;
public class ChooseNameAction {
@ApiObjectField(description = "The display name of the player. May contain spaces and special characters.",
- required = true,
- format = ".{2,20}")
+ required = true)
@NotNull
@Size(min = 2, max = 20)
private String playerName;
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/CreateGameAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/CreateGameAction.java
index ed96f18c..4ad957b8 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/CreateGameAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/CreateGameAction.java
@@ -4,12 +4,14 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.jsondoc.core.annotation.ApiObject;
+import org.jsondoc.core.annotation.ApiObjectField;
@ApiObject(name = "Create Game Action",
description = "The action to create a game.",
group = "Actions")
public class CreateGameAction {
+ @ApiObjectField
@NotNull
@Size(min = 2, max = 30)
private String gameName;
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/JoinGameAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/JoinGameAction.java
index 5c7a5f03..a392378c 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/JoinGameAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/JoinGameAction.java
@@ -3,12 +3,14 @@ package org.luxons.sevenwonders.actions;
import javax.validation.constraints.NotNull;
import org.jsondoc.core.annotation.ApiObject;
+import org.jsondoc.core.annotation.ApiObjectField;
@ApiObject(name = "Join Game Action",
description = "The action to join a game.",
group = "Actions")
public class JoinGameAction {
+ @ApiObjectField
@NotNull
private Long gameId;
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java
index 0fc9f0ac..629e5806 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java
@@ -3,6 +3,7 @@ package org.luxons.sevenwonders.actions;
import javax.validation.constraints.NotNull;
import org.jsondoc.core.annotation.ApiObject;
+import org.jsondoc.core.annotation.ApiObjectField;
import org.luxons.sevenwonders.game.api.PlayerMove;
@ApiObject(name = "Prepare Card Action",
@@ -10,6 +11,7 @@ import org.luxons.sevenwonders.game.api.PlayerMove;
group = "Actions")
public class PrepareCardAction {
+ @ApiObjectField
@NotNull
private PlayerMove move;
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/ReorderPlayersAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/ReorderPlayersAction.java
index dedca3fe..e457caf4 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/ReorderPlayersAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/ReorderPlayersAction.java
@@ -5,6 +5,7 @@ import java.util.List;
import javax.validation.constraints.NotNull;
import org.jsondoc.core.annotation.ApiObject;
+import org.jsondoc.core.annotation.ApiObjectField;
@ApiObject(name = "Reorder Players Action",
description = "The action to update the order of the players around the table. Can only be called in the "
@@ -12,6 +13,7 @@ import org.jsondoc.core.annotation.ApiObject;
group = "Actions")
public class ReorderPlayersAction {
+ @ApiObjectField
@NotNull
private List<String> orderedPlayers;
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/UpdateSettingsAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/UpdateSettingsAction.java
index e6a69e5b..fa454995 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/actions/UpdateSettingsAction.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/actions/UpdateSettingsAction.java
@@ -3,6 +3,7 @@ package org.luxons.sevenwonders.actions;
import javax.validation.constraints.NotNull;
import org.jsondoc.core.annotation.ApiObject;
+import org.jsondoc.core.annotation.ApiObjectField;
import org.luxons.sevenwonders.game.api.CustomizableSettings;
@ApiObject(name = "Update Settings Action",
@@ -11,6 +12,7 @@ import org.luxons.sevenwonders.game.api.CustomizableSettings;
group = "Actions")
public class UpdateSettingsAction {
+ @ApiObjectField
@NotNull
private CustomizableSettings settings;
bgstack15