Skip to content

Commit

Permalink
NIFI-14142 Fixed enum values for OpenAPI using String arrays (apache#…
Browse files Browse the repository at this point in the history
…9626)

Signed-off-by: David Handermann <[email protected]>
  • Loading branch information
EndzeitBegins authored Jan 13, 2025
1 parent 25ca4b4 commit 4795805
Show file tree
Hide file tree
Showing 46 changed files with 66 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class AccessPolicySummaryDTO extends ComponentDTO {
* @return The action associated with this access policy.
*/
@Schema(description = "The action associated with this access policy.",
allowableValues = "read, write"
allowableValues = {"read", "write"}
)
public String getAction() {
return action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public void setId(final String id) {
}

@Schema(description = "The type of this component",
allowableValues = COMPONENT_TYPE_PROCESSOR + "," + COMPONENT_TYPE_CONTROLLER_SERVICE + ", "
+ COMPONENT_TYPE_INPUT_PORT + ", " + COMPONENT_TYPE_OUTPUT_PORT + ", "
+ COMPONENT_TYPE_REMOTE_INPUT_PORT + ", " + COMPONENT_TYPE_REMOTE_OUTPUT_PORT + ", " + COMPONENT_TYPE_STATELESS_GROUP)
allowableValues = {COMPONENT_TYPE_PROCESSOR, COMPONENT_TYPE_CONTROLLER_SERVICE,
COMPONENT_TYPE_INPUT_PORT, COMPONENT_TYPE_OUTPUT_PORT,
COMPONENT_TYPE_REMOTE_INPUT_PORT, COMPONENT_TYPE_REMOTE_OUTPUT_PORT, COMPONENT_TYPE_STATELESS_GROUP})
public String getReferenceType() {
return referenceType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ConfigVerificationResultDTO {
private String verificationStepName;
private String explanation;

@Schema(description = "The outcome of the verification", allowableValues = "SUCCESSFUL, FAILED, SKIPPED")
@Schema(description = "The outcome of the verification", allowableValues = {"SUCCESSFUL", "FAILED", "SKIPPED"})
public String getOutcome() {
return outcome;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void setVersionedComponentId(final String id) {
*/
@Schema(description = "The type of component the connectable is.",
requiredMode = Schema.RequiredMode.REQUIRED,
allowableValues = "PROCESSOR, REMOTE_INPUT_PORT, REMOTE_OUTPUT_PORT, INPUT_PORT, OUTPUT_PORT, FUNNEL"
allowableValues = {"PROCESSOR", "REMOTE_INPUT_PORT", "REMOTE_OUTPUT_PORT", "INPUT_PORT", "OUTPUT_PORT", "FUNNEL"}
)
public String getType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void setPrioritizers(List<String> prioritizers) {
}

@Schema(description = "How to load balance the data in this Connection across the nodes in the cluster.",
allowableValues = "DO_NOT_LOAD_BALANCE, PARTITION_BY_ATTRIBUTE, ROUND_ROBIN, SINGLE_NODE")
allowableValues = {"DO_NOT_LOAD_BALANCE", "PARTITION_BY_ATTRIBUTE", "ROUND_ROBIN", "SINGLE_NODE"})
public String getLoadBalanceStrategy() {
return loadBalanceStrategy;
}
Expand All @@ -247,7 +247,7 @@ public void setLoadBalancePartitionAttribute(String partitionAttribute) {
}

@Schema(description = "Whether or not data should be compressed when being transferred between nodes in the cluster.",
allowableValues = "DO_NOT_COMPRESS, COMPRESS_ATTRIBUTES_ONLY, COMPRESS_ATTRIBUTES_AND_CONTENT")
allowableValues = {"DO_NOT_COMPRESS", "COMPRESS_ATTRIBUTES_ONLY", "COMPRESS_ATTRIBUTES_AND_CONTENT"})
public String getLoadBalanceCompression() {
return loadBalanceCompression;
}
Expand All @@ -258,7 +258,7 @@ public void setLoadBalanceCompression(String compression) {

@Schema(description = "The current status of the Connection's Load Balancing Activities. Status can indicate that Load Balancing is not configured for the connection, that Load Balancing " +
"is configured but inactive (not currently transferring data to another node), or that Load Balancing is configured and actively transferring data to another node.",
allowableValues = LOAD_BALANCE_NOT_CONFIGURED + ", " + LOAD_BALANCE_INACTIVE + ", " + LOAD_BALANCE_ACTIVE,
allowableValues = {LOAD_BALANCE_NOT_CONFIGURED, LOAD_BALANCE_INACTIVE, LOAD_BALANCE_ACTIVE},
accessMode = Schema.AccessMode.READ_ONLY)
public String getLoadBalanceStatus() {
return loadBalanceStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void setSupportsSensitiveDynamicProperties(final Boolean supportsSensitiv
* @return The state of this controller service. Possible values are ENABLED, ENABLING, DISABLED, DISABLING
*/
@Schema(description = "The state of the controller service.",
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING"
allowableValues = {"ENABLED", "ENABLING", "DISABLED", "DISABLING"}
)
public String getState() {
return state;
Expand Down Expand Up @@ -332,7 +332,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the ControllerService is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the ControllerService is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void setState(String state) {
* @return type of reference this is (Processor, ControllerService, ParameterProvider, or ReportingTask)
*/
@Schema(description = "The type of reference this is.",
allowableValues = "Processor, ControllerService, ReportingTask, FlowRegistryClient"
allowableValues = {"Processor", "ControllerService", "ReportingTask", "FlowRegistryClient"}
)
public String getReferenceType() {
return referenceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void setSupportsSensitiveDynamicProperties(final Boolean supportsSensitiv
* @return current scheduling state of the flow analysis rule
*/
@Schema(description = "The state of the flow analysis rule.",
allowableValues = "ENABLED, DISABLED"
allowableValues = {"ENABLED", "DISABLED"}
)
public String getState() {
return state;
Expand Down Expand Up @@ -265,7 +265,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the Flow Analysis Rule is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Flow Analysis Rule is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the Registry Client is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Registry Client is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the Parameter Provider is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Parameter Provider is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void setName(final String name) {
* @return The state of this port. Possible states are 'RUNNING', 'STOPPED', and 'DISABLED'
*/
@Schema(description = "The state of the port.",
allowableValues = "RUNNING, STOPPED, DISABLED"
allowableValues = {"RUNNING", "STOPPED", "DISABLED"}
)
public String getState() {
return state;
Expand All @@ -71,7 +71,7 @@ public void setState(String state) {
* @return The type of port
*/
@Schema(description = "The type of port.",
allowableValues = "INPUT_PORT, OUTPUT_PORT"
allowableValues = {"INPUT_PORT", "OUTPUT_PORT"}
)
public String getType() {
return type;
Expand Down Expand Up @@ -150,7 +150,7 @@ public void setAllowRemoteAccess(Boolean allowRemoteAccess) {
}

@Schema(description = "Specifies how the Port functions",
allowableValues = "STANDARD, FAILURE"
allowableValues = {"STANDARD", "FAILURE"}
)
public String getPortFunction() {
return portFunction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public void setParameterContext(final ParameterContextReferenceEntity parameterC
this.parameterContext = parameterContext;
}

@Schema(description = "The FlowFile Concurrency for this Process Group.", allowableValues = "UNBOUNDED, SINGLE_FLOWFILE_PER_NODE, SINGLE_BATCH_PER_NODE")
@Schema(description = "The FlowFile Concurrency for this Process Group.", allowableValues = {"UNBOUNDED", "SINGLE_FLOWFILE_PER_NODE", "SINGLE_BATCH_PER_NODE"})
public String getFlowfileConcurrency() {
return flowfileConcurrency;
}
Expand All @@ -345,7 +345,7 @@ public void setFlowfileConcurrency(final String flowfileConcurrency) {
}

@Schema(description = "The Outbound Policy that is used for determining how FlowFiles should be transferred out of the Process Group.",
allowableValues = "STREAM_WHEN_AVAILABLE, BATCH_OUTPUT")
allowableValues = {"STREAM_WHEN_AVAILABLE", "BATCH_OUTPUT"})
public String getFlowfileOutboundPolicy() {
return flowfileOutboundPolicy;
}
Expand Down Expand Up @@ -391,7 +391,7 @@ public void setLogFileSuffix(final String logFileSuffix) {
}

@Schema(description = "The Execution Engine that should be used to run the flow represented by this Process Group.",
allowableValues = "STATELESS, STANDARD, INHERITED")
allowableValues = {"STATELESS", "STANDARD", "INHERITED"})
public String getExecutionEngine() {
return executionEngine;
}
Expand All @@ -401,7 +401,7 @@ public void setExecutionEngine(final String executionEngine) {
}

@Schema(description = "If the Process Group is configured to run in using the Stateless Engine, represents the current state. Otherwise, will be STOPPED.",
allowableValues = "STOPPED, RUNNING")
allowableValues = {"STOPPED", "RUNNING"})
public String getStatelessGroupScheduledState() {
return statelessGroupScheduledState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public void setRetriedRelationships(Set<String> retriedRelationships) {
}

@Schema(description = "Determines whether the FlowFile should be penalized or the processor should be yielded between retries.",
allowableValues = "PENALIZE_FLOWFILE, YIELD_PROCESSOR"
allowableValues = {"PENALIZE_FLOWFILE", "YIELD_PROCESSOR"}
)
public String getBackoffMechanism() {
return backoffMechanism;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void setBundle(BundleDTO bundle) {
* @return The state of this processor. Possible states are 'RUNNING', 'STOPPED', and 'DISABLED'
*/
@Schema(description = "The state of the processor",
allowableValues = "RUNNING, STOPPED, DISABLED"
allowableValues = {"RUNNING", "STOPPED", "DISABLED"}
)
public String getState() {
return state;
Expand Down Expand Up @@ -296,7 +296,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the Processor is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Processor is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void setName(final String name) {
}

@Schema(description = "The run status of the processor",
allowableValues = RUNNING + ", " + STOPPED + ", " + INVALID + ", " + VALIDATING + ", " + DISABLED
allowableValues = {RUNNING, STOPPED, INVALID, VALIDATING, DISABLED}
)
public String getRunStatus() {
return runStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void setSupportsSensitiveDynamicProperties(final Boolean supportsSensitiv
* @return current scheduling state of the reporting task
*/
@Schema(description = "The state of the reporting task.",
allowableValues = "RUNNING, STOPPED, DISABLED"
allowableValues = {"RUNNING", "STOPPED", "DISABLED"}
)
public String getState() {
return state;
Expand Down Expand Up @@ -316,7 +316,7 @@ public void setValidationErrors(Collection<String> validationErrors) {

@Schema(description = "Indicates whether the Reporting Task is valid, invalid, or still in the process of validating (i.e., it is unknown whether or not the Reporting Task is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void setStorageLocation(String storageLocation) {

@Schema(accessMode = Schema.AccessMode.READ_ONLY,
description = "The current state of the Process Group, as it relates to the Versioned Flow",
allowableValues = LOCALLY_MODIFIED + ", " + STALE + ", " + LOCALLY_MODIFIED_AND_STALE + ", " + UP_TO_DATE + ", " + SYNC_FAILURE)
allowableValues = {LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE})
public String getState() {
return state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void setComments(String comments) {
this.comments = comments;
}

@Schema(description = "The action being performed", allowableValues = COMMIT_ACTION + ", " + FORCE_COMMIT_ACTION)
@Schema(description = "The action being performed", allowableValues = {COMMIT_ACTION, FORCE_COMMIT_ACTION})
public String getAction() {
return action;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void setEventId(Long eventId) {
*/
@Schema(description = "The type of lineage request. PARENTS will return the lineage for the flowfiles that are parents of the specified event. CHILDREN will return the lineage "
+ "for the flowfiles that are children of the specified event. FLOWFILE will return the lineage for the specified flowfile.",
allowableValues = "PARENTS, CHILDREN, and FLOWFILE"
allowableValues = {"PARENTS", "CHILDREN", "FLOWFILE"}
)
public LineageRequestType getLineageRequestType() {
return lineageRequestType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void setClusterNodeIdentifier(String clusterNodeIdentifier) {
* @return type of node
*/
@Schema(description = "The type of the node.",
allowableValues = "FLOWFILE, EVENT"
allowableValues = {"FLOWFILE", "EVENT"}
)
public String getType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ComponentStatusDTO {
*/
@Schema(description = "The run status of this component",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING")
allowableValues = {"ENABLED", "ENABLING", "DISABLED", "DISABLING"})
public String getRunStatus() {
return runStatus;
}
Expand All @@ -56,7 +56,7 @@ public void setRunStatus(String runStatus) {
@Schema(description = "Indicates whether the component is valid, invalid, or still in the process of validating" +
" (i.e., it is unknown whether or not the component is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
allowableValues = {VALID, INVALID, VALIDATING})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ControllerServiceStatusDTO extends ComponentStatusDTO {

@Schema(description = "The run status of this ControllerService",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING")
allowableValues = {"ENABLED", "ENABLING", "DISABLED", "DISABLING"})
@Override
public String getRunStatus() {
return super.getRunStatus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class FlowAnalysisRuleStatusDTO extends ComponentStatusDTO {

@Schema(description = "The run status of this FlowAnalysisRule",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "ENABLED, DISABLED")
allowableValues = {"ENABLED", "DISABLED"})
@Override
public String getRunStatus() {
return super.getRunStatus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void setName(String name) {


@Schema(description = "The run status of the port.",
allowableValues = "Running, Stopped, Validating, Disabled, Invalid")
allowableValues = {"Running", "Stopped", "Validating", "Disabled", "Invalid"})
public String getRunStatus() {
return runStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void setName(String name) {
*/
@Schema(
description = "The run status of the port.",
allowableValues = "Running, Stopped, Validating, Disabled, Invalid"
allowableValues = {"Running", "Stopped", "Validating", "Disabled", "Invalid"}
)
public String getRunStatus() {
return runStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void setName(String name) {

@Schema(description = "The current state of the Process Group, as it relates to the Versioned Flow",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "LOCALLY_MODIFIED, STALE, LOCALLY_MODIFIED_AND_STALE, UP_TO_DATE, SYNC_FAILURE")
allowableValues = {"LOCALLY_MODIFIED", "STALE", "LOCALLY_MODIFIED_AND_STALE", "UP_TO_DATE", "SYNC_FAILURE"})
public String getVersionedFlowState() {
return versionedFlowState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void setType(String type) {
}

@Schema(description = "The run status of the Processor",
allowableValues = "Running, Stopped, Validating, Disabled, Invalid")
allowableValues = {"Running", "Stopped", "Validating", "Disabled", "Invalid"})
public String getRunStatus() {
return runStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void setType(String type) {
* @return run status of this processor
*/
@Schema(description = "The state of the processor.",
allowableValues = "Running, Stopped, Validating, Disabled, Invalid"
allowableValues = {"Running", "Stopped", "Validating", "Disabled", "Invalid"}
)
public String getRunStatus() {
return runStatus;
Expand All @@ -108,7 +108,7 @@ public void setRunStatus(String runStatus) {
}

@Schema(description = "Indicates the node where the process will execute.",
allowableValues = "ALL, PRIMARY"
allowableValues = {"ALL", "PRIMARY"}
)
public String getExecutionNode() {
return executionNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void setStatsLastRefreshed(Date statsLastRefreshed) {
@Schema(description = "Indicates whether the component is valid, invalid, or still in the process of validating" +
" (i.e., it is unknown whether or not the component is valid)",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "VALID, INVALID, VALIDATING")
allowableValues = {"VALID", "INVALID", "VALIDATING"})
public String getValidationStatus() {
return validationStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ReportingTaskStatusDTO extends ComponentStatusDTO {

@Schema(description = "The run status of this ReportingTask",
accessMode = Schema.AccessMode.READ_ONLY,
allowableValues = "RUNNING, STOPPED, DISABLED")
allowableValues = {"RUNNING", "STOPPED", "DISABLED"})
@Override
public String getRunStatus() {
return super.getRunStatus();
Expand Down
Loading

0 comments on commit 4795805

Please sign in to comment.