This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 3761973061 NIFI-14850 Fixed OpenAPI Enum inconsistencies (#10198)
3761973061 is described below
commit 37619730618438853c9115d35c0c1311499a2b35
Author: Pierre Villard <[email protected]>
AuthorDate: Wed Aug 13 00:35:50 2025 +0200
NIFI-14850 Fixed OpenAPI Enum inconsistencies (#10198)
Signed-off-by: David Handermann <[email protected]>
---
.../org/apache/nifi/web/api/dto/ConnectionDTO.java | 18 ++++++++++--------
.../apache/nifi/web/api/dto/ProcessorConfigDTO.java | 6 +++---
.../api/dto/provenance/lineage/LineageRequestDTO.java | 2 +-
.../java/org/apache/nifi/web/api/FlowResource.java | 5 ++---
4 files changed, 16 insertions(+), 15 deletions(-)
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
index ea655f4a27..5fa1ab5e1f 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
@@ -17,8 +17,8 @@
package org.apache.nifi.web.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
-
import jakarta.xml.bind.annotation.XmlType;
+
import java.util.List;
import java.util.Set;
@@ -227,8 +227,9 @@ public class ConnectionDTO extends ComponentDTO {
this.prioritizers = 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"})
+ @Schema(description = "How to load balance the data in this Connection
across the nodes in the cluster. "
+ + "Possible returned values: DO_NOT_LOAD_BALANCE,
PARTITION_BY_ATTRIBUTE, ROUND_ROBIN, SINGLE_NODE. "
+ + "See LoadBalanceStrategy.class for more details.")
public String getLoadBalanceStrategy() {
return loadBalanceStrategy;
}
@@ -246,8 +247,9 @@ public class ConnectionDTO extends ComponentDTO {
this.loadBalancePartitionAttribute = 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"})
+ @Schema(description = "Whether or not data should be compressed when being
transferred between nodes in the cluster. "
+ + "Possible returned values: DO_NOT_COMPRESS,
COMPRESS_ATTRIBUTES_ONLY, COMPRESS_ATTRIBUTES_AND_CONTENT. "
+ + "See LoadBalanceCompression.class for more details.")
public String getLoadBalanceCompression() {
return loadBalanceCompression;
}
@@ -256,9 +258,9 @@ public class ConnectionDTO extends ComponentDTO {
this.loadBalanceCompression = 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},
+ @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. "
+ + "Possible returned values: LOAD_BALANCE_NOT_CONFIGURED,
LOAD_BALANCE_INACTIVE, LOAD_BALANCE_ACTIVE. See LoadBalanceStatus.class for
more details.",
accessMode = Schema.AccessMode.READ_ONLY)
public String getLoadBalanceStatus() {
return loadBalanceStatus;
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorConfigDTO.java
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorConfigDTO.java
index f7be45edf4..6349696858 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorConfigDTO.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorConfigDTO.java
@@ -17,8 +17,8 @@
package org.apache.nifi.web.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
-
import jakarta.xml.bind.annotation.XmlType;
+
import java.util.Map;
import java.util.Set;
@@ -331,8 +331,8 @@ public class ProcessorConfigDTO {
this.retriedRelationships = retriedRelationships;
}
- @Schema(description = "Determines whether the FlowFile should be penalized
or the processor should be yielded between retries.",
- allowableValues = {"PENALIZE_FLOWFILE", "YIELD_PROCESSOR"}
+ @Schema(description = "Determines whether the FlowFile should be penalized
or the processor should be yielded between retries. "
+ + "Possible returned values: PENALIZE_FLOWFILE, YIELD_PROCESSOR.
See BackoffMechanism.class for more details."
)
public String getBackoffMechanism() {
return backoffMechanism;
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/lineage/LineageRequestDTO.java
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/lineage/LineageRequestDTO.java
index 7e7c8f3282..86324c1804 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/lineage/LineageRequestDTO.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/lineage/LineageRequestDTO.java
@@ -67,7 +67,7 @@ public class LineageRequestDTO {
*/
@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", "FLOWFILE"}
+ implementation = LineageRequestType.class
)
public LineageRequestType getLineageRequestType() {
return lineageRequestType;
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
index 851bd8db19..2e538a807a 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
@@ -557,14 +557,13 @@ public class FlowResource extends ApplicationResource {
@Parameter(
description = "The producer for flow file metrics. Each
producer may have its own output format.",
required = true,
- schema = @Schema(allowableValues = {"prometheus", "json"})
+ schema = @Schema(implementation =
FlowMetricsProducer.class)
)
@PathParam("producer") final String producer,
@Parameter(
description = "Set of included metrics registries.
Duplicate the parameter to include multiple registries. " +
"All registries are included by default.",
-
- schema = @Schema(allowableValues = {"NIFI", "JVM",
"BULLETIN", "CONNECTION", "CLUSTER"})
+ schema = @Schema(implementation =
FlowMetricsRegistry.class)
)
@QueryParam("includedRegistries") final Set<FlowMetricsRegistry>
includedRegistries,
@Parameter(