bug5409: Changing name of field "tag" in MarkPropertiesResource to

"tags", correctly conveying it's multi value nature.
This commit is contained in:
Dennis Aulenbacher
2020-11-30 14:31:01 +01:00
parent 680cd89085
commit 981b9f2e87
4 changed files with 6 additions and 6 deletions
@@ -59,7 +59,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
@GET
@Produces("application/json;charset=UTF-8")
public Response getMarkProperties(@QueryParam("tag") List<String> tags) throws Exception {
public Response getMarkProperties(@QueryParam("tags") List<String> tags) throws Exception {
Iterable<MarkProperties> markPropertiesList = getSharedSailingData().getAllMarkProperties(tags);
JSONArray result = new JSONArray();
for (MarkProperties markProperties : markPropertiesList) {
@@ -85,7 +85,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
public Response createMarkProperties(@FormParam("name") final String name,
@FormParam("shortName") final String shortName, @FormParam("deviceUuid") String deviceUuid,
@FormParam("color") String rgbColor, @FormParam("shape") String shape, @FormParam("pattern") String pattern,
@FormParam("markType") final String markType, @FormParam("tag") List<String> tags,
@FormParam("markType") final String markType, @FormParam("tags") List<String> tags,
@FormParam("latDeg") Double latDeg, @FormParam("lonDeg") Double lonDeg) throws Exception {
if (name == null || name.isEmpty()) {
return getBadMarkPropertiesValidationErrorResponse("name must be given");
@@ -161,7 +161,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
@FormParam("name") final String name,
@FormParam("shortName") final String shortName,
@FormParam("color") String rgbColor, @FormParam("shape") String shape, @FormParam("pattern") String pattern,
@FormParam("markType") final String markType, @FormParam("tag") List<String> tags,
@FormParam("markType") final String markType, @FormParam("tags") List<String> tags,
@FormParam("deviceUuid") String deviceUuid, @FormParam("latDeg") Double latDeg,
@FormParam("lonDeg") Double lonDeg) throws Exception {
final UUID markPropertiesUUID = UUID.fromString(markPropertiesId);
@@ -29,7 +29,7 @@
</tr>
<tr>
<td>Optional parameters:</td>
<td>tag: tag for filtering. Multiple tags are allowed. If no tag is specified, no filtering by tag will be done.<br>
<td>tags: Multi value specifying an optional set of tags. No filtering by tag will be done.<br>
</tr>
<tr>
<td>Request method:</td>
@@ -34,7 +34,7 @@
<tr>
<td>Optional parameters:</td>
<td>shortName: the short name to set. If not given, the short name defaults to the name.<br>
tag: Multi value specifying an optional set of tags.
tags: Multi value specifying an optional set of tags.
markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]<br>
color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB<br>
shape: For marks with BUOY type, this may be specified as one of [CYLINDER, CONICAL]<br>
@@ -34,7 +34,7 @@
<tr>
<td>Optional parameters:</td>
<td>shortName: the short name to set. If not given, the short name defaults to the name.<br>
tag: Multi value specifying an optional set of tags.
tags: Multi value specifying an optional set of tags.
Appearance parameters (not giving a parameter sets it to the default):<br>
markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]<br>
color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB<br>