NIFI-3939: Reviewed and corrected all incorrect nifi-web-api resource response types. This closes #1999

This commit is contained in:
m-hogue 2017-07-10 11:41:50 -04:00 committed by Matt Gilman
parent 87e062ff55
commit 78fbb8f2ee
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
8 changed files with 16 additions and 14 deletions

View File

@ -268,7 +268,7 @@ public class ControllerServiceResource extends ApplicationResource {
@Path("{id}/state")
@ApiOperation(
value = "Gets the state for a controller service",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
}
@ -323,7 +323,7 @@ public class ControllerServiceResource extends ApplicationResource {
@Path("{id}/state/clear-requests")
@ApiOperation(
value = "Clears the state for a controller service",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
}
@ -385,7 +385,7 @@ public class ControllerServiceResource extends ApplicationResource {
@Path("{id}/references")
@ApiOperation(
value = "Gets a controller service",
response = ControllerServiceEntity.class,
response = ControllerServiceReferencingComponentsEntity.class,
authorizations = {
@Authorization(value = "Read - /controller-services/{uuid}", type = "")
}

View File

@ -126,6 +126,7 @@ public class FlowFileQueueResource extends ApplicationResource {
@Path("{id}/flowfiles/{flowfile-uuid}")
@ApiOperation(
value = "Gets a FlowFile from a Connection.",
response = FlowFileEntity.class,
authorizations = {
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
}
@ -201,6 +202,7 @@ public class FlowFileQueueResource extends ApplicationResource {
@Path("{id}/flowfiles/{flowfile-uuid}/content")
@ApiOperation(
value = "Gets the content for a FlowFile in a Connection.",
response = StreamingOutput.class,
authorizations = {
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
}
@ -429,7 +431,7 @@ public class FlowFileQueueResource extends ApplicationResource {
@Path("{id}/listing-requests/{listing-request-id}")
@ApiOperation(
value = "Cancels and/or removes a request to list the contents of this connection.",
response = DropRequestEntity.class,
response = ListingRequestEntity.class,
authorizations = {
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
}

View File

@ -540,7 +540,6 @@ public class FlowResource extends ApplicationResource {
@Path("process-groups/{id}")
@ApiOperation(
value = "Schedule or unschedule comopnents in the specified Process Group.",
notes = "",
response = ScheduleComponentsEntity.class,
authorizations = {
@Authorization(value = "Read - /flow", type = ""),
@ -1547,7 +1546,7 @@ public class FlowResource extends ApplicationResource {
@Path("remote-process-groups/{id}/status")
@ApiOperation(
value = "Gets status for a remote process group",
response = ProcessorStatusEntity.class,
response = RemoteProcessGroupStatusEntity.class,
authorizations = {
@Authorization(value = "Read - /flow", type = "")
}

View File

@ -61,7 +61,6 @@ import org.apache.nifi.web.api.entity.ControllerServiceEntity;
import org.apache.nifi.web.api.entity.CopySnippetRequestEntity;
import org.apache.nifi.web.api.entity.CreateTemplateRequestEntity;
import org.apache.nifi.web.api.entity.FlowEntity;
import org.apache.nifi.web.api.entity.FlowSnippetEntity;
import org.apache.nifi.web.api.entity.FunnelEntity;
import org.apache.nifi.web.api.entity.FunnelsEntity;
import org.apache.nifi.web.api.entity.InputPortsEntity;
@ -519,7 +518,7 @@ public class ProcessGroupResource extends ApplicationResource {
@Path("{id}/process-groups")
@ApiOperation(
value = "Gets all process groups",
response = ProcessorsEntity.class,
response = ProcessGroupsEntity.class,
authorizations = {
@Authorization(value = "Read - /process-groups/{uuid}", type = "")
}
@ -1756,7 +1755,7 @@ public class ProcessGroupResource extends ApplicationResource {
@Path("{id}/snippet-instance")
@ApiOperation(
value = "Copies a snippet and discards it.",
response = FlowSnippetEntity.class,
response = FlowEntity.class,
authorizations = {
@Authorization(value = "Write - /process-groups/{uuid}", type = ""),
@Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet and their descendant components", type = ""),

View File

@ -276,7 +276,7 @@ public class ProcessorResource extends ApplicationResource {
@Path("/{id}/state")
@ApiOperation(
value = "Gets the state for a processor",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /processors/{uuid}", type = "")
}
@ -332,7 +332,7 @@ public class ProcessorResource extends ApplicationResource {
@Path("{id}/state/clear-requests")
@ApiOperation(
value = "Clears the state for a processor",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /processors/{uuid}", type = "")
}

View File

@ -79,6 +79,7 @@ public class ProvenanceEventResource extends ApplicationResource {
@Path("{id}/content/input")
@ApiOperation(
value = "Gets the input content for a provenance event",
response = StreamingOutput.class,
authorizations = {
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
}
@ -161,6 +162,7 @@ public class ProvenanceEventResource extends ApplicationResource {
@Path("{id}/content/output")
@ApiOperation(
value = "Gets the output content for a provenance event",
response = StreamingOutput.class,
authorizations = {
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
}

View File

@ -255,7 +255,7 @@ public class ReportingTaskResource extends ApplicationResource {
@Path("{id}/state")
@ApiOperation(
value = "Gets the state for a reporting task",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
}
@ -310,7 +310,7 @@ public class ReportingTaskResource extends ApplicationResource {
@Path("{id}/state/clear-requests")
@ApiOperation(
value = "Clears the state for a reporting task",
response = ComponentStateDTO.class,
response = ComponentStateEntity.class,
authorizations = {
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
}

View File

@ -95,7 +95,7 @@ public class TemplateResource extends ApplicationResource {
@Path("{id}/download")
@ApiOperation(
value = "Exports a template",
response = TemplateDTO.class,
response = String.class,
authorizations = {
@Authorization(value = "Read - /templates/{uuid}", type = "")
}