NIFI-12298 add swagger annotations for createExtensionBundleVersion form fields

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #7961.
This commit is contained in:
Zackeus Bengtsson 2023-10-31 20:44:37 +01:00 committed by Pierre Villard
parent 960498f76b
commit 33c8029d65
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 18 additions and 0 deletions

View File

@ -19,6 +19,8 @@ package org.apache.nifi.registry.web.api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Authorization;
@ -92,6 +94,22 @@ public class BucketBundleResource extends ApplicationResource {
@ExtensionProperty(name = "resource", value = "/buckets/{bucketId}") })
}
)
@ApiImplicitParams(
value = {
@ApiImplicitParam(
name = "file",
value = "The binary content of the bundle file being uploaded.",
required = true,
type = "file",
paramType = "formData"),
@ApiImplicitParam(
name = "sha256",
value = "Optional sha256 of the provided bundle",
required = false,
type = "string",
paramType = "formData")
}
)
@ApiResponses({
@ApiResponse(code = 400, message = HttpStatusMessages.MESSAGE_400),
@ApiResponse(code = 401, message = HttpStatusMessages.MESSAGE_401),