Это фрагмент кода для контроллера с запросом POST.
@POST
@Path(PATH_PARAM + CREATE_DIRECTORY)
@ApiOperation(value = "Create a directory at the given path", response = java.lang.Void.class)
@Consumes(MediaType.APPLICATION_JSON)
public Response createDirectory(@PathParam("path") final String path,
final CreateDirectoryPOptions options) {
return RestUtils.call((RestUtils.RestCallable<Void>) () -> {
if (options == null) {
mFileSystem.createDirectory(new AlluxioURI(path));
} else {
mFileSystem.createDirectory(new AlluxioURI(path), options);
}
return null;
}, ServerConfiguration.global());
}
Как передать CreateDirectoryPOptions при вызове API?