mirror of https://github.com/apache/nifi.git
NIFI-3939: Reviewed and corrected all incorrect nifi-web-api resource response types. This closes #1999
This commit is contained in:
parent
87e062ff55
commit
78fbb8f2ee
|
@ -268,7 +268,7 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||||
@Path("{id}/state")
|
@Path("{id}/state")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the state for a controller service",
|
value = "Gets the state for a controller service",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
|
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||||
@Path("{id}/state/clear-requests")
|
@Path("{id}/state/clear-requests")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Clears the state for a controller service",
|
value = "Clears the state for a controller service",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
|
@Authorization(value = "Write - /controller-services/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ public class ControllerServiceResource extends ApplicationResource {
|
||||||
@Path("{id}/references")
|
@Path("{id}/references")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets a controller service",
|
value = "Gets a controller service",
|
||||||
response = ControllerServiceEntity.class,
|
response = ControllerServiceReferencingComponentsEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read - /controller-services/{uuid}", type = "")
|
@Authorization(value = "Read - /controller-services/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ public class FlowFileQueueResource extends ApplicationResource {
|
||||||
@Path("{id}/flowfiles/{flowfile-uuid}")
|
@Path("{id}/flowfiles/{flowfile-uuid}")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets a FlowFile from a Connection.",
|
value = "Gets a FlowFile from a Connection.",
|
||||||
|
response = FlowFileEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
|
@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")
|
@Path("{id}/flowfiles/{flowfile-uuid}/content")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the content for a FlowFile in a Connection.",
|
value = "Gets the content for a FlowFile in a Connection.",
|
||||||
|
response = StreamingOutput.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
|
@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}")
|
@Path("{id}/listing-requests/{listing-request-id}")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Cancels and/or removes a request to list the contents of this connection.",
|
value = "Cancels and/or removes a request to list the contents of this connection.",
|
||||||
response = DropRequestEntity.class,
|
response = ListingRequestEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
|
@Authorization(value = "Read Source Data - /data/{component-type}/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -540,7 +540,6 @@ public class FlowResource extends ApplicationResource {
|
||||||
@Path("process-groups/{id}")
|
@Path("process-groups/{id}")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Schedule or unschedule comopnents in the specified Process Group.",
|
value = "Schedule or unschedule comopnents in the specified Process Group.",
|
||||||
notes = "",
|
|
||||||
response = ScheduleComponentsEntity.class,
|
response = ScheduleComponentsEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read - /flow", type = ""),
|
@Authorization(value = "Read - /flow", type = ""),
|
||||||
|
@ -1547,7 +1546,7 @@ public class FlowResource extends ApplicationResource {
|
||||||
@Path("remote-process-groups/{id}/status")
|
@Path("remote-process-groups/{id}/status")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets status for a remote process group",
|
value = "Gets status for a remote process group",
|
||||||
response = ProcessorStatusEntity.class,
|
response = RemoteProcessGroupStatusEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read - /flow", type = "")
|
@Authorization(value = "Read - /flow", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.CopySnippetRequestEntity;
|
||||||
import org.apache.nifi.web.api.entity.CreateTemplateRequestEntity;
|
import org.apache.nifi.web.api.entity.CreateTemplateRequestEntity;
|
||||||
import org.apache.nifi.web.api.entity.FlowEntity;
|
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.FunnelEntity;
|
||||||
import org.apache.nifi.web.api.entity.FunnelsEntity;
|
import org.apache.nifi.web.api.entity.FunnelsEntity;
|
||||||
import org.apache.nifi.web.api.entity.InputPortsEntity;
|
import org.apache.nifi.web.api.entity.InputPortsEntity;
|
||||||
|
@ -519,7 +518,7 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||||
@Path("{id}/process-groups")
|
@Path("{id}/process-groups")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets all process groups",
|
value = "Gets all process groups",
|
||||||
response = ProcessorsEntity.class,
|
response = ProcessGroupsEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read - /process-groups/{uuid}", type = "")
|
@Authorization(value = "Read - /process-groups/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -1756,7 +1755,7 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||||
@Path("{id}/snippet-instance")
|
@Path("{id}/snippet-instance")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Copies a snippet and discards it.",
|
value = "Copies a snippet and discards it.",
|
||||||
response = FlowSnippetEntity.class,
|
response = FlowEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /process-groups/{uuid}", type = ""),
|
@Authorization(value = "Write - /process-groups/{uuid}", type = ""),
|
||||||
@Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet and their descendant components", type = ""),
|
@Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet and their descendant components", type = ""),
|
||||||
|
|
|
@ -276,7 +276,7 @@ public class ProcessorResource extends ApplicationResource {
|
||||||
@Path("/{id}/state")
|
@Path("/{id}/state")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the state for a processor",
|
value = "Gets the state for a processor",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /processors/{uuid}", type = "")
|
@Authorization(value = "Write - /processors/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ public class ProcessorResource extends ApplicationResource {
|
||||||
@Path("{id}/state/clear-requests")
|
@Path("{id}/state/clear-requests")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Clears the state for a processor",
|
value = "Clears the state for a processor",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /processors/{uuid}", type = "")
|
@Authorization(value = "Write - /processors/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ public class ProvenanceEventResource extends ApplicationResource {
|
||||||
@Path("{id}/content/input")
|
@Path("{id}/content/input")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the input content for a provenance event",
|
value = "Gets the input content for a provenance event",
|
||||||
|
response = StreamingOutput.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
|
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -161,6 +162,7 @@ public class ProvenanceEventResource extends ApplicationResource {
|
||||||
@Path("{id}/content/output")
|
@Path("{id}/content/output")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the output content for a provenance event",
|
value = "Gets the output content for a provenance event",
|
||||||
|
response = StreamingOutput.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
|
@Authorization(value = "Read Component Data - /data/{component-type}/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ public class ReportingTaskResource extends ApplicationResource {
|
||||||
@Path("{id}/state")
|
@Path("{id}/state")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Gets the state for a reporting task",
|
value = "Gets the state for a reporting task",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
|
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,7 @@ public class ReportingTaskResource extends ApplicationResource {
|
||||||
@Path("{id}/state/clear-requests")
|
@Path("{id}/state/clear-requests")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Clears the state for a reporting task",
|
value = "Clears the state for a reporting task",
|
||||||
response = ComponentStateDTO.class,
|
response = ComponentStateEntity.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
|
@Authorization(value = "Write - /reporting-tasks/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class TemplateResource extends ApplicationResource {
|
||||||
@Path("{id}/download")
|
@Path("{id}/download")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
value = "Exports a template",
|
value = "Exports a template",
|
||||||
response = TemplateDTO.class,
|
response = String.class,
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(value = "Read - /templates/{uuid}", type = "")
|
@Authorization(value = "Read - /templates/{uuid}", type = "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue