Skip to content

Commit 7c20316

Browse files
authored
re-add spring annotations for boolean variables (#53)
This adds missing annotations after some were inadvertently removed in adding apidoc annotations
1 parent 74971a5 commit 7c20316

File tree

1 file changed

+18
-11
lines changed
  • components/java/fileservice/src/main/java/org/sciserver/springapp/fileservice/controller

1 file changed

+18
-11
lines changed

components/java/fileservice/src/main/java/org/sciserver/springapp/fileservice/controller/ApiController.java

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ public ResponseEntity<JsonNode> uploadFile(
461461
required = true) @PathVariable String topVolume,
462462
@Parameter(description = "If file already exists at destination path, "
463463
+ "an exeception will be thrown when quiet=false.",
464-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
464+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
465+
@RequestParam(defaultValue = "false", required = false) Boolean quiet,
465466
HttpServletRequest request,
466467
HttpServletResponse response
467468
) throws UnauthenticatedException, SciServerClientException {
@@ -546,7 +547,8 @@ public ResponseEntity<JsonNode> downloadFile(
546547
@Parameter(description = "Sets the response content disposition to inline when "
547548
+ "this parameter is true, or attachment if false.",
548549
schema = @Schema(defaultValue = "false", type = "Boolean"),
549-
required = false) Boolean inline,
550+
required = false)
551+
@RequestParam(defaultValue = "false", required = false) Boolean inline,
550552
HttpServletRequest request,
551553
HttpServletResponse response
552554
) throws UnauthenticatedException, SciServerClientException {
@@ -724,7 +726,8 @@ public ResponseEntity<JsonNode> createFolder(
724726
@Parameter(description = "Name of the top volume, which can be a rootVolume or a dataVolume.",
725727
required = true) @PathVariable String topVolume,
726728
@Parameter(description = "If folder already exists, an error will be thrown when quiet=false.",
727-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
729+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
730+
@RequestParam(required = false, defaultValue = "false") Boolean quiet,
728731
HttpServletRequest request,
729732
HttpServletResponse response
730733
) throws UnauthenticatedException, SciServerClientException {
@@ -801,7 +804,8 @@ public ResponseEntity<JsonNode> deleteData(
801804
@Parameter(description = "Name of the top volume, which can be a rootVolume or a dataVolume.",
802805
required = true) @PathVariable String topVolume,
803806
@Parameter(description = "If file (or folder) does not exist, an error will be thrown when quiet=false.",
804-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
807+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
808+
@RequestParam(defaultValue = "false", required = false) Boolean quiet,
805809
HttpServletRequest request,
806810
HttpServletResponse response
807811
) throws UnauthenticatedException, SciServerClientException {
@@ -1166,10 +1170,11 @@ public ResponseEntity<JsonNode> createUserVolume(
11661170
@Parameter(description = "Name of the userVolume.",
11671171
required = true) @PathVariable String userVolume,
11681172
@Parameter(description = "If userVolume already exists, an exeception will be thrown when quiet=false.",
1169-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
1173+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
1174+
@RequestParam(defaultValue = "false", required = false) Boolean quiet,
11701175
@RequestHeader(value = "X-Service-Auth-ID", required = false) String xServiceID,
1171-
@RequestBody(required = true, description = "Contains information needed for creating a user volume.")
1172-
@org.springframework.web.bind.annotation.RequestBody
1176+
@RequestBody(required = false, description = "Description of the new user volume.")
1177+
@org.springframework.web.bind.annotation.RequestBody(required = false)
11731178
CreateUserVolumeRequestBody body,
11741179
HttpServletRequest request
11751180
) throws UnauthenticatedException, SciServerClientException {
@@ -1276,8 +1281,8 @@ public ResponseEntity<RegisteredServiceVolumeModel> createServiceVolume(
12761281
@Parameter(in = ParameterIn.HEADER, name = "X-Service-Auth-Token", description = "Service's auth token.",
12771282
required = true, schema = @Schema(type = "string"))
12781283
@RequestHeader(value = "X-Service-Auth-ID", required = true) String serviceToken,
1279-
@RequestBody(required = true, description = "Contains information needed for creating a service volume.")
1280-
@org.springframework.web.bind.annotation.RequestBody
1284+
@RequestBody(required = false, description = "Description of the new service volume.")
1285+
@org.springframework.web.bind.annotation.RequestBody(required = false)
12811286
CreateServiceVolumeRequestBody body,
12821287
HttpServletRequest request
12831288
) throws UnauthenticatedException, SciServerClientException, Exception {
@@ -1478,7 +1483,8 @@ public ResponseEntity<JsonNode> deleteUserVolume(
14781483
required = true) @PathVariable String ownerName,
14791484
@Parameter(description = "Name of the userVolume.", required = true) @PathVariable String userVolume,
14801485
@Parameter(description = "If the user volume does not exist, an error will be thrown when quiet=false.",
1481-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
1486+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
1487+
@RequestParam(defaultValue = "false", required = false) Boolean quiet,
14821488
HttpServletRequest request
14831489
) throws UnauthenticatedException, SciServerClientException {
14841490

@@ -1562,7 +1568,8 @@ public ResponseEntity<JsonNode> deleteServiceVolume(
15621568
@Parameter(description = "Name of the serviceVolume.", required = true,
15631569
example = "Storage") @PathVariable String serviceVolume,
15641570
@Parameter(description = "If the service volume does not exist, an error will be thrown when quiet=false.",
1565-
example = "false", schema = @Schema(defaultValue = "false"), required = false) Boolean quiet,
1571+
example = "false", schema = @Schema(defaultValue = "false"), required = false)
1572+
@RequestParam(defaultValue = "false", required = false) Boolean quiet,
15661573
@Parameter(in = ParameterIn.HEADER, name = "X-Service-Auth-Token", description = "Service's auth token.",
15671574
required = true, schema = @Schema(type = "string"))
15681575
@RequestHeader(value = "X-Service-Auth-ID", required = true) String serviceToken,

0 commit comments

Comments
 (0)