Skip to content

Commit 4795805

Browse files
NIFI-14142 Fixed enum values for OpenAPI using String arrays (#9626)
Signed-off-by: David Handermann <exceptionfactory@apache.org>
1 parent 25ca4b4 commit 4795805

File tree

46 files changed

+66
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+66
-68
lines changed

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/AccessPolicySummaryDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AccessPolicySummaryDTO extends ComponentDTO {
3636
* @return The action associated with this access policy.
3737
*/
3838
@Schema(description = "The action associated with this access policy.",
39-
allowableValues = "read, write"
39+
allowableValues = {"read", "write"}
4040
)
4141
public String getAction() {
4242
return action;

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/AffectedComponentDTO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public void setId(final String id) {
6060
}
6161

6262
@Schema(description = "The type of this component",
63-
allowableValues = COMPONENT_TYPE_PROCESSOR + "," + COMPONENT_TYPE_CONTROLLER_SERVICE + ", "
64-
+ COMPONENT_TYPE_INPUT_PORT + ", " + COMPONENT_TYPE_OUTPUT_PORT + ", "
65-
+ COMPONENT_TYPE_REMOTE_INPUT_PORT + ", " + COMPONENT_TYPE_REMOTE_OUTPUT_PORT + ", " + COMPONENT_TYPE_STATELESS_GROUP)
63+
allowableValues = {COMPONENT_TYPE_PROCESSOR, COMPONENT_TYPE_CONTROLLER_SERVICE,
64+
COMPONENT_TYPE_INPUT_PORT, COMPONENT_TYPE_OUTPUT_PORT,
65+
COMPONENT_TYPE_REMOTE_INPUT_PORT, COMPONENT_TYPE_REMOTE_OUTPUT_PORT, COMPONENT_TYPE_STATELESS_GROUP})
6666
public String getReferenceType() {
6767
return referenceType;
6868
}

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConfigVerificationResultDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ConfigVerificationResultDTO {
2424
private String verificationStepName;
2525
private String explanation;
2626

27-
@Schema(description = "The outcome of the verification", allowableValues = "SUCCESSFUL, FAILED, SKIPPED")
27+
@Schema(description = "The outcome of the verification", allowableValues = {"SUCCESSFUL", "FAILED", "SKIPPED"})
2828
public String getOutcome() {
2929
return outcome;
3030
}

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectableDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void setVersionedComponentId(final String id) {
6565
*/
6666
@Schema(description = "The type of component the connectable is.",
6767
requiredMode = Schema.RequiredMode.REQUIRED,
68-
allowableValues = "PROCESSOR, REMOTE_INPUT_PORT, REMOTE_OUTPUT_PORT, INPUT_PORT, OUTPUT_PORT, FUNNEL"
68+
allowableValues = {"PROCESSOR", "REMOTE_INPUT_PORT", "REMOTE_OUTPUT_PORT", "INPUT_PORT", "OUTPUT_PORT", "FUNNEL"}
6969
)
7070
public String getType() {
7171
return type;

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void setPrioritizers(List<String> prioritizers) {
228228
}
229229

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

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

259259
@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 " +
260260
"is configured but inactive (not currently transferring data to another node), or that Load Balancing is configured and actively transferring data to another node.",
261-
allowableValues = LOAD_BALANCE_NOT_CONFIGURED + ", " + LOAD_BALANCE_INACTIVE + ", " + LOAD_BALANCE_ACTIVE,
261+
allowableValues = {LOAD_BALANCE_NOT_CONFIGURED, LOAD_BALANCE_INACTIVE, LOAD_BALANCE_ACTIVE},
262262
accessMode = Schema.AccessMode.READ_ONLY)
263263
public String getLoadBalanceStatus() {
264264
return loadBalanceStatus;

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerServiceDTO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void setSupportsSensitiveDynamicProperties(final Boolean supportsSensitiv
224224
* @return The state of this controller service. Possible values are ENABLED, ENABLING, DISABLED, DISABLING
225225
*/
226226
@Schema(description = "The state of the controller service.",
227-
allowableValues = "ENABLED, ENABLING, DISABLED, DISABLING"
227+
allowableValues = {"ENABLED", "ENABLING", "DISABLED", "DISABLING"}
228228
)
229229
public String getState() {
230230
return state;
@@ -332,7 +332,7 @@ public void setValidationErrors(Collection<String> validationErrors) {
332332

333333
@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)",
334334
accessMode = Schema.AccessMode.READ_ONLY,
335-
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
335+
allowableValues = {VALID, INVALID, VALIDATING})
336336
public String getValidationStatus() {
337337
return validationStatus;
338338
}

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerServiceReferencingComponentDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void setState(String state) {
118118
* @return type of reference this is (Processor, ControllerService, ParameterProvider, or ReportingTask)
119119
*/
120120
@Schema(description = "The type of reference this is.",
121-
allowableValues = "Processor, ControllerService, ReportingTask, FlowRegistryClient"
121+
allowableValues = {"Processor", "ControllerService", "ReportingTask", "FlowRegistryClient"}
122122
)
123123
public String getReferenceType() {
124124
return referenceType;

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowAnalysisRuleDTO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void setSupportsSensitiveDynamicProperties(final Boolean supportsSensitiv
185185
* @return current scheduling state of the flow analysis rule
186186
*/
187187
@Schema(description = "The state of the flow analysis rule.",
188-
allowableValues = "ENABLED, DISABLED"
188+
allowableValues = {"ENABLED", "DISABLED"}
189189
)
190190
public String getState() {
191191
return state;
@@ -265,7 +265,7 @@ public void setValidationErrors(Collection<String> validationErrors) {
265265

266266
@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)",
267267
accessMode = Schema.AccessMode.READ_ONLY,
268-
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
268+
allowableValues = {VALID, INVALID, VALIDATING})
269269
public String getValidationStatus() {
270270
return validationStatus;
271271
}

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/FlowRegistryClientDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void setValidationErrors(Collection<String> validationErrors) {
213213

214214
@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)",
215215
accessMode = Schema.AccessMode.READ_ONLY,
216-
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
216+
allowableValues = {VALID, INVALID, VALIDATING})
217217
public String getValidationStatus() {
218218
return validationStatus;
219219
}

nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ParameterProviderDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public void setValidationErrors(Collection<String> validationErrors) {
284284

285285
@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)",
286286
accessMode = Schema.AccessMode.READ_ONLY,
287-
allowableValues = VALID + ", " + INVALID + ", " + VALIDATING)
287+
allowableValues = {VALID, INVALID, VALIDATING})
288288
public String getValidationStatus() {
289289
return validationStatus;
290290
}

0 commit comments

Comments
 (0)