NIFI-12591 Upgraded from Swagger Annotations 1.6.12 to 2.2.20

- Added nifi-swagger-integration with ObjectMapperProcessor for enum customization
- Changed nifi-web-api REST API documentation to use HTML template from swagger-codegen-maven-plugin

Upgraded references in multiple modules:

- c2-protocol-api
- c2-protocol-component-api
- minifi-c2-service
- nifi-api
- nifi-client-dto
- nifi-extension-manifest-model
- nifi-registry-revision-entity-model
- nifi-registry-data-model
- nifi-registry-web-api
- nifi-web-api

Signed-off-by: Csaba Bejan <bejan.csaba@gmail.com>

This closes #8232.
This commit is contained in:
exceptionfactory 2024-01-09 14:59:59 -06:00 committed by Csaba Bejan
parent dd5854d324
commit dc87cfa9ab
No known key found for this signature in database
GPG Key ID: C59951609F8BDDEB
477 changed files with 12785 additions and 14834 deletions

View File

@ -17,13 +17,11 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.c2.protocol.component.api.RuntimeManifest; import org.apache.nifi.c2.protocol.component.api.RuntimeManifest;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class AgentInfo implements Serializable { public class AgentInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -33,10 +31,7 @@ public class AgentInfo implements Serializable {
private RuntimeManifest agentManifest; private RuntimeManifest agentManifest;
private AgentStatus status; private AgentStatus status;
@ApiModelProperty( @Schema(description = "A unique identifier for the Agent. Usually set when the agent is provisioned and deployed")
value = "A unique identifier for the Agent",
notes = "Usually set when the agent is provisioned and deployed",
required = true)
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -45,9 +40,7 @@ public class AgentInfo implements Serializable {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty( @Schema(description = "The class or category label of the agent, e.g., 'sensor-collector'. Usually set when the agent is provisioned and deployed")
value = "The class or category label of the agent, e.g., 'sensor-collector'",
notes = "Usually set when the agent is provisioned and deployed")
public String getAgentClass() { public String getAgentClass() {
return agentClass; return agentClass;
} }
@ -56,7 +49,7 @@ public class AgentInfo implements Serializable {
this.agentClass = agentClass; this.agentClass = agentClass;
} }
@ApiModelProperty("The hash code of the manifest definition generated by the agent.") @Schema(description = "The hash code of the manifest definition generated by the agent.")
public String getAgentManifestHash() { public String getAgentManifestHash() {
return this.agentManifestHash; return this.agentManifestHash;
} }
@ -65,7 +58,7 @@ public class AgentInfo implements Serializable {
this.agentManifestHash = agentManifestHash; this.agentManifestHash = agentManifestHash;
} }
@ApiModelProperty("The specification of the agent's capabilities") @Schema(description = "The specification of the agent's capabilities")
public RuntimeManifest getAgentManifest() { public RuntimeManifest getAgentManifest() {
return agentManifest; return agentManifest;
} }
@ -74,7 +67,7 @@ public class AgentInfo implements Serializable {
this.agentManifest = runtimeManifest; this.agentManifest = runtimeManifest;
} }
@ApiModelProperty("A summary of the runtime status of the agent") @Schema(description = "A summary of the runtime status of the agent")
public AgentStatus getStatus() { public AgentStatus getStatus() {
return status; return status;
} }

View File

@ -17,17 +17,16 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.nifi.c2.protocol.component.api.RuntimeManifest; import org.apache.nifi.c2.protocol.component.api.RuntimeManifest;
@ApiModel
public class AgentManifest extends RuntimeManifest { public class AgentManifest extends RuntimeManifest {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("All supported operations by agent") @Schema(description = "All supported operations by agent")
private Set<SupportedOperation> supportedOperations; private Set<SupportedOperation> supportedOperations;
public AgentManifest() { public AgentManifest() {

View File

@ -17,18 +17,14 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class AgentRepositories implements Serializable { public class AgentRepositories implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private AgentRepositoryStatus flowFile; private AgentRepositoryStatus flowFile;
private AgentRepositoryStatus provenance; private AgentRepositoryStatus provenance;
@ApiModelProperty
public AgentRepositoryStatus getFlowFile() { public AgentRepositoryStatus getFlowFile() {
return flowFile; return flowFile;
} }
@ -37,7 +33,6 @@ public class AgentRepositories implements Serializable {
this.flowFile = flowFile; this.flowFile = flowFile;
} }
@ApiModelProperty
public AgentRepositoryStatus getProvenance() { public AgentRepositoryStatus getProvenance() {
return provenance; return provenance;
} }

View File

@ -17,12 +17,10 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class AgentRepositoryStatus implements Serializable { public class AgentRepositoryStatus implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,7 +29,7 @@ public class AgentRepositoryStatus implements Serializable {
private Long dataSize; private Long dataSize;
private Long dataSizeMax; private Long dataSizeMax;
@ApiModelProperty(value = "The number of items in the repository", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The number of items in the repository", allowableValues = "range[0, 9223372036854775807]")
public Long getSize() { public Long getSize() {
return size; return size;
} }
@ -40,7 +38,7 @@ public class AgentRepositoryStatus implements Serializable {
this.size = size; this.size = size;
} }
@ApiModelProperty(value = "The maximum number of items the repository is capable of storing", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The maximum number of items the repository is capable of storing", allowableValues = "range[0, 9223372036854775807]")
public Long getSizeMax() { public Long getSizeMax() {
return sizeMax; return sizeMax;
} }
@ -49,7 +47,7 @@ public class AgentRepositoryStatus implements Serializable {
this.sizeMax = sizeMax; this.sizeMax = sizeMax;
} }
@ApiModelProperty(value = "The data size (in Bytes) of all items in the repository", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The data size (in Bytes) of all items in the repository", allowableValues = "range[0, 9223372036854775807]")
public Long getDataSize() { public Long getDataSize() {
return dataSize; return dataSize;
} }
@ -58,7 +56,7 @@ public class AgentRepositoryStatus implements Serializable {
this.dataSize = dataSize; this.dataSize = dataSize;
} }
@ApiModelProperty(value = "The maximum data size (in Bytes) that the repository is capable of storing", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The maximum data size (in Bytes) that the repository is capable of storing", allowableValues = "range[0, 9223372036854775807]")
public Long getDataSizeMax() { public Long getDataSizeMax() {
return dataSizeMax; return dataSizeMax;
} }
@ -75,7 +73,7 @@ public class AgentRepositoryStatus implements Serializable {
* *
* @return a decimal between [0, 1] representing the sizeMax utilization percentage * @return a decimal between [0, 1] representing the sizeMax utilization percentage
*/ */
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public Double getSizeUtilization() { public Double getSizeUtilization() {
return size != null && sizeMax != null && sizeMax > 0 ? (double) size / (double) sizeMax : null; return size != null && sizeMax != null && sizeMax > 0 ? (double) size / (double) sizeMax : null;
} }
@ -86,7 +84,7 @@ public class AgentRepositoryStatus implements Serializable {
* *
* @return a decimal between [0, 1] representing the dataSizeMax utilization percentage * @return a decimal between [0, 1] representing the dataSizeMax utilization percentage
*/ */
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public Double getDataSizeUtilization() { public Double getDataSizeUtilization() {
return dataSize != null && dataSizeMax != null && dataSizeMax > 0 ? (double) dataSize / (double) dataSizeMax : null; return dataSize != null && dataSizeMax != null && dataSizeMax > 0 ? (double) dataSize / (double) dataSizeMax : null;
} }

View File

@ -17,21 +17,20 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Resource consumption of the given agent * Resource consumption of the given agent
*/ */
@ApiModel
public class AgentResourceConsumption implements Serializable { public class AgentResourceConsumption implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long memoryUsage; private Long memoryUsage;
private Double cpuUtilization; private Double cpuUtilization;
@ApiModelProperty("The memory footprint of the agent in bytes.") @Schema(description = "The memory footprint of the agent in bytes.")
public Long getMemoryUsage() { public Long getMemoryUsage() {
return memoryUsage; return memoryUsage;
} }
@ -40,7 +39,7 @@ public class AgentResourceConsumption implements Serializable {
this.memoryUsage = memoryUsage; this.memoryUsage = memoryUsage;
} }
@ApiModelProperty("The CPU utilisation of the agent [0.0 - 1.0] and -1.0 in case of errors.") @Schema(description = "The CPU utilisation of the agent [0.0 - 1.0] and -1.0 in case of errors.")
public Double getCpuUtilization() { public Double getCpuUtilization() {
return cpuUtilization; return cpuUtilization;
} }

View File

@ -17,8 +17,8 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
@ -26,7 +26,6 @@ import java.util.Map;
* Status of the aspects of the agent, including any agent components that are controllable by the C2 server, ie: * Status of the aspects of the agent, including any agent components that are controllable by the C2 server, ie:
* - Repositories that can be cleared and their current state * - Repositories that can be cleared and their current state
*/ */
@ApiModel
public class AgentStatus implements Serializable { public class AgentStatus implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -35,7 +34,7 @@ public class AgentStatus implements Serializable {
private Map<String, ComponentStatus> components; private Map<String, ComponentStatus> components;
private AgentResourceConsumption resourceConsumption; private AgentResourceConsumption resourceConsumption;
@ApiModelProperty("The number of milliseconds since the agent started.") @Schema(description = "The number of milliseconds since the agent started.")
public Long getUptime() { public Long getUptime() {
return uptime; return uptime;
} }
@ -44,7 +43,7 @@ public class AgentStatus implements Serializable {
this.uptime = uptime; this.uptime = uptime;
} }
@ApiModelProperty("Status and metrics for the agent repositories") @Schema(description = "Status and metrics for the agent repositories")
public AgentRepositories getRepositories() { public AgentRepositories getRepositories() {
return repositories; return repositories;
} }
@ -53,7 +52,7 @@ public class AgentStatus implements Serializable {
this.repositories = repositories; this.repositories = repositories;
} }
@ApiModelProperty("Status for shared agent components (that is, components that exist outside the context of a specific flow).") @Schema(description = "Status for shared agent components (that is, components that exist outside the context of a specific flow).")
public Map<String, ComponentStatus> getComponents() { public Map<String, ComponentStatus> getComponents() {
return components; return components;
} }
@ -62,7 +61,7 @@ public class AgentStatus implements Serializable {
this.components = components; this.components = components;
} }
@ApiModelProperty("Resource consumption details of the agent.") @Schema(description = "Resource consumption details of the agent.")
public AgentResourceConsumption getResourceConsumption() { public AgentResourceConsumption getResourceConsumption() {
return resourceConsumption; return resourceConsumption;
} }

View File

@ -17,8 +17,7 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ -26,7 +25,6 @@ import java.util.Objects;
/** /**
* An object representation of a Heartbeat in the C2 protocol * An object representation of a Heartbeat in the C2 protocol
*/ */
@ApiModel
public class C2Heartbeat implements Serializable { public class C2Heartbeat implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -37,7 +35,7 @@ public class C2Heartbeat implements Serializable {
private AgentInfo agentInfo; private AgentInfo agentInfo;
private FlowInfo flowInfo; private FlowInfo flowInfo;
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -46,7 +44,7 @@ public class C2Heartbeat implements Serializable {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public Long getCreated() { public Long getCreated() {
return created; return created;
} }
@ -55,7 +53,7 @@ public class C2Heartbeat implements Serializable {
this.created = created; this.created = created;
} }
@ApiModelProperty("Metadata for the device") @Schema(description = "Metadata for the device")
public DeviceInfo getDeviceInfo() { public DeviceInfo getDeviceInfo() {
return deviceInfo; return deviceInfo;
} }
@ -64,7 +62,7 @@ public class C2Heartbeat implements Serializable {
this.deviceInfo = deviceInfo; this.deviceInfo = deviceInfo;
} }
@ApiModelProperty("Metadata for the agent installed on the device") @Schema(description = "Metadata for the agent installed on the device")
public AgentInfo getAgentInfo() { public AgentInfo getAgentInfo() {
return agentInfo; return agentInfo;
} }
@ -73,7 +71,7 @@ public class C2Heartbeat implements Serializable {
this.agentInfo = agentInfo; this.agentInfo = agentInfo;
} }
@ApiModelProperty("Metadata for the flow currently deployed to the agent") @Schema(description = "Metadata for the flow currently deployed to the agent")
public FlowInfo getFlowInfo() { public FlowInfo getFlowInfo() {
return flowInfo; return flowInfo;
} }
@ -83,22 +81,22 @@ public class C2Heartbeat implements Serializable {
} }
// Convenience getters // Convenience getters
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getDeviceId() { public String getDeviceId() {
return deviceInfo != null ? deviceInfo.getIdentifier() : null; return deviceInfo != null ? deviceInfo.getIdentifier() : null;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getAgentId() { public String getAgentId() {
return agentInfo != null ? agentInfo.getIdentifier() : null; return agentInfo != null ? agentInfo.getIdentifier() : null;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getAgentClass() { public String getAgentClass() {
return agentInfo != null ? agentInfo.getAgentClass() : null; return agentInfo != null ? agentInfo.getAgentClass() : null;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getAgentManifestId() { public String getAgentManifestId() {
if (agentInfo != null && agentInfo.getAgentManifest() != null) { if (agentInfo != null && agentInfo.getAgentManifest() != null) {
return agentInfo.getAgentManifest().getIdentifier(); return agentInfo.getAgentManifest().getIdentifier();
@ -106,7 +104,7 @@ public class C2Heartbeat implements Serializable {
return null; return null;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getFlowId() { public String getFlowId() {
return flowInfo != null ? flowInfo.getFlowId() : null; return flowInfo != null ? flowInfo.getFlowId() : null;
} }

View File

@ -17,18 +17,14 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ApiModel
public class C2HeartbeatResponse implements Serializable { public class C2HeartbeatResponse implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private List<C2Operation> requestedOperations; private List<C2Operation> requestedOperations;
@ApiModelProperty
public List<C2Operation> getRequestedOperations() { public List<C2Operation> getRequestedOperations() {
return requestedOperations; return requestedOperations;
} }

View File

@ -17,8 +17,8 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ -26,7 +26,6 @@ import java.util.Set;
import static java.lang.String.format; import static java.lang.String.format;
@ApiModel
public class C2Operation implements Serializable { public class C2Operation implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -36,7 +35,7 @@ public class C2Operation implements Serializable {
private Map<String, String> args; private Map<String, String> args;
private Set<String> dependencies; private Set<String> dependencies;
@ApiModelProperty(value = "A unique identifier for the operation", accessMode = ApiModelProperty.AccessMode.READ_ONLY) @Schema(description = "A unique identifier for the operation", accessMode = Schema.AccessMode.READ_ONLY)
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -45,7 +44,7 @@ public class C2Operation implements Serializable {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty(value = "The type of operation", required = true) @Schema(description = "The type of operation")
public OperationType getOperation() { public OperationType getOperation() {
return operation; return operation;
} }
@ -58,13 +57,7 @@ public class C2Operation implements Serializable {
this.operation = operation; this.operation = operation;
} }
@ApiModelProperty( @Schema(description = "The primary operand of the operation")
value = "The primary operand of the operation",
notes = "This is an optional field which contains the name of the entity that is target of the operation. " +
"Most operations can be fully specified with zero or one operands." +
"If no operand is needed, this field will be absent." +
"If one operand is insufficient, the operation will contain an args map" +
"with additional keyword parameters and values (see 'args').")
public OperandType getOperand() { public OperandType getOperand() {
return operand; return operand;
} }
@ -77,8 +70,7 @@ public class C2Operation implements Serializable {
this.operand = operand; this.operand = operand;
} }
@ApiModelProperty(value = "If the operation requires arguments ", @Schema(description = "This is an optional field and only provided when an operation has arguments " +
notes = "This is an optional field and only provided when an operation has arguments " +
"in additional to the primary operand or optional parameters. Arguments are " + "in additional to the primary operand or optional parameters. Arguments are " +
"arbitrary key-value pairs whose interpretation is subject to the context" + "arbitrary key-value pairs whose interpretation is subject to the context" +
"of the operation and operand. For example, given:" + "of the operation and operand. For example, given:" +
@ -95,7 +87,7 @@ public class C2Operation implements Serializable {
this.args = args; this.args = args;
} }
@ApiModelProperty("Optional set of operation ids that this operation depends on. " + @Schema(description = "Optional set of operation ids that this operation depends on. " +
"Executing this operation is conditional on the success of all dependency operations.") "Executing this operation is conditional on the success of all dependency operations.")
public Set<String> getDependencies() { public Set<String> getDependencies() {
return dependencies; return dependencies;

View File

@ -17,29 +17,28 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class C2OperationAck implements Serializable { public class C2OperationAck implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("The id of the requested operation that is being acknowledged") @Schema(description = "The id of the requested operation that is being acknowledged")
private String operationId; private String operationId;
@ApiModelProperty("The agent's status response for this operation ID") @Schema(description = "The agent's status response for this operation ID")
private C2OperationState operationState; private C2OperationState operationState;
// Optional, additional details that can be included in an ACK // Optional, additional details that can be included in an ACK
@ApiModelProperty("Optionally, an ack can include device info that is relevant to the operation being acknowledged") @Schema(description = "Optionally, an ack can include device info that is relevant to the operation being acknowledged")
private DeviceInfo deviceInfo; private DeviceInfo deviceInfo;
@ApiModelProperty("Optionally, an ack can include agent info that is relevant to the operation being acknowledged") @Schema(description = "Optionally, an ack can include agent info that is relevant to the operation being acknowledged")
private AgentInfo agentInfo; private AgentInfo agentInfo;
@ApiModelProperty("Optionally, an ack can include flow info that is relevant to the operation being acknowledged") @Schema(description = "Optionally, an ack can include flow info that is relevant to the operation being acknowledged")
private FlowInfo flowInfo; private FlowInfo flowInfo;

View File

@ -17,8 +17,8 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ -33,16 +33,13 @@ import java.util.Objects;
* some insight, but a pre-condition and post-condition failure may better indicate how to arrive at operational * some insight, but a pre-condition and post-condition failure may better indicate how to arrive at operational
* success. * success.
*/ */
@ApiModel
public class C2OperationState implements Serializable { public class C2OperationState implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "State of the operation performed", required = true, example = "FULLY_APPLIED") @Schema(description = "State of the operation performed", example = "FULLY_APPLIED")
private OperationState state; private OperationState state;
@ApiModelProperty( @Schema(description = "Additional details about the state")
value = "Additional details about the state",
example = "Operation failed due to missing processor(s)")
private String details; private String details;
public String getDetails() { public String getDetails() {

View File

@ -17,17 +17,13 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class ComponentStatus implements Serializable { public class ComponentStatus implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Boolean running; private Boolean running;
@ApiModelProperty
public Boolean getRunning() { public Boolean getRunning() {
return running; return running;
} }

View File

@ -17,24 +17,21 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class DeviceInfo implements Serializable { public class DeviceInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty( @Schema(description = "A unique, long-lived identifier for the device")
value = "A unique, long-lived identifier for the device",
required = true)
private String identifier; private String identifier;
@ApiModelProperty("Metadata for the device hardware and operating system") @Schema(description = "Metadata for the device hardware and operating system")
private SystemInfo systemInfo; private SystemInfo systemInfo;
@ApiModelProperty("Metadata for the network interface of this device") @Schema(description = "Metadata for the network interface of this device")
private NetworkInfo networkInfo; private NetworkInfo networkInfo;
public String getIdentifier() { public String getIdentifier() {

View File

@ -17,12 +17,11 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
@ApiModel
public class FlowInfo implements Serializable { public class FlowInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,7 +30,7 @@ public class FlowInfo implements Serializable {
private Map<String, ComponentStatus> components; private Map<String, ComponentStatus> components;
private Map<String, FlowQueueStatus> queues; private Map<String, FlowQueueStatus> queues;
@ApiModelProperty(value = "A unique identifier of the flow currently deployed on the agent", required = true) @Schema(description = "A unique identifier of the flow currently deployed on the agent")
public String getFlowId() { public String getFlowId() {
return flowId; return flowId;
} }
@ -40,7 +39,7 @@ public class FlowInfo implements Serializable {
this.flowId = flowId; this.flowId = flowId;
} }
@ApiModelProperty("The Uniform Resource Identifier (URI) for the flow") @Schema(description = "The Uniform Resource Identifier (URI) for the flow")
public FlowUri getFlowUri() { public FlowUri getFlowUri() {
return flowUri; return flowUri;
} }
@ -49,7 +48,7 @@ public class FlowInfo implements Serializable {
this.flowUri = flowUri; this.flowUri = flowUri;
} }
@ApiModelProperty("Status and for each component that is part of the flow (e.g., processors)") @Schema(description = "Status and for each component that is part of the flow (e.g., processors)")
public Map<String, ComponentStatus> getComponents() { public Map<String, ComponentStatus> getComponents() {
return components; return components;
} }
@ -58,7 +57,7 @@ public class FlowInfo implements Serializable {
this.components = components; this.components = components;
} }
@ApiModelProperty("Status and metrics for each flow connection queue") @Schema(description = "Status and metrics for each flow connection queue")
public Map<String, FlowQueueStatus> getQueues() { public Map<String, FlowQueueStatus> getQueues() {
return queues; return queues;
} }

View File

@ -17,12 +17,10 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class FlowQueueStatus implements Serializable { public class FlowQueueStatus implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,7 +29,7 @@ public class FlowQueueStatus implements Serializable {
private Long dataSize; private Long dataSize;
private Long dataSizeMax; private Long dataSizeMax;
@ApiModelProperty(value = "The number of flow files in the queue", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The number of flow files in the queue", allowableValues = "range[0, 9223372036854775807]")
public Long getSize() { public Long getSize() {
return size; return size;
} }
@ -40,7 +38,7 @@ public class FlowQueueStatus implements Serializable {
this.size = size; this.size = size;
} }
@ApiModelProperty(value = "The maximum number of flow files that the queue is configured to hold", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The maximum number of flow files that the queue is configured to hold", allowableValues = "range[0, 9223372036854775807]")
public Long getSizeMax() { public Long getSizeMax() {
return sizeMax; return sizeMax;
} }
@ -49,7 +47,7 @@ public class FlowQueueStatus implements Serializable {
this.sizeMax = sizeMax; this.sizeMax = sizeMax;
} }
@ApiModelProperty(value = "The size (in Bytes) of all flow files in the queue", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The size (in Bytes) of all flow files in the queue", allowableValues = "range[0, 9223372036854775807]")
public Long getDataSize() { public Long getDataSize() {
return dataSize; return dataSize;
} }
@ -58,7 +56,7 @@ public class FlowQueueStatus implements Serializable {
this.dataSize = dataSize; this.dataSize = dataSize;
} }
@ApiModelProperty(value = "The maximum size (in Bytes) that the queue is configured to hold", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "The maximum size (in Bytes) that the queue is configured to hold", allowableValues = "range[0, 9223372036854775807]")
public Long getDataSizeMax() { public Long getDataSizeMax() {
return dataSizeMax; return dataSizeMax;
} }
@ -75,7 +73,7 @@ public class FlowQueueStatus implements Serializable {
* *
* @return a decimal between [0, 1] representing the sizeMax utilization percentage * @return a decimal between [0, 1] representing the sizeMax utilization percentage
*/ */
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public Double getSizeUtilization() { public Double getSizeUtilization() {
return size != null && sizeMax != null && sizeMax > 0 ? (double) size / (double) sizeMax : null; return size != null && sizeMax != null && sizeMax > 0 ? (double) size / (double) sizeMax : null;
} }
@ -86,7 +84,7 @@ public class FlowQueueStatus implements Serializable {
* *
* @return a decimal between [0, 1] representing the dataSizeMax utilization percentage * @return a decimal between [0, 1] representing the dataSizeMax utilization percentage
*/ */
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public Double getDataSizeUtilization() { public Double getDataSizeUtilization() {
return dataSize != null && dataSizeMax != null && dataSizeMax > 0 ? (double) dataSize / (double) dataSizeMax : null; return dataSize != null && dataSizeMax != null && dataSizeMax > 0 ? (double) dataSize / (double) dataSizeMax : null;
} }

View File

@ -17,14 +17,12 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel( @Schema(description = "Uniform Resource Identifier for flows, used to uniquely identify a flow version")
value = "FlowUri",
description = "Uniform Resource Identifier for flows, used to uniquely identify a flow version ")
public class FlowUri implements Serializable { public class FlowUri implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -17,20 +17,14 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class Location implements Serializable { public class Location implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty
private Double latitude; private Double latitude;
@ApiModelProperty
private Double longitude; private Double longitude;
public Double getLatitude() { public Double getLatitude() {

View File

@ -17,21 +17,20 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class NetworkInfo implements Serializable { public class NetworkInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("The device network interface ID") @Schema(description = "The device network interface ID")
private String deviceId; private String deviceId;
@ApiModelProperty("The device network hostname") @Schema(description = "The device network hostname")
private String hostname; private String hostname;
@ApiModelProperty("The device network interface IP Address (v4 or v6)") @Schema(description = "The device network interface IP Address (v4 or v6)")
private String ipAddress; private String ipAddress;
public String getDeviceId() { public String getDeviceId() {

View File

@ -17,10 +17,8 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class Operation extends C2Operation { public class Operation extends C2Operation {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +30,7 @@ public class Operation extends C2Operation {
private Long created; private Long created;
private Long updated; private Long updated;
@ApiModelProperty("The identifier of the agent to which the operation applies") @Schema(description = "The identifier of the agent to which the operation applies")
public String getTargetAgentId() { public String getTargetAgentId() {
return targetAgentId; return targetAgentId;
} }
@ -41,9 +39,7 @@ public class Operation extends C2Operation {
this.targetAgentId = targetAgentId; this.targetAgentId = targetAgentId;
} }
@ApiModelProperty( @Schema(description = "The current state of the operation", accessMode = Schema.AccessMode.READ_ONLY)
value = "The current state of the operation",
accessMode = ApiModelProperty.AccessMode.READ_ONLY)
public OperationState getState() { public OperationState getState() {
return state; return state;
} }
@ -52,7 +48,7 @@ public class Operation extends C2Operation {
this.state = state; this.state = state;
} }
@ApiModelProperty(hidden = true) @Schema(hidden = true)
public String getBulkOperationId() { public String getBulkOperationId() {
return bulkOperationId; return bulkOperationId;
} }
@ -61,11 +57,8 @@ public class Operation extends C2Operation {
this.bulkOperationId = bulkOperationId; this.bulkOperationId = bulkOperationId;
} }
@ApiModelProperty(value = "The verified identity of the C2 client that created the operation", @Schema(description = "The verified identity of the C2 client that created the operation",
accessMode = ApiModelProperty.AccessMode.READ_ONLY, accessMode = Schema.AccessMode.READ_ONLY)
notes = "This field is set by the server when an operation request is submitted to identify the origin. " +
"When the C2 instance is secured, this is the client principal identity (e.g., certificate DN). " +
"When the C2 instances is unsecured, this will be 'anonymous' as client identity can not be authenticated.")
public String getCreatedBy() { public String getCreatedBy() {
return createdBy; return createdBy;
} }
@ -74,7 +67,7 @@ public class Operation extends C2Operation {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
@ApiModelProperty("The time (in milliseconds since Epoch) that this operation was created") @Schema(description = "The time (in milliseconds since Epoch) that this operation was created")
public Long getCreated() { public Long getCreated() {
return created; return created;
} }
@ -83,7 +76,7 @@ public class Operation extends C2Operation {
this.created = created; this.created = created;
} }
@ApiModelProperty("The time (in milliseconds since Epoch) that this operation was last updated") @Schema(description = "The time (in milliseconds since Epoch) that this operation was last updated")
public Long getUpdated() { public Long getUpdated() {
return updated; return updated;
} }
@ -92,7 +85,7 @@ public class Operation extends C2Operation {
this.updated = updated; this.updated = updated;
} }
@ApiModelProperty(value = "Additional details about the state of this operation (such as an error message).") @Schema(description = "Additional details about the state of this operation (such as an error message).")
public String getDetails() { public String getDetails() {
return details; return details;
} }

View File

@ -17,20 +17,19 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class SupportedOperation implements Serializable { public class SupportedOperation implements Serializable {
private static final long serialVersionUID = 1; private static final long serialVersionUID = 1;
@ApiModelProperty("The type of the operation supported by the agent") @Schema(description = "The type of the operation supported by the agent")
private OperationType type; private OperationType type;
@ApiModelProperty("Operand specific properties defined by the agent") @Schema(description = "Operand specific properties defined by the agent")
private Map<OperandType, Map<String, Object>> properties; private Map<OperandType, Map<String, Object>> properties;
public OperationType getType() { public OperationType getType() {

View File

@ -17,34 +17,32 @@
package org.apache.nifi.c2.protocol.api; package org.apache.nifi.c2.protocol.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class SystemInfo implements Serializable { public class SystemInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("Machine architecture of the device, e.g., ARM, x86") @Schema(description = "Machine architecture of the device, e.g., ARM, x86")
private String machineArch; private String machineArch;
private String operatingSystem; private String operatingSystem;
@ApiModelProperty(value = "Size of physical memory of the device in bytes", allowableValues = "range[0, 9223372036854775807]") @Schema(description = "Size of physical memory of the device in bytes", allowableValues = "range[0, 9223372036854775807]")
private Long physicalMem; private Long physicalMem;
@ApiModelProperty( @Schema(description = "Number of virtual cores on the device",
value = "Number of virtual cores on the device",
name = "vCores", name = "vCores",
allowableValues = "range[0, 2147483647]") allowableValues = "range[0, 2147483647]")
private Integer vCores; private Integer vCores;
@ApiModelProperty @Schema(description = "Memory usage")
private Long memoryUsage; private Long memoryUsage;
@ApiModelProperty @Schema(description = "CPU utilization")
private Double cpuUtilization; private Double cpuUtilization;
private Double cpuLoadAverage; private Double cpuLoadAverage;
public String getMachineArch() { public String getMachineArch() {

View File

@ -31,7 +31,7 @@ limitations under the License.
<artifactId>nifi-api</artifactId> <artifactId>nifi-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

View File

@ -16,16 +16,14 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class Attribute { public class Attribute {
private String name; private String name;
private String description; private String description;
@ApiModelProperty(value = "The name of the attribute") @Schema(description = "The name of the attribute")
public String getName() { public String getName() {
return name; return name;
} }
@ -34,7 +32,7 @@ public class Attribute {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the attribute") @Schema(description = "The description of the attribute")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -17,11 +17,10 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class BuildInfo implements Serializable { public class BuildInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +31,7 @@ public class BuildInfo implements Serializable {
private String compiler; private String compiler;
private String compilerFlags; private String compilerFlags;
@ApiModelProperty("The version number of the built component.") @Schema(description = "The version number of the built component.")
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -41,7 +40,7 @@ public class BuildInfo implements Serializable {
this.version = version; this.version = version;
} }
@ApiModelProperty("The SCM revision id of the source code used for this build.") @Schema(description = "The SCM revision id of the source code used for this build.")
public String getRevision() { public String getRevision() {
return revision; return revision;
} }
@ -50,7 +49,7 @@ public class BuildInfo implements Serializable {
this.revision = revision; this.revision = revision;
} }
@ApiModelProperty("The timestamp (milliseconds since Epoch) of the build.") @Schema(description = "The timestamp (milliseconds since Epoch) of the build.")
public Long getTimestamp() { public Long getTimestamp() {
return timestamp; return timestamp;
} }
@ -59,7 +58,7 @@ public class BuildInfo implements Serializable {
this.timestamp = timestamp; this.timestamp = timestamp;
} }
@ApiModelProperty("The target architecture of the built component.") @Schema(description = "The target architecture of the built component.")
public String getTargetArch() { public String getTargetArch() {
return targetArch; return targetArch;
} }
@ -68,7 +67,7 @@ public class BuildInfo implements Serializable {
this.targetArch = targetArch; this.targetArch = targetArch;
} }
@ApiModelProperty("The compiler used for the build") @Schema(description = "The compiler used for the build")
public String getCompiler() { public String getCompiler() {
return compiler; return compiler;
} }
@ -77,7 +76,7 @@ public class BuildInfo implements Serializable {
this.compiler = compiler; this.compiler = compiler;
} }
@ApiModelProperty("The compiler flags used for the build.") @Schema(description = "The compiler flags used for the build.")
public String getCompilerFlags() { public String getCompilerFlags() {
return compilerFlags; return compilerFlags;
} }

View File

@ -17,13 +17,11 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class Bundle implements Serializable { public class Bundle implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -49,10 +47,7 @@ public class Bundle implements Serializable {
return new Bundle(DEFAULT_GROUP, DEFAULT_ARTIFACT, DEFAULT_VERSION); return new Bundle(DEFAULT_GROUP, DEFAULT_ARTIFACT, DEFAULT_VERSION);
} }
@ApiModelProperty( @Schema(description = "The group id of the bundle")
value = "The group id of the bundle",
notes = "A globally unique group namespace, e.g., org.apache.nifi",
required = true)
public String getGroup() { public String getGroup() {
return group; return group;
} }
@ -61,10 +56,7 @@ public class Bundle implements Serializable {
this.group = group; this.group = group;
} }
@ApiModelProperty( @Schema(description = "The artifact id of the bundle")
value = "The artifact id of the bundle",
notes = "Unique within the group",
required = true)
public String getArtifact() { public String getArtifact() {
return artifact; return artifact;
} }
@ -73,7 +65,7 @@ public class Bundle implements Serializable {
this.artifact = artifact; this.artifact = artifact;
} }
@ApiModelProperty("The version of the bundle artifact") @Schema(description = "The version of the bundle artifact")
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -82,10 +74,7 @@ public class Bundle implements Serializable {
this.version = version; this.version = version;
} }
@ApiModelProperty(value = "The full specification of the bundle contents", @Schema(description = "The full specification of the bundle contents")
notes = "This is optional, as the group, artifact, and version are " +
"also enough to reference a bundle in the case the bundle " +
"specification has been published to a registry.")
public ComponentManifest getComponentManifest() { public ComponentManifest getComponentManifest() {
return componentManifest; return componentManifest;
} }

View File

@ -17,13 +17,12 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ApiModel
public class ComponentManifest implements Serializable { public class ComponentManifest implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +31,7 @@ public class ComponentManifest implements Serializable {
private List<ProcessorDefinition> processors; private List<ProcessorDefinition> processors;
private List<ReportingTaskDefinition> reportingTasks; private List<ReportingTaskDefinition> reportingTasks;
@ApiModelProperty("Public interfaces defined in this bundle") @Schema(description = "Public interfaces defined in this bundle")
public List<DefinedType> getApis() { public List<DefinedType> getApis() {
return (apis != null ? Collections.unmodifiableList(apis) : null); return (apis != null ? Collections.unmodifiableList(apis) : null);
} }
@ -41,7 +40,7 @@ public class ComponentManifest implements Serializable {
this.apis = apis; this.apis = apis;
} }
@ApiModelProperty("Controller Services provided in this bundle") @Schema(description = "Controller Services provided in this bundle")
public List<ControllerServiceDefinition> getControllerServices() { public List<ControllerServiceDefinition> getControllerServices() {
return (controllerServices != null ? Collections.unmodifiableList(controllerServices) : null); return (controllerServices != null ? Collections.unmodifiableList(controllerServices) : null);
} }
@ -50,7 +49,7 @@ public class ComponentManifest implements Serializable {
this.controllerServices = controllerServices; this.controllerServices = controllerServices;
} }
@ApiModelProperty("Processors provided in this bundle") @Schema(description = "Processors provided in this bundle")
public List<ProcessorDefinition> getProcessors() { public List<ProcessorDefinition> getProcessors() {
return (processors != null ? Collections.unmodifiableList(processors) : null); return (processors != null ? Collections.unmodifiableList(processors) : null);
} }
@ -59,7 +58,7 @@ public class ComponentManifest implements Serializable {
this.processors = processors; this.processors = processors;
} }
@ApiModelProperty("Reporting Tasks provided in this bundle") @Schema(description = "Reporting Tasks provided in this bundle")
public List<ReportingTaskDefinition> getReportingTasks() { public List<ReportingTaskDefinition> getReportingTasks() {
return (reportingTasks != null ? Collections.unmodifiableList(reportingTasks) : null); return (reportingTasks != null ? Collections.unmodifiableList(reportingTasks) : null);
} }

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
@ -33,7 +33,7 @@ public abstract class ConfigurableExtensionDefinition extends ExtensionComponent
private List<DynamicProperty> dynamicProperties; private List<DynamicProperty> dynamicProperties;
@Override @Override
@ApiModelProperty("Descriptions of configuration properties applicable to this component.") @Schema(description = "Descriptions of configuration properties applicable to this component.")
public Map<String, PropertyDescriptor> getPropertyDescriptors() { public Map<String, PropertyDescriptor> getPropertyDescriptors() {
return (propertyDescriptors != null ? Collections.unmodifiableMap(propertyDescriptors) : null); return (propertyDescriptors != null ? Collections.unmodifiableMap(propertyDescriptors) : null);
} }
@ -44,7 +44,7 @@ public abstract class ConfigurableExtensionDefinition extends ExtensionComponent
} }
@Override @Override
@ApiModelProperty("Whether or not this component makes use of dynamic (user-set) properties.") @Schema(description = "Whether or not this component makes use of dynamic (user-set) properties.")
public boolean getSupportsDynamicProperties() { public boolean getSupportsDynamicProperties() {
return supportsDynamicProperties; return supportsDynamicProperties;
} }
@ -55,7 +55,7 @@ public abstract class ConfigurableExtensionDefinition extends ExtensionComponent
} }
@Override @Override
@ApiModelProperty("Whether or not this component makes use of sensitive dynamic (user-set) properties.") @Schema(description = "Whether or not this component makes use of sensitive dynamic (user-set) properties.")
public boolean getSupportsSensitiveDynamicProperties() { public boolean getSupportsSensitiveDynamicProperties() {
return supportsSensitiveDynamicProperties; return supportsSensitiveDynamicProperties;
} }
@ -66,7 +66,7 @@ public abstract class ConfigurableExtensionDefinition extends ExtensionComponent
} }
@Override @Override
@ApiModelProperty("Describes the dynamic properties supported by this component") @Schema(description = "Describes the dynamic properties supported by this component")
public List<DynamicProperty> getDynamicProperties() { public List<DynamicProperty> getDynamicProperties() {
return dynamicProperties; return dynamicProperties;
} }

View File

@ -17,9 +17,6 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel;
@ApiModel
public class ControllerServiceDefinition extends ConfigurableExtensionDefinition { public class ControllerServiceDefinition extends ConfigurableExtensionDefinition {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -17,8 +17,7 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ -26,7 +25,6 @@ import java.util.Objects;
/** /**
* A reference to a defined type identified by bundle and fully qualified class type identifiers * A reference to a defined type identified by bundle and fully qualified class type identifiers
*/ */
@ApiModel
public class DefinedType implements Serializable { public class DefinedType implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -36,7 +34,7 @@ public class DefinedType implements Serializable {
private String type; private String type;
private String typeDescription; private String typeDescription;
@ApiModelProperty("The group name of the bundle that provides the referenced type.") @Schema(description = "The group name of the bundle that provides the referenced type.")
public String getGroup() { public String getGroup() {
return group; return group;
} }
@ -45,7 +43,7 @@ public class DefinedType implements Serializable {
this.group = group; this.group = group;
} }
@ApiModelProperty("The artifact name of the bundle that provides the referenced type.") @Schema(description = "The artifact name of the bundle that provides the referenced type.")
public String getArtifact() { public String getArtifact() {
return artifact; return artifact;
} }
@ -54,7 +52,7 @@ public class DefinedType implements Serializable {
this.artifact = artifact; this.artifact = artifact;
} }
@ApiModelProperty("The version of the bundle that provides the referenced type.") @Schema(description = "The version of the bundle that provides the referenced type.")
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -63,10 +61,7 @@ public class DefinedType implements Serializable {
this.version = version; this.version = version;
} }
@ApiModelProperty( @Schema(description = "The fully-qualified class type")
value = "The fully-qualified class type",
required = true,
notes = "For example, 'org.apache.nifi.GetFile' or 'org::apache:nifi::minifi::GetFile'")
public String getType() { public String getType() {
return type; return type;
} }
@ -75,7 +70,7 @@ public class DefinedType implements Serializable {
this.type = type; this.type = type;
} }
@ApiModelProperty("The description of the type.") @Schema(description = "The description of the type.")
public String getTypeDescription() { public String getTypeDescription() {
return typeDescription; return typeDescription;
} }

View File

@ -16,11 +16,9 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.expression.ExpressionLanguageScope; import org.apache.nifi.expression.ExpressionLanguageScope;
@ApiModel
public class DynamicProperty { public class DynamicProperty {
private String name; private String name;
@ -28,7 +26,7 @@ public class DynamicProperty {
private String description; private String description;
private ExpressionLanguageScope expressionLanguageScope; private ExpressionLanguageScope expressionLanguageScope;
@ApiModelProperty(value = "The description of the dynamic property name") @Schema(description = "The description of the dynamic property name")
public String getName() { public String getName() {
return name; return name;
} }
@ -37,7 +35,7 @@ public class DynamicProperty {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the dynamic property value") @Schema(description = "The description of the dynamic property value")
public String getValue() { public String getValue() {
return value; return value;
} }
@ -46,7 +44,7 @@ public class DynamicProperty {
this.value = value; this.value = value;
} }
@ApiModelProperty(value = "The description of the dynamic property") @Schema(description = "The description of the dynamic property")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -55,7 +53,7 @@ public class DynamicProperty {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "The scope of the expression language support") @Schema(description = "The scope of the expression language support")
public ExpressionLanguageScope getExpressionLanguageScope() { public ExpressionLanguageScope getExpressionLanguageScope() {
return expressionLanguageScope; return expressionLanguageScope;
} }

View File

@ -16,16 +16,14 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class DynamicRelationship { public class DynamicRelationship {
private String name; private String name;
private String description; private String description;
@ApiModelProperty(value = "The description of the dynamic relationship name") @Schema(description = "The description of the dynamic relationship name")
public String getName() { public String getName() {
return name; return name;
} }
@ -34,7 +32,7 @@ public class DynamicRelationship {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the dynamic relationship") @Schema(description = "The description of the dynamic relationship")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -17,8 +17,7 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -28,7 +27,6 @@ import java.util.Set;
/** /**
* A component provided by an extension bundle * A component provided by an extension bundle
*/ */
@ApiModel
public class ExtensionComponent extends DefinedType { public class ExtensionComponent extends DefinedType {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -52,7 +50,7 @@ public class ExtensionComponent extends DefinedType {
private boolean additionalDetails; private boolean additionalDetails;
@ApiModelProperty("The build metadata for this component") @Schema(description = "The build metadata for this component")
public BuildInfo getBuildInfo() { public BuildInfo getBuildInfo() {
return buildInfo; return buildInfo;
} }
@ -61,7 +59,7 @@ public class ExtensionComponent extends DefinedType {
this.buildInfo = buildInfo; this.buildInfo = buildInfo;
} }
@ApiModelProperty("If this type represents a provider for an interface, this lists the APIs it implements") @Schema(description = "If this type represents a provider for an interface, this lists the APIs it implements")
public List<DefinedType> getProvidedApiImplementations() { public List<DefinedType> getProvidedApiImplementations() {
return (providedApiImplementations != null ? Collections.unmodifiableList(providedApiImplementations) : null); return (providedApiImplementations != null ? Collections.unmodifiableList(providedApiImplementations) : null);
@ -71,7 +69,7 @@ public class ExtensionComponent extends DefinedType {
this.providedApiImplementations = providedApiImplementations; this.providedApiImplementations = providedApiImplementations;
} }
@ApiModelProperty("The tags associated with this type") @Schema(description = "The tags associated with this type")
public Set<String> getTags() { public Set<String> getTags() {
return (tags != null ? Collections.unmodifiableSet(tags) : null); return (tags != null ? Collections.unmodifiableSet(tags) : null);
} }
@ -80,7 +78,7 @@ public class ExtensionComponent extends DefinedType {
this.tags = tags; this.tags = tags;
} }
@ApiModelProperty("The names of other component types that may be related") @Schema(description = "The names of other component types that may be related")
public Set<String> getSeeAlso() { public Set<String> getSeeAlso() {
return seeAlso; return seeAlso;
} }
@ -89,7 +87,7 @@ public class ExtensionComponent extends DefinedType {
this.seeAlso = seeAlso; this.seeAlso = seeAlso;
} }
@ApiModelProperty("Whether or not the component has been deprecated") @Schema(description = "Whether or not the component has been deprecated")
public Boolean getDeprecated() { public Boolean getDeprecated() {
return deprecated; return deprecated;
} }
@ -98,7 +96,7 @@ public class ExtensionComponent extends DefinedType {
this.deprecated = deprecated; this.deprecated = deprecated;
} }
@ApiModelProperty("If this component has been deprecated, this optional field can be used to provide an explanation") @Schema(description = "If this component has been deprecated, this optional field can be used to provide an explanation")
public String getDeprecationReason() { public String getDeprecationReason() {
return deprecationReason; return deprecationReason;
} }
@ -107,7 +105,7 @@ public class ExtensionComponent extends DefinedType {
this.deprecationReason = deprecationReason; this.deprecationReason = deprecationReason;
} }
@ApiModelProperty("If this component has been deprecated, this optional field provides alternatives to use") @Schema(description = "If this component has been deprecated, this optional field provides alternatives to use")
public Set<String> getDeprecationAlternatives() { public Set<String> getDeprecationAlternatives() {
return deprecationAlternatives; return deprecationAlternatives;
} }
@ -116,7 +114,7 @@ public class ExtensionComponent extends DefinedType {
this.deprecationAlternatives = deprecationAlternatives; this.deprecationAlternatives = deprecationAlternatives;
} }
@ApiModelProperty("Whether or not the component has a general restriction") @Schema(description = "Whether or not the component has a general restriction")
public Boolean isRestricted() { public Boolean isRestricted() {
return restricted; return restricted;
} }
@ -129,7 +127,7 @@ public class ExtensionComponent extends DefinedType {
this.restricted = restricted; this.restricted = restricted;
} }
@ApiModelProperty("An optional description of the general restriction") @Schema(description = "An optional description of the general restriction")
public String getRestrictedExplanation() { public String getRestrictedExplanation() {
return restrictedExplanation; return restrictedExplanation;
} }
@ -138,7 +136,7 @@ public class ExtensionComponent extends DefinedType {
this.restrictedExplanation = restrictedExplanation; this.restrictedExplanation = restrictedExplanation;
} }
@ApiModelProperty("Explicit restrictions that indicate a require permission to use the component") @Schema(description = "Explicit restrictions that indicate a require permission to use the component")
public Set<Restriction> getExplicitRestrictions() { public Set<Restriction> getExplicitRestrictions() {
return explicitRestrictions; return explicitRestrictions;
} }
@ -147,7 +145,7 @@ public class ExtensionComponent extends DefinedType {
this.explicitRestrictions = explicitRestrictions; this.explicitRestrictions = explicitRestrictions;
} }
@ApiModelProperty("Indicates if the component stores state") @Schema(description = "Indicates if the component stores state")
public Stateful getStateful() { public Stateful getStateful() {
return stateful; return stateful;
} }
@ -156,7 +154,7 @@ public class ExtensionComponent extends DefinedType {
this.stateful = stateful; this.stateful = stateful;
} }
@ApiModelProperty("The system resource considerations for the given component") @Schema(description = "The system resource considerations for the given component")
public List<SystemResourceConsideration> getSystemResourceConsiderations() { public List<SystemResourceConsideration> getSystemResourceConsiderations() {
return systemResourceConsiderations; return systemResourceConsiderations;
} }
@ -165,7 +163,7 @@ public class ExtensionComponent extends DefinedType {
this.systemResourceConsiderations = systemResourceConsiderations; this.systemResourceConsiderations = systemResourceConsiderations;
} }
@ApiModelProperty("Indicates if the component has additional details documentation") @Schema(description = "Indicates if the component has additional details documentation")
public boolean isAdditionalDetails() { public boolean isAdditionalDetails() {
return additionalDetails; return additionalDetails;
} }

View File

@ -17,15 +17,13 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.annotation.behavior.InputRequirement; import org.apache.nifi.annotation.behavior.InputRequirement;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ApiModel
public class ProcessorDefinition extends ConfigurableExtensionDefinition { public class ProcessorDefinition extends ConfigurableExtensionDefinition {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -53,7 +51,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
private List<Attribute> readsAttributes; private List<Attribute> readsAttributes;
private List<Attribute> writesAttributes; private List<Attribute> writesAttributes;
@ApiModelProperty("Any input requirements this processor has.") @Schema(description = "Any input requirements this processor has.")
public InputRequirement.Requirement getInputRequirement() { public InputRequirement.Requirement getInputRequirement() {
return inputRequirement; return inputRequirement;
} }
@ -62,7 +60,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.inputRequirement = inputRequirement; this.inputRequirement = inputRequirement;
} }
@ApiModelProperty("The supported relationships for this processor.") @Schema(description = "The supported relationships for this processor.")
public List<Relationship> getSupportedRelationships() { public List<Relationship> getSupportedRelationships() {
return (supportedRelationships == null ? Collections.emptyList() : Collections.unmodifiableList(supportedRelationships)); return (supportedRelationships == null ? Collections.emptyList() : Collections.unmodifiableList(supportedRelationships));
} }
@ -71,7 +69,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.supportedRelationships = supportedRelationships; this.supportedRelationships = supportedRelationships;
} }
@ApiModelProperty("Whether or not this processor supports dynamic relationships.") @Schema(description = "Whether or not this processor supports dynamic relationships.")
public boolean getSupportsDynamicRelationships() { public boolean getSupportsDynamicRelationships() {
return supportsDynamicRelationships; return supportsDynamicRelationships;
} }
@ -80,7 +78,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.supportsDynamicRelationships = supportsDynamicRelationships; this.supportsDynamicRelationships = supportsDynamicRelationships;
} }
@ApiModelProperty("If the processor supports dynamic relationships, this describes the dynamic relationship") @Schema(description = "If the processor supports dynamic relationships, this describes the dynamic relationship")
public DynamicRelationship getDynamicRelationship() { public DynamicRelationship getDynamicRelationship() {
return dynamicRelationship; return dynamicRelationship;
} }
@ -89,7 +87,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.dynamicRelationship = dynamicRelationship; this.dynamicRelationship = dynamicRelationship;
} }
@ApiModelProperty("Whether or not this processor should be triggered serially (i.e. no concurrent execution).") @Schema(description = "Whether or not this processor should be triggered serially (i.e. no concurrent execution).")
public boolean getTriggerSerially() { public boolean getTriggerSerially() {
return triggerSerially; return triggerSerially;
} }
@ -98,7 +96,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.triggerSerially = triggerSerially; this.triggerSerially = triggerSerially;
} }
@ApiModelProperty("Whether or not this processor should be triggered when incoming queues are empty.") @Schema(description = "Whether or not this processor should be triggered when incoming queues are empty.")
public boolean getTriggerWhenEmpty() { public boolean getTriggerWhenEmpty() {
return triggerWhenEmpty; return triggerWhenEmpty;
} }
@ -107,7 +105,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.triggerWhenEmpty = triggerWhenEmpty; this.triggerWhenEmpty = triggerWhenEmpty;
} }
@ApiModelProperty("Whether or not this processor should be triggered when any destination queue has room.") @Schema(description = "Whether or not this processor should be triggered when any destination queue has room.")
public boolean getTriggerWhenAnyDestinationAvailable() { public boolean getTriggerWhenAnyDestinationAvailable() {
return triggerWhenAnyDestinationAvailable; return triggerWhenAnyDestinationAvailable;
} }
@ -116,7 +114,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.triggerWhenAnyDestinationAvailable = triggerWhenAnyDestinationAvailable; this.triggerWhenAnyDestinationAvailable = triggerWhenAnyDestinationAvailable;
} }
@ApiModelProperty("Whether or not this processor supports batching. If a Processor uses this annotation, " + @Schema(description = "Whether or not this processor supports batching. If a Processor uses this annotation, " +
"it allows the Framework to batch calls to session commits, as well as allowing the Framework to return " + "it allows the Framework to batch calls to session commits, as well as allowing the Framework to return " +
"the same session multiple times.") "the same session multiple times.")
public boolean getSupportsBatching() { public boolean getSupportsBatching() {
@ -127,7 +125,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.supportsBatching = supportsBatching; this.supportsBatching = supportsBatching;
} }
@ApiModelProperty("Whether or not this processor should be scheduled only on the primary node in a cluster.") @Schema(description = "Whether or not this processor should be scheduled only on the primary node in a cluster.")
public boolean getPrimaryNodeOnly() { public boolean getPrimaryNodeOnly() {
return primaryNodeOnly; return primaryNodeOnly;
} }
@ -136,7 +134,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.primaryNodeOnly = primaryNodeOnly; this.primaryNodeOnly = primaryNodeOnly;
} }
@ApiModelProperty("Whether or not this processor is considered side-effect free. Side-effect free indicate that the " + @Schema(description = "Whether or not this processor is considered side-effect free. Side-effect free indicate that the " +
"processor's operations on FlowFiles can be safely repeated across process sessions.") "processor's operations on FlowFiles can be safely repeated across process sessions.")
public boolean getSideEffectFree() { public boolean getSideEffectFree() {
return sideEffectFree; return sideEffectFree;
@ -146,7 +144,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.sideEffectFree = sideEffectFree; this.sideEffectFree = sideEffectFree;
} }
@ApiModelProperty("The supported scheduling strategies, such as TIME_DRIVER, CRON, or EVENT_DRIVEN.") @Schema(description = "The supported scheduling strategies, such as TIME_DRIVER, CRON, or EVENT_DRIVEN.")
public List<String> getSupportedSchedulingStrategies() { public List<String> getSupportedSchedulingStrategies() {
return supportedSchedulingStrategies; return supportedSchedulingStrategies;
} }
@ -155,7 +153,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.supportedSchedulingStrategies = supportedSchedulingStrategies; this.supportedSchedulingStrategies = supportedSchedulingStrategies;
} }
@ApiModelProperty("The default scheduling strategy for the processor.") @Schema(description = "The default scheduling strategy for the processor.")
public String getDefaultSchedulingStrategy() { public String getDefaultSchedulingStrategy() {
return defaultSchedulingStrategy; return defaultSchedulingStrategy;
} }
@ -164,7 +162,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultSchedulingStrategy = defaultSchedulingStrategy; this.defaultSchedulingStrategy = defaultSchedulingStrategy;
} }
@ApiModelProperty("The default concurrent tasks for each scheduling strategy.") @Schema(description = "The default concurrent tasks for each scheduling strategy.")
public Map<String, Integer> getDefaultConcurrentTasksBySchedulingStrategy() { public Map<String, Integer> getDefaultConcurrentTasksBySchedulingStrategy() {
return defaultConcurrentTasksBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultConcurrentTasksBySchedulingStrategy) : null; return defaultConcurrentTasksBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultConcurrentTasksBySchedulingStrategy) : null;
} }
@ -173,7 +171,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultConcurrentTasksBySchedulingStrategy = defaultConcurrentTasksBySchedulingStrategy; this.defaultConcurrentTasksBySchedulingStrategy = defaultConcurrentTasksBySchedulingStrategy;
} }
@ApiModelProperty("The default scheduling period for each scheduling strategy. " + @Schema(description = "The default scheduling period for each scheduling strategy. " +
"The scheduling period is expected to be a time period, such as \"30 sec\".") "The scheduling period is expected to be a time period, such as \"30 sec\".")
public Map<String, String> getDefaultSchedulingPeriodBySchedulingStrategy() { public Map<String, String> getDefaultSchedulingPeriodBySchedulingStrategy() {
return defaultSchedulingPeriodBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodBySchedulingStrategy) : null; return defaultSchedulingPeriodBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodBySchedulingStrategy) : null;
@ -183,7 +181,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultSchedulingPeriodBySchedulingStrategy = defaultSchedulingPeriodBySchedulingStrategy; this.defaultSchedulingPeriodBySchedulingStrategy = defaultSchedulingPeriodBySchedulingStrategy;
} }
@ApiModelProperty("The default penalty duration as a time period, such as \"30 sec\".") @Schema(description = "The default penalty duration as a time period, such as \"30 sec\".")
public String getDefaultPenaltyDuration() { public String getDefaultPenaltyDuration() {
return defaultPenaltyDuration; return defaultPenaltyDuration;
} }
@ -192,7 +190,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultPenaltyDuration = defaultPenaltyDuration; this.defaultPenaltyDuration = defaultPenaltyDuration;
} }
@ApiModelProperty("The default yield duration as a time period, such as \"1 sec\".") @Schema(description = "The default yield duration as a time period, such as \"1 sec\".")
public String getDefaultYieldDuration() { public String getDefaultYieldDuration() {
return defaultYieldDuration; return defaultYieldDuration;
} }
@ -201,7 +199,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultYieldDuration = defaultYieldDuration; this.defaultYieldDuration = defaultYieldDuration;
} }
@ApiModelProperty("The default bulletin level, such as WARN, INFO, DEBUG, etc.") @Schema(description = "The default bulletin level, such as WARN, INFO, DEBUG, etc.")
public String getDefaultBulletinLevel() { public String getDefaultBulletinLevel() {
return defaultBulletinLevel; return defaultBulletinLevel;
} }
@ -210,7 +208,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.defaultBulletinLevel = defaultBulletinLevel; this.defaultBulletinLevel = defaultBulletinLevel;
} }
@ApiModelProperty("The FlowFile attributes this processor reads") @Schema(description = "The FlowFile attributes this processor reads")
public List<Attribute> getReadsAttributes() { public List<Attribute> getReadsAttributes() {
return readsAttributes; return readsAttributes;
} }
@ -219,7 +217,7 @@ public class ProcessorDefinition extends ConfigurableExtensionDefinition {
this.readsAttributes = readsAttributes; this.readsAttributes = readsAttributes;
} }
@ApiModelProperty("The FlowFile attributes this processor writes/updates") @Schema(description = "The FlowFile attributes this processor writes/updates")
public List<Attribute> getWritesAttributes() { public List<Attribute> getWritesAttributes() {
return writesAttributes; return writesAttributes;
} }

View File

@ -17,13 +17,11 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class PropertyAllowableValue implements Serializable { public class PropertyAllowableValue implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,7 +29,7 @@ public class PropertyAllowableValue implements Serializable {
private String displayName; private String displayName;
private String description; private String description;
@ApiModelProperty(value = "The internal value", required = true) @Schema(description = "The internal value")
public String getValue() { public String getValue() {
return value; return value;
} }
@ -40,7 +38,7 @@ public class PropertyAllowableValue implements Serializable {
this.value = value; this.value = value;
} }
@ApiModelProperty("The display name of the value, if different from the internal value") @Schema(description = "The display name of the value, if different from the internal value")
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@ -49,7 +47,7 @@ public class PropertyAllowableValue implements Serializable {
this.displayName = displayName; this.displayName = displayName;
} }
@ApiModelProperty("The description of the value, e.g., the behavior it produces.") @Schema(description = "The description of the value, e.g., the behavior it produces.")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ApiModel
public class PropertyDependency implements Serializable { public class PropertyDependency implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -30,7 +28,7 @@ public class PropertyDependency implements Serializable {
private String propertyDisplayName; private String propertyDisplayName;
private List<String> dependentValues; private List<String> dependentValues;
@ApiModelProperty("The name of the property that is depended upon") @Schema(description = "The name of the property that is depended upon")
public String getPropertyName() { public String getPropertyName() {
return propertyName; return propertyName;
} }
@ -39,7 +37,7 @@ public class PropertyDependency implements Serializable {
this.propertyName = propertyName; this.propertyName = propertyName;
} }
@ApiModelProperty("The name of the property that is depended upon") @Schema(description = "The name of the property that is depended upon")
public String getPropertyDisplayName() { public String getPropertyDisplayName() {
return propertyDisplayName; return propertyDisplayName;
} }
@ -48,7 +46,7 @@ public class PropertyDependency implements Serializable {
this.propertyDisplayName = propertyDisplayName; this.propertyDisplayName = propertyDisplayName;
} }
@ApiModelProperty("The values that satisfy the dependency") @Schema(description = "The values that satisfy the dependency")
public List<String> getDependentValues() { public List<String> getDependentValues() {
return dependentValues; return dependentValues;
} }

View File

@ -16,15 +16,13 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.nifi.expression.ExpressionLanguageScope; import org.apache.nifi.expression.ExpressionLanguageScope;
@ApiModel
public class PropertyDescriptor implements Serializable { public class PropertyDescriptor implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -44,7 +42,7 @@ public class PropertyDescriptor implements Serializable {
private PropertyResourceDefinition resourceDefinition; private PropertyResourceDefinition resourceDefinition;
private List<PropertyDependency> dependencies; private List<PropertyDependency> dependencies;
@ApiModelProperty(value = "The name of the property key", required = true) @Schema(description = "The name of the property key")
public String getName() { public String getName() {
return name; return name;
} }
@ -53,7 +51,7 @@ public class PropertyDescriptor implements Serializable {
this.name = name; this.name = name;
} }
@ApiModelProperty("The display name of the property key, if different from the name") @Schema(description = "The display name of the property key, if different from the name")
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@ -62,7 +60,7 @@ public class PropertyDescriptor implements Serializable {
this.displayName = displayName; this.displayName = displayName;
} }
@ApiModelProperty("The description of what the property does") @Schema(description = "The description of what the property does")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -71,7 +69,7 @@ public class PropertyDescriptor implements Serializable {
this.description = description; this.description = description;
} }
@ApiModelProperty("A list of the allowable values for the property") @Schema(description = "A list of the allowable values for the property")
public List<PropertyAllowableValue> getAllowableValues() { public List<PropertyAllowableValue> getAllowableValues() {
return (allowableValues != null ? Collections.unmodifiableList(allowableValues) : null); return (allowableValues != null ? Collections.unmodifiableList(allowableValues) : null);
} }
@ -80,7 +78,7 @@ public class PropertyDescriptor implements Serializable {
this.allowableValues = allowableValues; this.allowableValues = allowableValues;
} }
@ApiModelProperty("The default value if a user-set value is not specified") @Schema(description = "The default value if a user-set value is not specified")
public String getDefaultValue() { public String getDefaultValue() {
return defaultValue; return defaultValue;
} }
@ -89,7 +87,7 @@ public class PropertyDescriptor implements Serializable {
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
} }
@ApiModelProperty("Whether or not the property is required for the component") @Schema(description = "Whether or not the property is required for the component")
public boolean getRequired() { public boolean getRequired() {
return required; return required;
} }
@ -98,7 +96,7 @@ public class PropertyDescriptor implements Serializable {
this.required = required; this.required = required;
} }
@ApiModelProperty("Whether or not the value of the property is considered sensitive (e.g., passwords and keys)") @Schema(description = "Whether or not the value of the property is considered sensitive (e.g., passwords and keys)")
public boolean getSensitive() { public boolean getSensitive() {
return sensitive; return sensitive;
} }
@ -107,7 +105,7 @@ public class PropertyDescriptor implements Serializable {
this.sensitive = sensitive; this.sensitive = sensitive;
} }
@ApiModelProperty("The scope of expression language supported by this property") @Schema(description = "The scope of expression language supported by this property")
public ExpressionLanguageScope getExpressionLanguageScope() { public ExpressionLanguageScope getExpressionLanguageScope() {
return expressionLanguageScope; return expressionLanguageScope;
} }
@ -117,12 +115,12 @@ public class PropertyDescriptor implements Serializable {
this.expressionLanguageScopeDescription = expressionLanguageScope == null ? null : expressionLanguageScope.getDescription(); this.expressionLanguageScopeDescription = expressionLanguageScope == null ? null : expressionLanguageScope.getDescription();
} }
@ApiModelProperty(value = "The description of the expression language scope supported by this property", accessMode = ApiModelProperty.AccessMode.READ_ONLY) @Schema(description = "The description of the expression language scope supported by this property", accessMode = Schema.AccessMode.READ_ONLY)
public String getExpressionLanguageScopeDescription() { public String getExpressionLanguageScopeDescription() {
return expressionLanguageScope == null ? null : expressionLanguageScope.getDescription(); return expressionLanguageScope == null ? null : expressionLanguageScope.getDescription();
} }
@ApiModelProperty("Indicates that this property is for selecting a controller service of the specified type") @Schema(description = "Indicates that this property is for selecting a controller service of the specified type")
public DefinedType getTypeProvidedByValue() { public DefinedType getTypeProvidedByValue() {
return typeProvidedByValue; return typeProvidedByValue;
} }
@ -131,7 +129,7 @@ public class PropertyDescriptor implements Serializable {
this.typeProvidedByValue = typeProvidedByValue; this.typeProvidedByValue = typeProvidedByValue;
} }
@ApiModelProperty("A regular expression that can be used to validate the value of this property") @Schema(description = "A regular expression that can be used to validate the value of this property")
public String getValidRegex() { public String getValidRegex() {
return validRegex; return validRegex;
} }
@ -140,7 +138,7 @@ public class PropertyDescriptor implements Serializable {
this.validRegex = validRegex; this.validRegex = validRegex;
} }
@ApiModelProperty("Name of the validator used for this property descriptor") @Schema(description = "Name of the validator used for this property descriptor")
public String getValidator() { public String getValidator() {
return validator; return validator;
} }
@ -149,7 +147,7 @@ public class PropertyDescriptor implements Serializable {
this.validator = validator; this.validator = validator;
} }
@ApiModelProperty("Whether or not the descriptor is for a dynamically added property") @Schema(description = "Whether or not the descriptor is for a dynamically added property")
public boolean isDynamic() { public boolean isDynamic() {
return dynamic; return dynamic;
} }
@ -158,7 +156,7 @@ public class PropertyDescriptor implements Serializable {
this.dynamic = dynamic; this.dynamic = dynamic;
} }
@ApiModelProperty("Indicates that this property references external resources") @Schema(description = "Indicates that this property references external resources")
public PropertyResourceDefinition getResourceDefinition() { public PropertyResourceDefinition getResourceDefinition() {
return resourceDefinition; return resourceDefinition;
} }
@ -167,7 +165,7 @@ public class PropertyDescriptor implements Serializable {
this.resourceDefinition = resourceDefinition; this.resourceDefinition = resourceDefinition;
} }
@ApiModelProperty("The dependencies that this property has on other properties") @Schema(description = "The dependencies that this property has on other properties")
public List<PropertyDependency> getDependencies() { public List<PropertyDependency> getDependencies() {
return dependencies; return dependencies;
} }

View File

@ -16,22 +16,20 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.components.resource.ResourceCardinality; import org.apache.nifi.components.resource.ResourceCardinality;
import org.apache.nifi.components.resource.ResourceType; import org.apache.nifi.components.resource.ResourceType;
import java.io.Serializable; import java.io.Serializable;
import java.util.Set; import java.util.Set;
@ApiModel
public class PropertyResourceDefinition implements Serializable { public class PropertyResourceDefinition implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private ResourceCardinality cardinality; private ResourceCardinality cardinality;
private Set<ResourceType> resourceTypes; private Set<ResourceType> resourceTypes;
@ApiModelProperty("The cardinality of the resource definition (i.e. single or multiple)") @Schema(description = "The cardinality of the resource definition (i.e. single or multiple)")
public ResourceCardinality getCardinality() { public ResourceCardinality getCardinality() {
return cardinality; return cardinality;
} }
@ -40,7 +38,7 @@ public class PropertyResourceDefinition implements Serializable {
this.cardinality = cardinality; this.cardinality = cardinality;
} }
@ApiModelProperty("The types of resources that can be referenced") @Schema(description = "The types of resources that can be referenced")
public Set<ResourceType> getResourceTypes() { public Set<ResourceType> getResourceTypes() {
return resourceTypes; return resourceTypes;
} }

View File

@ -17,18 +17,17 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
@ApiModel
public class Relationship implements Serializable { public class Relationship implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String name; private String name;
private String description; private String description;
@ApiModelProperty("The name of the relationship") @Schema(description = "The name of the relationship")
public String getName() { public String getName() {
return name; return name;
} }
@ -37,7 +36,7 @@ public class Relationship implements Serializable {
this.name = name; this.name = name;
} }
@ApiModelProperty("The description of the relationship") @Schema(description = "The description of the relationship")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -17,14 +17,12 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ApiModel
public class ReportingTaskDefinition extends ConfigurableExtensionDefinition { public class ReportingTaskDefinition extends ConfigurableExtensionDefinition {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +30,7 @@ public class ReportingTaskDefinition extends ConfigurableExtensionDefinition {
private String defaultSchedulingStrategy; private String defaultSchedulingStrategy;
private Map<String, String> defaultSchedulingPeriodBySchedulingStrategy; private Map<String, String> defaultSchedulingPeriodBySchedulingStrategy;
@ApiModelProperty("The supported scheduling strategies, such as TIME_DRIVER or CRON.") @Schema(description = "The supported scheduling strategies, such as TIME_DRIVER or CRON.")
public List<String> getSupportedSchedulingStrategies() { public List<String> getSupportedSchedulingStrategies() {
return (supportedSchedulingStrategies != null ? Collections.unmodifiableList(supportedSchedulingStrategies) : null); return (supportedSchedulingStrategies != null ? Collections.unmodifiableList(supportedSchedulingStrategies) : null);
} }
@ -41,7 +39,7 @@ public class ReportingTaskDefinition extends ConfigurableExtensionDefinition {
this.supportedSchedulingStrategies = supportedSchedulingStrategies; this.supportedSchedulingStrategies = supportedSchedulingStrategies;
} }
@ApiModelProperty("The default scheduling strategy for the reporting task.") @Schema(description = "The default scheduling strategy for the reporting task.")
public String getDefaultSchedulingStrategy() { public String getDefaultSchedulingStrategy() {
return defaultSchedulingStrategy; return defaultSchedulingStrategy;
} }
@ -50,7 +48,7 @@ public class ReportingTaskDefinition extends ConfigurableExtensionDefinition {
this.defaultSchedulingStrategy = defaultSchedulingStrategy; this.defaultSchedulingStrategy = defaultSchedulingStrategy;
} }
@ApiModelProperty("The default scheduling period for each scheduling strategy. " + @Schema(description = "The default scheduling period for each scheduling strategy. " +
"The scheduling period is expected to be a time period, such as \"30 sec\".") "The scheduling period is expected to be a time period, such as \"30 sec\".")
public Map<String, String> getDefaultSchedulingPeriodBySchedulingStrategy() { public Map<String, String> getDefaultSchedulingPeriodBySchedulingStrategy() {
return defaultSchedulingPeriodBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodBySchedulingStrategy) : null; return defaultSchedulingPeriodBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodBySchedulingStrategy) : null;

View File

@ -16,18 +16,16 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class Restriction { public class Restriction {
private String requiredPermission; private String requiredPermission;
private String explanation; private String explanation;
@ApiModelProperty(value = "The permission required for this restriction") @Schema(description = "The permission required for this restriction")
public String getRequiredPermission() { public String getRequiredPermission() {
return requiredPermission; return requiredPermission;
} }
@ -36,7 +34,7 @@ public class Restriction {
this.requiredPermission = requiredPermission; this.requiredPermission = requiredPermission;
} }
@ApiModelProperty(value = "The explanation of this restriction") @Schema(description = "The explanation of this restriction")
public String getExplanation() { public String getExplanation() {
return explanation; return explanation;
} }

View File

@ -17,15 +17,13 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ApiModel
public class RuntimeManifest implements Serializable { public class RuntimeManifest implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -36,7 +34,7 @@ public class RuntimeManifest implements Serializable {
private List<Bundle> bundles; private List<Bundle> bundles;
private SchedulingDefaults schedulingDefaults; private SchedulingDefaults schedulingDefaults;
@ApiModelProperty("A unique identifier for the manifest") @Schema(description = "A unique identifier for the manifest")
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -45,9 +43,7 @@ public class RuntimeManifest implements Serializable {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty( @Schema(description = "The type of the runtime binary, e.g., 'minifi-java' or 'minifi-cpp'")
value = "The type of the runtime binary, e.g., 'minifi-java' or 'minifi-cpp'",
notes = "Usually set when the runtime is built.")
public String getAgentType() { public String getAgentType() {
return agentType; return agentType;
} }
@ -56,9 +52,7 @@ public class RuntimeManifest implements Serializable {
this.agentType = agentType; this.agentType = agentType;
} }
@ApiModelProperty( @Schema(description = "The version of the runtime binary, e.g., '1.0.1'")
value = "The version of the runtime binary, e.g., '1.0.1'",
notes = "Usually set when the runtime is built.")
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -67,7 +61,7 @@ public class RuntimeManifest implements Serializable {
this.version = version; this.version = version;
} }
@ApiModelProperty("Build summary for this runtime binary") @Schema(description = "Build summary for this runtime binary")
public BuildInfo getBuildInfo() { public BuildInfo getBuildInfo() {
return buildInfo; return buildInfo;
} }
@ -76,7 +70,7 @@ public class RuntimeManifest implements Serializable {
this.buildInfo = buildInfo; this.buildInfo = buildInfo;
} }
@ApiModelProperty("All extension bundles included with this runtime") @Schema(description = "All extension bundles included with this runtime")
public List<Bundle> getBundles() { public List<Bundle> getBundles() {
return (bundles != null ? Collections.unmodifiableList(bundles) : null); return (bundles != null ? Collections.unmodifiableList(bundles) : null);
} }
@ -85,7 +79,7 @@ public class RuntimeManifest implements Serializable {
this.bundles = bundles; this.bundles = bundles;
} }
@ApiModelProperty("Scheduling defaults for components defined in this manifest") @Schema(description = "Scheduling defaults for components defined in this manifest")
public SchedulingDefaults getSchedulingDefaults() { public SchedulingDefaults getSchedulingDefaults() {
return schedulingDefaults; return schedulingDefaults;
} }

View File

@ -17,15 +17,13 @@
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.scheduling.SchedulingStrategy; import org.apache.nifi.scheduling.SchedulingStrategy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;
import java.util.Map; import java.util.Map;
@ApiModel
public class SchedulingDefaults implements Serializable { public class SchedulingDefaults implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -39,7 +37,7 @@ public class SchedulingDefaults implements Serializable {
private Map<String, Integer> defaultConcurrentTasksBySchedulingStrategy; private Map<String, Integer> defaultConcurrentTasksBySchedulingStrategy;
private Map<String, String> defaultSchedulingPeriodsBySchedulingStrategy; private Map<String, String> defaultSchedulingPeriodsBySchedulingStrategy;
@ApiModelProperty("The name of the default scheduling strategy") @Schema(description = "The name of the default scheduling strategy")
public SchedulingStrategy getDefaultSchedulingStrategy() { public SchedulingStrategy getDefaultSchedulingStrategy() {
return defaultSchedulingStrategy; return defaultSchedulingStrategy;
} }
@ -48,7 +46,7 @@ public class SchedulingDefaults implements Serializable {
this.defaultSchedulingStrategy = defaultSchedulingStrategy; this.defaultSchedulingStrategy = defaultSchedulingStrategy;
} }
@ApiModelProperty("The default scheduling period in milliseconds") @Schema(description = "The default scheduling period in milliseconds")
public long getDefaultSchedulingPeriodMillis() { public long getDefaultSchedulingPeriodMillis() {
return defaultSchedulingPeriodMillis; return defaultSchedulingPeriodMillis;
} }
@ -57,7 +55,7 @@ public class SchedulingDefaults implements Serializable {
this.defaultSchedulingPeriodMillis = defaultSchedulingPeriodMillis; this.defaultSchedulingPeriodMillis = defaultSchedulingPeriodMillis;
} }
@ApiModelProperty("The default penalization period in milliseconds") @Schema(description = "The default penalization period in milliseconds")
public long getPenalizationPeriodMillis() { public long getPenalizationPeriodMillis() {
return penalizationPeriodMillis; return penalizationPeriodMillis;
} }
@ -66,7 +64,7 @@ public class SchedulingDefaults implements Serializable {
this.penalizationPeriodMillis = penalizationPeriodMillis; this.penalizationPeriodMillis = penalizationPeriodMillis;
} }
@ApiModelProperty("The default yield duration in milliseconds") @Schema(description = "The default yield duration in milliseconds")
public long getYieldDurationMillis() { public long getYieldDurationMillis() {
return yieldDurationMillis; return yieldDurationMillis;
} }
@ -75,7 +73,7 @@ public class SchedulingDefaults implements Serializable {
this.yieldDurationMillis = yieldDurationMillis; this.yieldDurationMillis = yieldDurationMillis;
} }
@ApiModelProperty("The default run duration in nano-seconds") @Schema(description = "The default run duration in nano-seconds")
public long getDefaultRunDurationNanos() { public long getDefaultRunDurationNanos() {
return defaultRunDurationNanos; return defaultRunDurationNanos;
} }
@ -84,7 +82,7 @@ public class SchedulingDefaults implements Serializable {
this.defaultRunDurationNanos = defaultRunDurationNanos; this.defaultRunDurationNanos = defaultRunDurationNanos;
} }
@ApiModelProperty("The default concurrent tasks") @Schema(description = "The default concurrent tasks")
public String getDefaultMaxConcurrentTasks() { public String getDefaultMaxConcurrentTasks() {
return defaultMaxConcurrentTasks; return defaultMaxConcurrentTasks;
} }
@ -93,7 +91,7 @@ public class SchedulingDefaults implements Serializable {
this.defaultMaxConcurrentTasks = defaultMaxConcurrentTasks; this.defaultMaxConcurrentTasks = defaultMaxConcurrentTasks;
} }
@ApiModelProperty("The default concurrent tasks for each scheduling strategy") @Schema(description = "The default concurrent tasks for each scheduling strategy")
public Map<String, Integer> getDefaultConcurrentTasksBySchedulingStrategy() { public Map<String, Integer> getDefaultConcurrentTasksBySchedulingStrategy() {
return defaultConcurrentTasksBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultConcurrentTasksBySchedulingStrategy) : null; return defaultConcurrentTasksBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultConcurrentTasksBySchedulingStrategy) : null;
} }
@ -102,7 +100,7 @@ public class SchedulingDefaults implements Serializable {
this.defaultConcurrentTasksBySchedulingStrategy = defaultConcurrentTasksBySchedulingStrategy; this.defaultConcurrentTasksBySchedulingStrategy = defaultConcurrentTasksBySchedulingStrategy;
} }
@ApiModelProperty("The default scheduling period for each scheduling strategy") @Schema(description = "The default scheduling period for each scheduling strategy")
public Map<String, String> getDefaultSchedulingPeriodsBySchedulingStrategy() { public Map<String, String> getDefaultSchedulingPeriodsBySchedulingStrategy() {
return defaultSchedulingPeriodsBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodsBySchedulingStrategy) : null; return defaultSchedulingPeriodsBySchedulingStrategy != null ? Collections.unmodifiableMap(defaultSchedulingPeriodsBySchedulingStrategy) : null;
} }

View File

@ -16,19 +16,17 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import org.apache.nifi.components.state.Scope; import org.apache.nifi.components.state.Scope;
import java.util.Set; import java.util.Set;
@ApiModel
public class Stateful { public class Stateful {
private String description; private String description;
private Set<Scope> scopes; private Set<Scope> scopes;
@ApiModelProperty(value = "Description of what information is being stored in the StateManager") @Schema(description = "Description of what information is being stored in the StateManager")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -37,7 +35,7 @@ public class Stateful {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "Indicates the Scope(s) associated with the State that is stored and retrieved") @Schema(description = "Indicates the Scope(s) associated with the State that is stored and retrieved")
public Set<Scope> getScopes() { public Set<Scope> getScopes() {
return scopes; return scopes;
} }

View File

@ -16,16 +16,14 @@
*/ */
package org.apache.nifi.c2.protocol.component.api; package org.apache.nifi.c2.protocol.component.api;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class SystemResourceConsideration { public class SystemResourceConsideration {
private String resource; private String resource;
private String description; private String description;
@ApiModelProperty(value = "The resource to consider") @Schema(description = "The resource to consider")
public String getResource() { public String getResource() {
return resource; return resource;
} }
@ -34,7 +32,7 @@ public class SystemResourceConsideration {
this.resource = resource; this.resource = resource;
} }
@ApiModelProperty(value = "The description of how the resource is affected") @Schema(description = "The description of how the resource is affected")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -97,7 +97,7 @@ limitations under the License.
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -26,11 +26,12 @@ import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader; import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache; import com.google.common.cache.LoadingCache;
import com.google.common.util.concurrent.UncheckedExecutionException; import com.google.common.util.concurrent.UncheckedExecutionException;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.annotations.ApiResponse; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiResponses; import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -77,10 +78,6 @@ import org.springframework.security.core.context.SecurityContextHolder;
@Configuration @Configuration
@Path("/config") @Path("/config")
@ApiModel(
value = "/config",
description = "Provides configuration and heartbeat/acknowledge capabilities for MiNiFi instances"
)
public class ConfigService { public class ConfigService {
public static final String MESSAGE_400 = "MiNiFi C2 server was unable to complete the request because it was invalid. The request should not be retried without modification."; public static final String MESSAGE_400 = "MiNiFi C2 server was unable to complete the request because it was invalid. The request should not be retried without modification.";
@ -177,15 +174,23 @@ public class ConfigService {
@Path("/heartbeat") @Path("/heartbeat")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApiOperation( @Operation(
value = "An endpoint for a MiNiFi Agent to send a heartbeat to the C2 server", description = "An endpoint for a MiNiFi Agent to send a heartbeat to the C2 server"
response = C2HeartbeatResponse.class
) )
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 400, message = MESSAGE_400)}) @ApiResponse(
responseCode = "200",
description = "Success",
content = @Content(schema = @Schema(implementation = C2HeartbeatResponse.class))
),
@ApiResponse(
responseCode = "400",
description = MESSAGE_400
)
})
public Response heartbeat( public Response heartbeat(
@Context HttpServletRequest request, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo, @Context HttpServletRequest request, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo,
@ApiParam(required = true) final C2Heartbeat heartbeat) { @Parameter(required = true) final C2Heartbeat heartbeat) {
try { try {
authorizer.authorize(SecurityContextHolder.getContext().getAuthentication(), uriInfo); authorizer.authorize(SecurityContextHolder.getContext().getAuthentication(), uriInfo);
@ -275,13 +280,17 @@ public class ConfigService {
@Path("/acknowledge") @Path("/acknowledge")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApiOperation( @Operation(
value = "An endpoint for a MiNiFi Agent to send an operation acknowledgement to the C2 server" description = "An endpoint for a MiNiFi Agent to send an operation acknowledgement to the C2 server"
) )
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 400, message = MESSAGE_400)}) @ApiResponse(
responseCode = "400",
description = MESSAGE_400
)
})
public Response acknowledge( public Response acknowledge(
@ApiParam(required = true) final C2OperationAck operationAck) { @Parameter(required = true) final C2OperationAck operationAck) {
final C2ProtocolContext ackContext = C2ProtocolContext.builder() final C2ProtocolContext ackContext = C2ProtocolContext.builder()
.baseUri(getBaseUri()) .baseUri(getBaseUri())

View File

@ -34,7 +34,7 @@
--> -->
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<scope>compile</scope> <scope>compile</scope>
<optional>true</optional> <optional>true</optional>

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -26,7 +26,7 @@ public class BatchSize {
private String size; private String size;
private String duration; private String duration;
@ApiModelProperty("Preferred number of flow files to include in a transaction.") @Schema(description = "Preferred number of flow files to include in a transaction.")
public Integer getCount() { public Integer getCount() {
return count; return count;
} }
@ -35,7 +35,7 @@ public class BatchSize {
this.count = count; this.count = count;
} }
@ApiModelProperty("Preferred number of bytes to include in a transaction.") @Schema(description = "Preferred number of bytes to include in a transaction.")
public String getSize() { public String getSize() {
return size; return size;
} }
@ -44,7 +44,7 @@ public class BatchSize {
this.size = size; this.size = size;
} }
@ApiModelProperty("Preferred amount of time that a transaction should span.") @Schema(description = "Preferred amount of time that a transaction should span.")
public String getDuration() { public String getDuration() {
return duration; return duration;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -35,7 +35,7 @@ public class Bundle {
this.version = version; this.version = version;
} }
@ApiModelProperty("The group of the bundle") @Schema(description = "The group of the bundle")
public String getGroup() { public String getGroup() {
return group; return group;
} }
@ -44,7 +44,7 @@ public class Bundle {
this.group = group; this.group = group;
} }
@ApiModelProperty("The artifact of the bundle") @Schema(description = "The artifact of the bundle")
public String getArtifact() { public String getArtifact() {
return artifact; return artifact;
} }
@ -53,7 +53,7 @@ public class Bundle {
this.artifact = artifact; this.artifact = artifact;
} }
@ApiModelProperty("The version of the bundle") @Schema(description = "The version of the bundle")
public String getVersion() { public String getVersion() {
return version; return version;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -29,7 +29,7 @@ public class ConnectableComponent {
private String name; private String name;
private String comments; private String comments;
@ApiModelProperty(value = "The id of the connectable component.", required = true) @Schema(description = "The id of the connectable component.")
public String getId() { public String getId() {
return id; return id;
} }
@ -38,7 +38,7 @@ public class ConnectableComponent {
this.id = id; this.id = id;
} }
@ApiModelProperty("The instance ID of an existing component that is described by this VersionedComponent, or null if this is not mapped to an instantiated component") @Schema(description = "The instance ID of an existing component that is described by this VersionedComponent, or null if this is not mapped to an instantiated component")
public String getInstanceIdentifier() { public String getInstanceIdentifier() {
return instanceId; return instanceId;
} }
@ -47,7 +47,7 @@ public class ConnectableComponent {
this.instanceId = instanceIdentifier; this.instanceId = instanceIdentifier;
} }
@ApiModelProperty(value = "The type of component the connectable is.", required = true) @Schema(description = "The type of component the connectable is.")
public ConnectableComponentType getType() { public ConnectableComponentType getType() {
return type; return type;
} }
@ -56,7 +56,7 @@ public class ConnectableComponent {
this.type = type; this.type = type;
} }
@ApiModelProperty(value = "The id of the group that the connectable component resides in", required = true) @Schema(description = "The id of the group that the connectable component resides in")
public String getGroupId() { public String getGroupId() {
return groupId; return groupId;
} }
@ -65,7 +65,7 @@ public class ConnectableComponent {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty("The name of the connectable component") @Schema(description = "The name of the connectable component")
public String getName() { public String getName() {
return name; return name;
} }
@ -74,7 +74,7 @@ public class ConnectableComponent {
this.name = name; this.name = name;
} }
@ApiModelProperty("The comments for the connectable component.") @Schema(description = "The comments for the connectable component.")
public String getComments() { public String getComments() {
return comments; return comments;
} }

View File

@ -19,13 +19,13 @@ package org.apache.nifi.flow;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class ControllerServiceAPI { public class ControllerServiceAPI {
private String type; private String type;
private Bundle bundle; private Bundle bundle;
@ApiModelProperty("The fully qualified name of the service interface.") @Schema(description = "The fully qualified name of the service interface.")
public String getType() { public String getType() {
return type; return type;
} }
@ -34,7 +34,7 @@ public class ControllerServiceAPI {
this.type = type; this.type = type;
} }
@ApiModelProperty("The details of the artifact that bundled this service interface.") @Schema(description = "The details of the artifact that bundled this service interface.")
public Bundle getBundle() { public Bundle getBundle() {
return bundle; return bundle;
} }

View File

@ -16,16 +16,15 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel @Schema
public class ExternalControllerServiceReference { public class ExternalControllerServiceReference {
private String identifier; private String identifier;
private String name; private String name;
@ApiModelProperty("The identifier of the controller service") @Schema(description = "The identifier of the controller service")
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -34,7 +33,7 @@ public class ExternalControllerServiceReference {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty("The name of the controller service") @Schema(description = "The name of the controller service")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -16,10 +16,9 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
@ApiModel @Schema
public class ParameterProviderReference { public class ParameterProviderReference {
private String identifier; private String identifier;
@ -27,7 +26,7 @@ public class ParameterProviderReference {
private String type; private String type;
private Bundle bundle; private Bundle bundle;
@ApiModelProperty("The fully qualified name of the parameter provider class.") @Schema(description = "The fully qualified name of the parameter provider class.")
public String getType() { public String getType() {
return type; return type;
} }
@ -36,7 +35,7 @@ public class ParameterProviderReference {
this.type = type; this.type = type;
} }
@ApiModelProperty("The details of the artifact that bundled this parameter provider.") @Schema(description = "The details of the artifact that bundled this parameter provider.")
public Bundle getBundle() { public Bundle getBundle() {
return bundle; return bundle;
} }
@ -45,7 +44,7 @@ public class ParameterProviderReference {
this.bundle = bundle; this.bundle = bundle;
} }
@ApiModelProperty("The identifier of the parameter provider") @Schema(description = "The identifier of the parameter provider")
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -54,7 +53,7 @@ public class ParameterProviderReference {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty("The name of the parameter provider") @Schema(description = "The name of the parameter provider")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -17,12 +17,11 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects; import java.util.Objects;
@ApiModel(description = "The position of a component on the graph") @Schema(description = "The position of a component on the graph")
public class Position { public class Position {
private double x; private double x;
private double y; private double y;
@ -35,7 +34,7 @@ public class Position {
this.y = y; this.y = y;
} }
@ApiModelProperty("The x coordinate.") @Schema(description = "The x coordinate.")
public double getX() { public double getX() {
return x; return x;
} }
@ -44,7 +43,7 @@ public class Position {
this.x = x; this.x = x;
} }
@ApiModelProperty("The y coordinate.") @Schema(description = "The y coordinate.")
public double getY() { public double getY() {
return y; return y;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -31,7 +31,7 @@ public abstract class VersionedComponent {
private String comments; private String comments;
private Position position; private Position position;
@ApiModelProperty("The component's unique identifier") @Schema(description = "The component's unique identifier")
public String getIdentifier() { public String getIdentifier() {
return identifier; return identifier;
} }
@ -40,7 +40,7 @@ public abstract class VersionedComponent {
this.identifier = identifier; this.identifier = identifier;
} }
@ApiModelProperty("The instance ID of an existing component that is described by this VersionedComponent, or null if this is not mapped to an instantiated component") @Schema(description = "The instance ID of an existing component that is described by this VersionedComponent, or null if this is not mapped to an instantiated component")
public String getInstanceIdentifier() { public String getInstanceIdentifier() {
return instanceIdentifier; return instanceIdentifier;
} }
@ -49,7 +49,7 @@ public abstract class VersionedComponent {
this.instanceIdentifier = instanceIdentifier; this.instanceIdentifier = instanceIdentifier;
} }
@ApiModelProperty("The ID of the Process Group that this component belongs to") @Schema(description = "The ID of the Process Group that this component belongs to")
public String getGroupIdentifier() { public String getGroupIdentifier() {
return groupId; return groupId;
} }
@ -58,7 +58,7 @@ public abstract class VersionedComponent {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty("The component's name") @Schema(description = "The component's name")
public String getName() { public String getName() {
return name; return name;
} }
@ -67,7 +67,7 @@ public abstract class VersionedComponent {
this.name = name; this.name = name;
} }
@ApiModelProperty("The component's position on the graph") @Schema(description = "The component's position on the graph")
public Position getPosition() { public Position getPosition() {
return position; return position;
} }
@ -76,7 +76,7 @@ public abstract class VersionedComponent {
this.position = position; this.position = position;
} }
@ApiModelProperty("The user-supplied comments for the component") @Schema(description = "The user-supplied comments for the component")
public String getComments() { public String getComments() {
return comments; return comments;
} }

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map; import java.util.Map;
@ -30,7 +30,7 @@ public abstract class VersionedConfigurableExtension extends VersionedComponent
private Map<String, VersionedPropertyDescriptor> propertyDescriptors; private Map<String, VersionedPropertyDescriptor> propertyDescriptors;
@Override @Override
@ApiModelProperty("The type of the extension component") @Schema(description = "The type of the extension component")
public String getType() { public String getType() {
return type; return type;
} }
@ -41,7 +41,7 @@ public abstract class VersionedConfigurableExtension extends VersionedComponent
} }
@Override @Override
@ApiModelProperty("Information about the bundle from which the component came") @Schema(description = "Information about the bundle from which the component came")
public Bundle getBundle() { public Bundle getBundle() {
return bundle; return bundle;
} }
@ -53,7 +53,7 @@ public abstract class VersionedConfigurableExtension extends VersionedComponent
@Override @Override
@ApiModelProperty("The properties for the component. Properties whose value is not set will only contain the property name.") @Schema(description = "The properties for the component. Properties whose value is not set will only contain the property name.")
public Map<String, String> getProperties() { public Map<String, String> getProperties() {
return properties; return properties;
} }
@ -64,7 +64,7 @@ public abstract class VersionedConfigurableExtension extends VersionedComponent
} }
@Override @Override
@ApiModelProperty("The property descriptors for the component.") @Schema(description = "The property descriptors for the component.")
public Map<String, VersionedPropertyDescriptor> getPropertyDescriptors() { public Map<String, VersionedPropertyDescriptor> getPropertyDescriptors() {
return propertyDescriptors; return propertyDescriptors;
} }

View File

@ -20,7 +20,7 @@ package org.apache.nifi.flow;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class VersionedConnection extends VersionedComponent { public class VersionedConnection extends VersionedComponent {
private ConnectableComponent source; private ConnectableComponent source;
@ -39,8 +39,7 @@ public class VersionedConnection extends VersionedComponent {
private String partitioningAttribute; private String partitioningAttribute;
private String loadBalanceCompression; private String loadBalanceCompression;
@Schema(description = "The source of the connection.")
@ApiModelProperty("The source of the connection.")
public ConnectableComponent getSource() { public ConnectableComponent getSource() {
return source; return source;
} }
@ -49,7 +48,7 @@ public class VersionedConnection extends VersionedComponent {
this.source = source; this.source = source;
} }
@ApiModelProperty("The destination of the connection.") @Schema(description = "The destination of the connection.")
public ConnectableComponent getDestination() { public ConnectableComponent getDestination() {
return destination; return destination;
} }
@ -58,7 +57,7 @@ public class VersionedConnection extends VersionedComponent {
this.destination = destination; this.destination = destination;
} }
@ApiModelProperty("The bend points on the connection.") @Schema(description = "The bend points on the connection.")
public List<Position> getBends() { public List<Position> getBends() {
return bends; return bends;
} }
@ -67,7 +66,7 @@ public class VersionedConnection extends VersionedComponent {
this.bends = bends; this.bends = bends;
} }
@ApiModelProperty("The index of the bend point where to place the connection label.") @Schema(description = "The index of the bend point where to place the connection label.")
public Integer getLabelIndex() { public Integer getLabelIndex() {
return labelIndex; return labelIndex;
} }
@ -76,8 +75,8 @@ public class VersionedConnection extends VersionedComponent {
this.labelIndex = labelIndex; this.labelIndex = labelIndex;
} }
@ApiModelProperty( @Schema(
value = "The z index of the connection.", description = "The z index of the connection.",
name = "zIndex") // Jackson maps this method name to JSON key "zIndex", but Swagger does not by default name = "zIndex") // Jackson maps this method name to JSON key "zIndex", but Swagger does not by default
public Long getzIndex() { public Long getzIndex() {
return zIndex; return zIndex;
@ -87,7 +86,7 @@ public class VersionedConnection extends VersionedComponent {
this.zIndex = zIndex; this.zIndex = zIndex;
} }
@ApiModelProperty("The selected relationship that comprise the connection.") @Schema(description = "The selected relationship that comprise the connection.")
public Set<String> getSelectedRelationships() { public Set<String> getSelectedRelationships() {
return selectedRelationships; return selectedRelationships;
} }
@ -96,8 +95,7 @@ public class VersionedConnection extends VersionedComponent {
this.selectedRelationships = relationships; this.selectedRelationships = relationships;
} }
@Schema(description = "The object count threshold for determining when back pressure is applied. Updating this value is a passive change in the sense that it won't impact whether existing files "
@ApiModelProperty("The object count threshold for determining when back pressure is applied. Updating this value is a passive change in the sense that it won't impact whether existing files "
+ "over the limit are affected but it does help feeder processors to stop pushing too much into this work queue.") + "over the limit are affected but it does help feeder processors to stop pushing too much into this work queue.")
public Long getBackPressureObjectThreshold() { public Long getBackPressureObjectThreshold() {
return backPressureObjectThreshold; return backPressureObjectThreshold;
@ -107,8 +105,7 @@ public class VersionedConnection extends VersionedComponent {
this.backPressureObjectThreshold = backPressureObjectThreshold; this.backPressureObjectThreshold = backPressureObjectThreshold;
} }
@Schema(description = "The object data size threshold for determining when back pressure is applied. Updating this value is a passive change in the sense that it won't impact whether existing "
@ApiModelProperty("The object data size threshold for determining when back pressure is applied. Updating this value is a passive change in the sense that it won't impact whether existing "
+ "files over the limit are affected but it does help feeder processors to stop pushing too much into this work queue.") + "files over the limit are affected but it does help feeder processors to stop pushing too much into this work queue.")
public String getBackPressureDataSizeThreshold() { public String getBackPressureDataSizeThreshold() {
return backPressureDataSizeThreshold; return backPressureDataSizeThreshold;
@ -119,7 +116,7 @@ public class VersionedConnection extends VersionedComponent {
} }
@ApiModelProperty("The amount of time a flow file may be in the flow before it will be automatically aged out of the flow. Once a flow file reaches this age it will be terminated from " @Schema(description = "The amount of time a flow file may be in the flow before it will be automatically aged out of the flow. Once a flow file reaches this age it will be terminated from "
+ "the flow the next time a processor attempts to start work on it.") + "the flow the next time a processor attempts to start work on it.")
public String getFlowFileExpiration() { public String getFlowFileExpiration() {
return flowFileExpiration; return flowFileExpiration;
@ -130,7 +127,7 @@ public class VersionedConnection extends VersionedComponent {
} }
@ApiModelProperty("The comparators used to prioritize the queue.") @Schema(description = "The comparators used to prioritize the queue.")
public List<String> getPrioritizers() { public List<String> getPrioritizers() {
return prioritizers; return prioritizers;
} }
@ -139,7 +136,7 @@ public class VersionedConnection extends VersionedComponent {
this.prioritizers = prioritizers; this.prioritizers = prioritizers;
} }
@ApiModelProperty(value = "The Strategy to use for load balancing data across the cluster, or null, if no Load Balance Strategy has been specified.", @Schema(description = "The Strategy to use for load balancing data across the cluster, or null, if no Load Balance Strategy has been specified.",
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() { public String getLoadBalanceStrategy() {
return loadBalanceStrategy; return loadBalanceStrategy;
@ -149,7 +146,7 @@ public class VersionedConnection extends VersionedComponent {
this.loadBalanceStrategy = loadBalanceStrategy; this.loadBalanceStrategy = loadBalanceStrategy;
} }
@ApiModelProperty("The attribute to use for partitioning data as it is load balanced across the cluster. If the Load Balance Strategy is configured to use PARTITION_BY_ATTRIBUTE, the value " + @Schema(description = "The attribute to use for partitioning data as it is load balanced across the cluster. If the Load Balance Strategy is configured to use PARTITION_BY_ATTRIBUTE, the value " +
"returned by this method is the name of the FlowFile Attribute that will be used to determine which node in the cluster should receive a given FlowFile. If the Load Balance Strategy is " + "returned by this method is the name of the FlowFile Attribute that will be used to determine which node in the cluster should receive a given FlowFile. If the Load Balance Strategy is " +
"unset or is set to any other value, the Partitioning Attribute has no effect.") "unset or is set to any other value, the Partitioning Attribute has no effect.")
public String getPartitioningAttribute() { public String getPartitioningAttribute() {
@ -160,7 +157,7 @@ public class VersionedConnection extends VersionedComponent {
this.partitioningAttribute = partitioningAttribute; this.partitioningAttribute = partitioningAttribute;
} }
@ApiModelProperty(value = "Whether or not compression should be used when transferring FlowFiles between nodes", @Schema(description = "Whether or not compression should be used when transferring FlowFiles between nodes",
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() { public String getLoadBalanceCompression() {
return loadBalanceCompression; return loadBalanceCompression;

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List; import java.util.List;
@ -29,7 +29,7 @@ public class VersionedControllerService extends VersionedConfigurableExtension {
private ScheduledState scheduledState; private ScheduledState scheduledState;
private String bulletinLevel; private String bulletinLevel;
@ApiModelProperty(value = "Lists the APIs this Controller Service implements.") @Schema(description = "Lists the APIs this Controller Service implements.")
public List<ControllerServiceAPI> getControllerServiceApis() { public List<ControllerServiceAPI> getControllerServiceApis() {
return controllerServiceApis; return controllerServiceApis;
} }
@ -38,7 +38,7 @@ public class VersionedControllerService extends VersionedConfigurableExtension {
this.controllerServiceApis = controllerServiceApis; this.controllerServiceApis = controllerServiceApis;
} }
@ApiModelProperty(value = "The annotation for the controller service. This is how the custom UI relays configuration to the controller service.") @Schema(description = "The annotation for the controller service. This is how the custom UI relays configuration to the controller service.")
public String getAnnotationData() { public String getAnnotationData() {
return annotationData; return annotationData;
} }
@ -52,7 +52,7 @@ public class VersionedControllerService extends VersionedConfigurableExtension {
return ComponentType.CONTROLLER_SERVICE; return ComponentType.CONTROLLER_SERVICE;
} }
@ApiModelProperty("The ScheduledState denoting whether the Controller Service is ENABLED or DISABLED") @Schema(description = "The ScheduledState denoting whether the Controller Service is ENABLED or DISABLED")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }
@ -61,7 +61,7 @@ public class VersionedControllerService extends VersionedConfigurableExtension {
this.scheduledState = scheduledState; this.scheduledState = scheduledState;
} }
@ApiModelProperty("The level at which the controller service will report bulletins.") @Schema(description = "The level at which the controller service will report bulletins.")
public String getBulletinLevel() { public String getBulletinLevel() {
return bulletinLevel; return bulletinLevel;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.nifi.flowanalysis.EnforcementPolicy; import org.apache.nifi.flowanalysis.EnforcementPolicy;
public class VersionedFlowAnalysisRule extends VersionedConfigurableExtension { public class VersionedFlowAnalysisRule extends VersionedConfigurableExtension {
@ -25,7 +25,7 @@ public class VersionedFlowAnalysisRule extends VersionedConfigurableExtension {
private ScheduledState scheduledState; private ScheduledState scheduledState;
private EnforcementPolicy enforcementPolicy; private EnforcementPolicy enforcementPolicy;
@ApiModelProperty("How to handle violations.") @Schema(description = "How to handle violations.")
public EnforcementPolicy getEnforcementPolicy() { public EnforcementPolicy getEnforcementPolicy() {
return enforcementPolicy; return enforcementPolicy;
} }
@ -39,7 +39,7 @@ public class VersionedFlowAnalysisRule extends VersionedConfigurableExtension {
return ComponentType.FLOW_ANALYSIS_RULE; return ComponentType.FLOW_ANALYSIS_RULE;
} }
@ApiModelProperty("Indicates the scheduled state for the flow analysis rule") @Schema(description = "Indicates the scheduled state for the flow analysis rule")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -29,7 +29,7 @@ public class VersionedFlowCoordinates {
private int version; private int version;
private Boolean latest; private Boolean latest;
@ApiModelProperty("The identifier of the Flow Registry that contains the flow") @Schema(description = "The identifier of the Flow Registry that contains the flow")
public String getRegistryId() { public String getRegistryId() {
return registryId; return registryId;
} }
@ -38,7 +38,7 @@ public class VersionedFlowCoordinates {
this.registryId = registryId; this.registryId = registryId;
} }
@ApiModelProperty("The location of the Flow Registry that stores the flow") @Schema(description = "The location of the Flow Registry that stores the flow")
public String getStorageLocation() { public String getStorageLocation() {
return storageLocation; return storageLocation;
} }
@ -47,7 +47,7 @@ public class VersionedFlowCoordinates {
this.storageLocation = storageLocation; this.storageLocation = storageLocation;
} }
@ApiModelProperty("The UUID of the bucket that the flow resides in") @Schema(description = "The UUID of the bucket that the flow resides in")
public String getBucketId() { public String getBucketId() {
return bucketId; return bucketId;
} }
@ -56,7 +56,7 @@ public class VersionedFlowCoordinates {
this.bucketId = bucketId; this.bucketId = bucketId;
} }
@ApiModelProperty("The UUID of the flow") @Schema(description = "The UUID of the flow")
public String getFlowId() { public String getFlowId() {
return flowId; return flowId;
} }
@ -65,7 +65,7 @@ public class VersionedFlowCoordinates {
this.flowId = flowId; this.flowId = flowId;
} }
@ApiModelProperty("The version of the flow") @Schema(description = "The version of the flow")
public int getVersion() { public int getVersion() {
return version; return version;
} }
@ -74,7 +74,7 @@ public class VersionedFlowCoordinates {
this.version = version; this.version = version;
} }
@ApiModelProperty("Whether or not these coordinates point to the latest version of the flow") @Schema(description = "Whether or not these coordinates point to the latest version of the flow")
public Boolean getLatest() { public Boolean getLatest() {
return latest; return latest;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class VersionedFlowRegistryClient extends VersionedConfigurableExtension { public class VersionedFlowRegistryClient extends VersionedConfigurableExtension {
private String description; private String description;
@ -28,7 +28,7 @@ public class VersionedFlowRegistryClient extends VersionedConfigurableExtension
return ComponentType.FLOW_REGISTRY_CLIENT; return ComponentType.FLOW_REGISTRY_CLIENT;
} }
@ApiModelProperty("The description of the registry") @Schema(description = "The description of the registry")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -37,7 +37,7 @@ public class VersionedFlowRegistryClient extends VersionedConfigurableExtension
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "The annotation for the reporting task. This is how the custom UI relays configuration to the reporting task.") @Schema(description = "The annotation for the reporting task. This is how the custom UI relays configuration to the reporting task.")
public String getAnnotationData() { public String getAnnotationData() {
return annotationData; return annotationData;
} }

View File

@ -19,7 +19,7 @@ package org.apache.nifi.flow;
import java.util.Map; import java.util.Map;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class VersionedLabel extends VersionedComponent { public class VersionedLabel extends VersionedComponent {
private String label; private String label;
@ -31,7 +31,7 @@ public class VersionedLabel extends VersionedComponent {
private Map<String, String> style; private Map<String, String> style;
@ApiModelProperty("The text that appears in the label.") @Schema(description = "The text that appears in the label.")
public String getLabel() { public String getLabel() {
return label; return label;
} }
@ -40,7 +40,7 @@ public class VersionedLabel extends VersionedComponent {
this.label = label; this.label = label;
} }
@ApiModelProperty("The styles for this label (font-size : 12px, background-color : #eee, etc).") @Schema(description = "The styles for this label (font-size : 12px, background-color : #eee, etc).")
public Map<String, String> getStyle() { public Map<String, String> getStyle() {
return style; return style;
} }
@ -49,7 +49,7 @@ public class VersionedLabel extends VersionedComponent {
this.style = style; this.style = style;
} }
@ApiModelProperty("The height of the label in pixels when at a 1:1 scale.") @Schema(description = "The height of the label in pixels when at a 1:1 scale.")
public Double getHeight() { public Double getHeight() {
return height; return height;
} }
@ -58,7 +58,7 @@ public class VersionedLabel extends VersionedComponent {
this.height = height; this.height = height;
} }
@ApiModelProperty("The width of the label in pixels when at a 1:1 scale.") @Schema(description = "The width of the label in pixels when at a 1:1 scale.")
public Double getWidth() { public Double getWidth() {
return width; return width;
} }
@ -67,8 +67,8 @@ public class VersionedLabel extends VersionedComponent {
this.width = width; this.width = width;
} }
@ApiModelProperty( @Schema(
value = "The z index of the connection.", description = "The z index of the connection.",
name = "zIndex") // Jackson maps this method name to JSON key "zIndex", but Swagger does not by default name = "zIndex") // Jackson maps this method name to JSON key "zIndex", but Swagger does not by default
public Long getzIndex() { public Long getzIndex() {
return zIndex; return zIndex;

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -28,7 +28,7 @@ public class VersionedParameter {
private boolean provided; private boolean provided;
private String value; private String value;
@ApiModelProperty("The name of the parameter") @Schema(description = "The name of the parameter")
public String getName() { public String getName() {
return name; return name;
} }
@ -37,7 +37,7 @@ public class VersionedParameter {
this.name = name; this.name = name;
} }
@ApiModelProperty("The description of the param") @Schema(description = "The description of the param")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -46,7 +46,7 @@ public class VersionedParameter {
this.description = description; this.description = description;
} }
@ApiModelProperty("Whether or not the parameter value is sensitive") @Schema(description = "Whether or not the parameter value is sensitive")
public boolean isSensitive() { public boolean isSensitive() {
return sensitive; return sensitive;
} }
@ -55,7 +55,7 @@ public class VersionedParameter {
this.sensitive = sensitive; this.sensitive = sensitive;
} }
@ApiModelProperty("Whether or not the parameter value is provided by a ParameterProvider") @Schema(description = "Whether or not the parameter value is provided by a ParameterProvider")
public boolean isProvided() { public boolean isProvided() {
return provided; return provided;
} }
@ -64,7 +64,7 @@ public class VersionedParameter {
this.provided = provided; this.provided = provided;
} }
@ApiModelProperty("The value of the parameter") @Schema(description = "The value of the parameter")
public String getValue() { public String getValue() {
return value; return value;
} }

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -29,7 +29,7 @@ public class VersionedParameterContext extends VersionedComponent {
private String parameterGroupName; private String parameterGroupName;
private Boolean isSynchronized; private Boolean isSynchronized;
@ApiModelProperty("The description of the parameter context") @Schema(description = "The description of the parameter context")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -38,7 +38,7 @@ public class VersionedParameterContext extends VersionedComponent {
this.description = description; this.description = description;
} }
@ApiModelProperty("The parameters in the context") @Schema(description = "The parameters in the context")
public Set<VersionedParameter> getParameters() { public Set<VersionedParameter> getParameters() {
return parameters; return parameters;
} }
@ -47,7 +47,7 @@ public class VersionedParameterContext extends VersionedComponent {
this.parameters = parameters; this.parameters = parameters;
} }
@ApiModelProperty("The names of additional parameter contexts from which to inherit parameters") @Schema(description = "The names of additional parameter contexts from which to inherit parameters")
public List<String> getInheritedParameterContexts() { public List<String> getInheritedParameterContexts() {
return inheritedParameterContexts; return inheritedParameterContexts;
} }
@ -61,7 +61,7 @@ public class VersionedParameterContext extends VersionedComponent {
return ComponentType.PARAMETER_CONTEXT; return ComponentType.PARAMETER_CONTEXT;
} }
@ApiModelProperty("The identifier of an optional parameter provider") @Schema(description = "The identifier of an optional parameter provider")
public String getParameterProvider() { public String getParameterProvider() {
return parameterProvider; return parameterProvider;
} }
@ -70,7 +70,7 @@ public class VersionedParameterContext extends VersionedComponent {
this.parameterProvider = parameterProvider; this.parameterProvider = parameterProvider;
} }
@ApiModelProperty("The corresponding parameter group name fetched from the parameter provider, if applicable") @Schema(description = "The corresponding parameter group name fetched from the parameter provider, if applicable")
public String getParameterGroupName() { public String getParameterGroupName() {
return parameterGroupName; return parameterGroupName;
} }
@ -79,7 +79,7 @@ public class VersionedParameterContext extends VersionedComponent {
this.parameterGroupName = parameterGroupName; this.parameterGroupName = parameterGroupName;
} }
@ApiModelProperty("True if the parameter provider is set and the context should receive updates when its parameters are next fetched") @Schema(description = "True if the parameter provider is set and the context should receive updates when its parameters are next fetched")
public Boolean isSynchronized() { public Boolean isSynchronized() {
return isSynchronized; return isSynchronized;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map; import java.util.Map;
@ -30,7 +30,7 @@ public class VersionedParameterProvider extends VersionedComponent implements Ve
@Override @Override
@ApiModelProperty(value = "The type of the parameter provider.") @Schema(description = "The type of the parameter provider.")
public String getType() { public String getType() {
return type; return type;
} }
@ -41,7 +41,7 @@ public class VersionedParameterProvider extends VersionedComponent implements Ve
} }
@Override @Override
@ApiModelProperty(value = "The details of the artifact that bundled this parameter provider type.") @Schema(description = "The details of the artifact that bundled this parameter provider type.")
public Bundle getBundle() { public Bundle getBundle() {
return bundle; return bundle;
} }
@ -52,7 +52,7 @@ public class VersionedParameterProvider extends VersionedComponent implements Ve
} }
@Override @Override
@ApiModelProperty(value = "The properties of the parameter provider.") @Schema(description = "The properties of the parameter provider.")
public Map<String, String> getProperties() { public Map<String, String> getProperties() {
return properties; return properties;
} }
@ -63,7 +63,7 @@ public class VersionedParameterProvider extends VersionedComponent implements Ve
} }
@Override @Override
@ApiModelProperty("The property descriptors for the parameter provider.") @Schema(description = "The property descriptors for the parameter provider.")
public Map<String, VersionedPropertyDescriptor> getPropertyDescriptors() { public Map<String, VersionedPropertyDescriptor> getPropertyDescriptors() {
return propertyDescriptors; return propertyDescriptors;
} }
@ -73,7 +73,7 @@ public class VersionedParameterProvider extends VersionedComponent implements Ve
this.propertyDescriptors = propertyDescriptors; this.propertyDescriptors = propertyDescriptors;
} }
@ApiModelProperty(value = "The annotation for the parameter provider. This is how the custom UI relays configuration to the parameter provider.") @Schema(description = "The annotation for the parameter provider. This is how the custom UI relays configuration to the parameter provider.")
public String getAnnotationData() { public String getAnnotationData() {
return annotationData; return annotationData;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.nifi.components.PortFunction; import org.apache.nifi.components.PortFunction;
public class VersionedPort extends VersionedComponent { public class VersionedPort extends VersionedComponent {
@ -27,7 +27,7 @@ public class VersionedPort extends VersionedComponent {
private Boolean allowRemoteAccess; private Boolean allowRemoteAccess;
private PortFunction portFunction; private PortFunction portFunction;
@ApiModelProperty("The number of tasks that should be concurrently scheduled for the port.") @Schema(description = "The number of tasks that should be concurrently scheduled for the port.")
public Integer getConcurrentlySchedulableTaskCount() { public Integer getConcurrentlySchedulableTaskCount() {
return concurrentlySchedulableTaskCount; return concurrentlySchedulableTaskCount;
} }
@ -36,7 +36,7 @@ public class VersionedPort extends VersionedComponent {
this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount; this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount;
} }
@ApiModelProperty("The type of port.") @Schema(description = "The type of port.")
public PortType getType() { public PortType getType() {
return type; return type;
} }
@ -45,7 +45,7 @@ public class VersionedPort extends VersionedComponent {
this.type = type; this.type = type;
} }
@ApiModelProperty("The scheduled state of the component") @Schema(description = "The scheduled state of the component")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }
@ -54,7 +54,7 @@ public class VersionedPort extends VersionedComponent {
this.scheduledState = scheduledState; this.scheduledState = scheduledState;
} }
@ApiModelProperty("Whether or not this port allows remote access for site-to-site") @Schema(description = "Whether or not this port allows remote access for site-to-site")
public Boolean isAllowRemoteAccess() { public Boolean isAllowRemoteAccess() {
return ((allowRemoteAccess != null) && allowRemoteAccess); return ((allowRemoteAccess != null) && allowRemoteAccess);
} }
@ -67,7 +67,7 @@ public class VersionedPort extends VersionedComponent {
this.allowRemoteAccess = allowRemoteAccess; this.allowRemoteAccess = allowRemoteAccess;
} }
@ApiModelProperty("Specifies how the Port should function") @Schema(description = "Specifies how the Port should function")
public PortFunction getPortFunction() { public PortFunction getPortFunction() {
return portFunction; return portFunction;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
@ -50,7 +50,7 @@ public class VersionedProcessGroup extends VersionedComponent {
private String logFileSuffix; private String logFileSuffix;
@ApiModelProperty("The child Process Groups") @Schema(description = "The child Process Groups")
public Set<VersionedProcessGroup> getProcessGroups() { public Set<VersionedProcessGroup> getProcessGroups() {
return processGroups; return processGroups;
} }
@ -59,7 +59,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.processGroups = new HashSet<>(processGroups); this.processGroups = new HashSet<>(processGroups);
} }
@ApiModelProperty("The Remote Process Groups") @Schema(description = "The Remote Process Groups")
public Set<VersionedRemoteProcessGroup> getRemoteProcessGroups() { public Set<VersionedRemoteProcessGroup> getRemoteProcessGroups() {
return remoteProcessGroups; return remoteProcessGroups;
} }
@ -68,7 +68,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.remoteProcessGroups = new HashSet<>(remoteProcessGroups); this.remoteProcessGroups = new HashSet<>(remoteProcessGroups);
} }
@ApiModelProperty("The Processors") @Schema(description = "The Processors")
public Set<VersionedProcessor> getProcessors() { public Set<VersionedProcessor> getProcessors() {
return processors; return processors;
} }
@ -77,7 +77,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.processors = new HashSet<>(processors); this.processors = new HashSet<>(processors);
} }
@ApiModelProperty("The Input Ports") @Schema(description = "The Input Ports")
public Set<VersionedPort> getInputPorts() { public Set<VersionedPort> getInputPorts() {
return inputPorts; return inputPorts;
} }
@ -86,7 +86,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.inputPorts = new HashSet<>(inputPorts); this.inputPorts = new HashSet<>(inputPorts);
} }
@ApiModelProperty("The Output Ports") @Schema(description = "The Output Ports")
public Set<VersionedPort> getOutputPorts() { public Set<VersionedPort> getOutputPorts() {
return outputPorts; return outputPorts;
} }
@ -95,7 +95,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.outputPorts = new HashSet<>(outputPorts); this.outputPorts = new HashSet<>(outputPorts);
} }
@ApiModelProperty("The Connections") @Schema(description = "The Connections")
public Set<VersionedConnection> getConnections() { public Set<VersionedConnection> getConnections() {
return connections; return connections;
} }
@ -104,7 +104,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.connections = new HashSet<>(connections); this.connections = new HashSet<>(connections);
} }
@ApiModelProperty("The Labels") @Schema(description = "The Labels")
public Set<VersionedLabel> getLabels() { public Set<VersionedLabel> getLabels() {
return labels; return labels;
} }
@ -113,7 +113,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.labels = new HashSet<>(labels); this.labels = new HashSet<>(labels);
} }
@ApiModelProperty("The Funnels") @Schema(description = "The Funnels")
public Set<VersionedFunnel> getFunnels() { public Set<VersionedFunnel> getFunnels() {
return funnels; return funnels;
} }
@ -122,7 +122,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.funnels = new HashSet<>(funnels); this.funnels = new HashSet<>(funnels);
} }
@ApiModelProperty("The Controller Services") @Schema(description = "The Controller Services")
public Set<VersionedControllerService> getControllerServices() { public Set<VersionedControllerService> getControllerServices() {
return controllerServices; return controllerServices;
} }
@ -140,12 +140,12 @@ public class VersionedProcessGroup extends VersionedComponent {
this.versionedFlowCoordinates = flowCoordinates; this.versionedFlowCoordinates = flowCoordinates;
} }
@ApiModelProperty("The coordinates where the remote flow is stored, or null if the Process Group is not directly under Version Control") @Schema(description = "The coordinates where the remote flow is stored, or null if the Process Group is not directly under Version Control")
public VersionedFlowCoordinates getVersionedFlowCoordinates() { public VersionedFlowCoordinates getVersionedFlowCoordinates() {
return versionedFlowCoordinates; return versionedFlowCoordinates;
} }
@ApiModelProperty("The name of the parameter context used by this process group") @Schema(description = "The name of the parameter context used by this process group")
public String getParameterContextName() { public String getParameterContextName() {
return parameterContextName; return parameterContextName;
} }
@ -154,7 +154,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.parameterContextName = parameterContextName; this.parameterContextName = parameterContextName;
} }
@ApiModelProperty(value = "The configured FlowFile Concurrency for the Process Group") @Schema(description = "The configured FlowFile Concurrency for the Process Group")
public String getFlowFileConcurrency() { public String getFlowFileConcurrency() {
return flowfileConcurrency; return flowfileConcurrency;
} }
@ -163,7 +163,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.flowfileConcurrency = flowfileConcurrency; this.flowfileConcurrency = flowfileConcurrency;
} }
@ApiModelProperty(value = "The FlowFile Outbound Policy for the Process Group") @Schema(description = "The FlowFile Outbound Policy for the Process Group")
public String getFlowFileOutboundPolicy() { public String getFlowFileOutboundPolicy() {
return flowfileOutboundPolicy; return flowfileOutboundPolicy;
} }
@ -172,7 +172,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.flowfileOutboundPolicy = outboundPolicy; this.flowfileOutboundPolicy = outboundPolicy;
} }
@ApiModelProperty(value = "The default FlowFile Expiration for this Process Group.") @Schema(description = "The default FlowFile Expiration for this Process Group.")
public String getDefaultFlowFileExpiration() { public String getDefaultFlowFileExpiration() {
return defaultFlowFileExpiration; return defaultFlowFileExpiration;
} }
@ -181,7 +181,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.defaultFlowFileExpiration = defaultFlowFileExpiration; this.defaultFlowFileExpiration = defaultFlowFileExpiration;
} }
@ApiModelProperty(value = "Default value used in this Process Group for the maximum number of objects that can be queued before back pressure is applied.") @Schema(description = "Default value used in this Process Group for the maximum number of objects that can be queued before back pressure is applied.")
public Long getDefaultBackPressureObjectThreshold() { public Long getDefaultBackPressureObjectThreshold() {
return defaultBackPressureObjectThreshold; return defaultBackPressureObjectThreshold;
} }
@ -190,7 +190,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.defaultBackPressureObjectThreshold = defaultBackPressureObjectThreshold; this.defaultBackPressureObjectThreshold = defaultBackPressureObjectThreshold;
} }
@ApiModelProperty(value = "Default value used in this Process Group for the maximum data size of objects that can be queued before back pressure is applied.") @Schema(description = "Default value used in this Process Group for the maximum data size of objects that can be queued before back pressure is applied.")
public String getDefaultBackPressureDataSizeThreshold() { public String getDefaultBackPressureDataSizeThreshold() {
return defaultBackPressureDataSizeThreshold; return defaultBackPressureDataSizeThreshold;
} }
@ -199,7 +199,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.defaultBackPressureDataSizeThreshold = defaultBackPressureDataSizeThreshold; this.defaultBackPressureDataSizeThreshold = defaultBackPressureDataSizeThreshold;
} }
@ApiModelProperty(value = "The log file suffix for this Process Group for dedicated logging.") @Schema(description = "The log file suffix for this Process Group for dedicated logging.")
public String getLogFileSuffix() { public String getLogFileSuffix() {
return logFileSuffix; return logFileSuffix;
} }
@ -208,7 +208,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.logFileSuffix = logFileSuffix; this.logFileSuffix = logFileSuffix;
} }
@ApiModelProperty("The Scheduled State of the Process Group, if the group is configured to use the Stateless Execution Engine. Otherwise, this value has no relevance.") @Schema(description = "The Scheduled State of the Process Group, if the group is configured to use the Stateless Execution Engine. Otherwise, this value has no relevance.")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }
@ -217,7 +217,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.scheduledState = scheduledState; this.scheduledState = scheduledState;
} }
@ApiModelProperty("The Execution Engine that should be used to run the components within the group.") @Schema(description = "The Execution Engine that should be used to run the components within the group.")
public ExecutionEngine getExecutionEngine() { public ExecutionEngine getExecutionEngine() {
return executionEngine; return executionEngine;
} }
@ -226,7 +226,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.executionEngine = executionEngine; this.executionEngine = executionEngine;
} }
@ApiModelProperty("The maximum number of concurrent tasks that should be scheduled for this Process Group when using the Stateless Engine") @Schema(description = "The maximum number of concurrent tasks that should be scheduled for this Process Group when using the Stateless Engine")
public Integer getMaxConcurrentTasks() { public Integer getMaxConcurrentTasks() {
return maxConcurrentTasks; return maxConcurrentTasks;
} }
@ -235,7 +235,7 @@ public class VersionedProcessGroup extends VersionedComponent {
this.maxConcurrentTasks = maxConcurrentTasks; this.maxConcurrentTasks = maxConcurrentTasks;
} }
@ApiModelProperty("The maximum amount of time that the flow is allows to run using the Stateless engine before it times out and is considered a failure") @Schema(description = "The maximum amount of time that the flow is allows to run using the Stateless engine before it times out and is considered a failure")
public String getStatelessFlowTimeout() { public String getStatelessFlowTimeout() {
return statelessFlowTimeout; return statelessFlowTimeout;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -43,7 +43,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
private String backoffMechanism; private String backoffMechanism;
private String maxBackoffPeriod; private String maxBackoffPeriod;
@ApiModelProperty("The frequency with which to schedule the processor. The format of the value will depend on th value of schedulingStrategy.") @Schema(description = "The frequency with which to schedule the processor. The format of the value will depend on th value of schedulingStrategy.")
public String getSchedulingPeriod() { public String getSchedulingPeriod() {
return schedulingPeriod; return schedulingPeriod;
} }
@ -52,7 +52,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.schedulingPeriod = setSchedulingPeriod; this.schedulingPeriod = setSchedulingPeriod;
} }
@ApiModelProperty("Indicates how the processor should be scheduled to run.") @Schema(description = "Indicates how the processor should be scheduled to run.")
public String getSchedulingStrategy() { public String getSchedulingStrategy() {
return schedulingStrategy; return schedulingStrategy;
} }
@ -61,7 +61,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.schedulingStrategy = schedulingStrategy; this.schedulingStrategy = schedulingStrategy;
} }
@ApiModelProperty("Indicates the node where the process will execute.") @Schema(description = "Indicates the node where the process will execute.")
public String getExecutionNode() { public String getExecutionNode() {
return executionNode; return executionNode;
} }
@ -70,7 +70,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.executionNode = executionNode; this.executionNode = executionNode;
} }
@ApiModelProperty("The amout of time that is used when the process penalizes a flowfile.") @Schema(description = "The amout of time that is used when the process penalizes a flowfile.")
public String getPenaltyDuration() { public String getPenaltyDuration() {
return penaltyDuration; return penaltyDuration;
} }
@ -79,7 +79,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.penaltyDuration = penaltyDuration; this.penaltyDuration = penaltyDuration;
} }
@ApiModelProperty("The amount of time that must elapse before this processor is scheduled again after yielding.") @Schema(description = "The amount of time that must elapse before this processor is scheduled again after yielding.")
public String getYieldDuration() { public String getYieldDuration() {
return yieldDuration; return yieldDuration;
} }
@ -88,7 +88,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.yieldDuration = yieldDuration; this.yieldDuration = yieldDuration;
} }
@ApiModelProperty("The level at which the processor will report bulletins.") @Schema(description = "The level at which the processor will report bulletins.")
public String getBulletinLevel() { public String getBulletinLevel() {
return bulletinLevel; return bulletinLevel;
} }
@ -97,7 +97,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.bulletinLevel = bulletinLevel; this.bulletinLevel = bulletinLevel;
} }
@ApiModelProperty("The number of tasks that should be concurrently schedule for the processor. If the processor doesn't allow parallol processing then any positive input will be ignored.") @Schema(description = "The number of tasks that should be concurrently schedule for the processor. If the processor doesn't allow parallol processing then any positive input will be ignored.")
public Integer getConcurrentlySchedulableTaskCount() { public Integer getConcurrentlySchedulableTaskCount() {
return concurrentlySchedulableTaskCount; return concurrentlySchedulableTaskCount;
} }
@ -106,7 +106,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount; this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount;
} }
@ApiModelProperty("The annotation data for the processor used to relay configuration between a custom UI and the procesosr.") @Schema(description = "The annotation data for the processor used to relay configuration between a custom UI and the procesosr.")
public String getAnnotationData() { public String getAnnotationData() {
return annotationData; return annotationData;
} }
@ -116,7 +116,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
} }
@ApiModelProperty("The names of all relationships that cause a flow file to be terminated if the relationship is not connected elsewhere. This property differs " @Schema(description = "The names of all relationships that cause a flow file to be terminated if the relationship is not connected elsewhere. This property differs "
+ "from the 'isAutoTerminate' property of the RelationshipDTO in that the RelationshipDTO is meant to depict the current configuration, whereas this " + "from the 'isAutoTerminate' property of the RelationshipDTO in that the RelationshipDTO is meant to depict the current configuration, whereas this "
+ "property can be set in a DTO when updating a Processor in order to change which Relationships should be auto-terminated.") + "property can be set in a DTO when updating a Processor in order to change which Relationships should be auto-terminated.")
public Set<String> getAutoTerminatedRelationships() { public Set<String> getAutoTerminatedRelationships() {
@ -127,7 +127,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.autoTerminatedRelationships = autoTerminatedRelationships; this.autoTerminatedRelationships = autoTerminatedRelationships;
} }
@ApiModelProperty("The run duration for the processor in milliseconds.") @Schema(description = "The run duration for the processor in milliseconds.")
public Long getRunDurationMillis() { public Long getRunDurationMillis() {
return runDurationMillis; return runDurationMillis;
} }
@ -136,7 +136,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.runDurationMillis = runDurationMillis; this.runDurationMillis = runDurationMillis;
} }
@ApiModelProperty("Stylistic data for rendering in a UI") @Schema(description = "Stylistic data for rendering in a UI")
public Map<String, String> getStyle() { public Map<String, String> getStyle() {
return style; return style;
} }
@ -145,7 +145,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.style = style; this.style = style;
} }
@ApiModelProperty("The scheduled state of the component") @Schema(description = "The scheduled state of the component")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }
@ -159,9 +159,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
return ComponentType.PROCESSOR; return ComponentType.PROCESSOR;
} }
@ApiModelProperty( @Schema(description = "Overall number of retries.")
value = "Overall number of retries."
)
public Integer getRetryCount() { public Integer getRetryCount() {
return retryCount; return retryCount;
} }
@ -170,9 +168,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.retryCount = retryCount; this.retryCount = retryCount;
} }
@ApiModelProperty( @Schema(description = "All the relationships should be retried.")
value = "All the relationships should be retried."
)
public Set<String> getRetriedRelationships() { public Set<String> getRetriedRelationships() {
return retriedRelationships; return retriedRelationships;
} }
@ -181,8 +177,8 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.retriedRelationships = retriedRelationships; this.retriedRelationships = retriedRelationships;
} }
@ApiModelProperty( @Schema(
value = "Determines whether the FlowFile should be penalized or the processor should be yielded between retries.", 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() { public String getBackoffMechanism() {
@ -193,9 +189,7 @@ public class VersionedProcessor extends VersionedConfigurableExtension {
this.backoffMechanism = backoffMechanism; this.backoffMechanism = backoffMechanism;
} }
@ApiModelProperty( @Schema(description = "Maximum amount of time to be waited during a retry period.")
value = "Maximum amount of time to be waited during a retry period."
)
public String getMaxBackoffPeriod() { public String getMaxBackoffPeriod() {
return maxBackoffPeriod; return maxBackoffPeriod;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class VersionedPropertyDescriptor { public class VersionedPropertyDescriptor {
private String name; private String name;
@ -27,7 +27,7 @@ public class VersionedPropertyDescriptor {
private boolean dynamic; private boolean dynamic;
private VersionedResourceDefinition resourceDefinition; private VersionedResourceDefinition resourceDefinition;
@ApiModelProperty("The name of the property") @Schema(description = "The name of the property")
public String getName() { public String getName() {
return name; return name;
} }
@ -36,7 +36,7 @@ public class VersionedPropertyDescriptor {
this.name = name; this.name = name;
} }
@ApiModelProperty("The display name of the property") @Schema(description = "The display name of the property")
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@ -45,7 +45,7 @@ public class VersionedPropertyDescriptor {
this.displayName = displayName; this.displayName = displayName;
} }
@ApiModelProperty("Whether or not the property provides the identifier of a Controller Service") @Schema(description = "Whether or not the property provides the identifier of a Controller Service")
public boolean getIdentifiesControllerService() { public boolean getIdentifiesControllerService() {
return identifiesControllerService; return identifiesControllerService;
} }
@ -54,7 +54,7 @@ public class VersionedPropertyDescriptor {
this.identifiesControllerService = identifiesControllerService; this.identifiesControllerService = identifiesControllerService;
} }
@ApiModelProperty("Whether or not the property is considered sensitive") @Schema(description = "Whether or not the property is considered sensitive")
public boolean isSensitive() { public boolean isSensitive() {
return sensitive; return sensitive;
} }
@ -63,7 +63,7 @@ public class VersionedPropertyDescriptor {
this.sensitive = sensitive; this.sensitive = sensitive;
} }
@ApiModelProperty("Whether or not the property is user-defined") @Schema(description = "Whether or not the property is user-defined")
public boolean isDynamic() { public boolean isDynamic() {
return dynamic; return dynamic;
} }
@ -72,7 +72,7 @@ public class VersionedPropertyDescriptor {
this.dynamic = dynamic; this.dynamic = dynamic;
} }
@ApiModelProperty("Returns the Resource Definition that defines which type(s) of resource(s) this property references, if any") @Schema(description = "Returns the Resource Definition that defines which type(s) of resource(s) this property references, if any")
public VersionedResourceDefinition getResourceDefinition() { public VersionedResourceDefinition getResourceDefinition() {
return resourceDefinition; return resourceDefinition;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects; import java.util.Objects;
@ -30,7 +30,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
private String targetId; private String targetId;
private ScheduledState scheduledState; private ScheduledState scheduledState;
@ApiModelProperty("The number of task that may transmit flowfiles to the target port concurrently.") @Schema(description = "The number of task that may transmit flowfiles to the target port concurrently.")
public Integer getConcurrentlySchedulableTaskCount() { public Integer getConcurrentlySchedulableTaskCount() {
return concurrentlySchedulableTaskCount; return concurrentlySchedulableTaskCount;
} }
@ -39,7 +39,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount; this.concurrentlySchedulableTaskCount = concurrentlySchedulableTaskCount;
} }
@ApiModelProperty("The id of the remote process group that the port resides in.") @Schema(description = "The id of the remote process group that the port resides in.")
public String getRemoteGroupId() { public String getRemoteGroupId() {
return remoteGroupId; return remoteGroupId;
} }
@ -49,7 +49,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
} }
@ApiModelProperty("Whether the flowfiles are compressed when sent to the target port.") @Schema(description = "Whether the flowfiles are compressed when sent to the target port.")
public Boolean isUseCompression() { public Boolean isUseCompression() {
return useCompression; return useCompression;
} }
@ -58,7 +58,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
this.useCompression = useCompression; this.useCompression = useCompression;
} }
@ApiModelProperty("The batch settings for data transmission.") @Schema(description = "The batch settings for data transmission.")
public BatchSize getBatchSize() { public BatchSize getBatchSize() {
return batchSize; return batchSize;
} }
@ -67,7 +67,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
this.batchSize = batchSize; this.batchSize = batchSize;
} }
@ApiModelProperty("The ID of the port on the target NiFi instance") @Schema(description = "The ID of the port on the target NiFi instance")
public String getTargetId() { public String getTargetId() {
return targetId; return targetId;
} }
@ -76,7 +76,7 @@ public class VersionedRemoteGroupPort extends VersionedComponent {
this.targetId = targetId; this.targetId = targetId;
} }
@ApiModelProperty("The scheduled state of the component") @Schema(description = "The scheduled state of the component")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set; import java.util.Set;
@ -36,11 +36,9 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
private Set<VersionedRemoteGroupPort> inputPorts; private Set<VersionedRemoteGroupPort> inputPorts;
private Set<VersionedRemoteGroupPort> outputPorts; private Set<VersionedRemoteGroupPort> outputPorts;
@Schema(description = "The target URIs of the remote process group. " +
@ApiModelProperty( "If target uris is not set but target uri is set, then returns the single target uri. " +
value = "The target URIs of the remote process group." + "If neither target uris nor target uri is set, then returns null.")
" If target uris is not set but target uri is set, then returns the single target uri." +
" If neither target uris nor target uri is set, then returns null.")
public String getTargetUris() { public String getTargetUris() {
return !isEmpty(targetUris) ? targetUris : null; return !isEmpty(targetUris) ? targetUris : null;
@ -54,7 +52,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
this.targetUris = targetUris; this.targetUris = targetUris;
} }
@ApiModelProperty("The time period used for the timeout when communicating with the target.") @Schema(description = "The time period used for the timeout when communicating with the target.")
public String getCommunicationsTimeout() { public String getCommunicationsTimeout() {
return communicationsTimeout; return communicationsTimeout;
} }
@ -63,7 +61,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
this.communicationsTimeout = communicationsTimeout; this.communicationsTimeout = communicationsTimeout;
} }
@ApiModelProperty("When yielding, this amount of time must elapse before the remote process group is scheduled again.") @Schema(description = "When yielding, this amount of time must elapse before the remote process group is scheduled again.")
public String getYieldDuration() { public String getYieldDuration() {
return yieldDuration; return yieldDuration;
} }
@ -72,7 +70,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
this.yieldDuration = yieldDuration; this.yieldDuration = yieldDuration;
} }
@ApiModelProperty(value = "The Transport Protocol that is used for Site-to-Site communications", allowableValues = "RAW, HTTP") @Schema(description = "The Transport Protocol that is used for Site-to-Site communications", allowableValues = "RAW, HTTP")
public String getTransportProtocol() { public String getTransportProtocol() {
return transportProtocol; return transportProtocol;
} }
@ -81,7 +79,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
this.transportProtocol = transportProtocol; this.transportProtocol = transportProtocol;
} }
@ApiModelProperty("A Set of Input Ports that can be connected to, in order to send data to the remote NiFi instance") @Schema(description = "A Set of Input Ports that can be connected to, in order to send data to the remote NiFi instance")
public Set<VersionedRemoteGroupPort> getInputPorts() { public Set<VersionedRemoteGroupPort> getInputPorts() {
return inputPorts; return inputPorts;
} }
@ -90,7 +88,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
this.inputPorts = inputPorts; this.inputPorts = inputPorts;
} }
@ApiModelProperty("A Set of Output Ports that can be connected to, in order to pull data from the remote NiFi instance") @Schema(description = "A Set of Output Ports that can be connected to, in order to pull data from the remote NiFi instance")
public Set<VersionedRemoteGroupPort> getOutputPorts() { public Set<VersionedRemoteGroupPort> getOutputPorts() {
return outputPorts; return outputPorts;
} }
@ -100,7 +98,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
} }
@ApiModelProperty("The local network interface to send/receive data. If not specified, any local address is used. If clustered, all nodes must have an interface with this identifier.") @Schema(description = "The local network interface to send/receive data. If not specified, any local address is used. If clustered, all nodes must have an interface with this identifier.")
public String getLocalNetworkInterface() { public String getLocalNetworkInterface() {
return localNetworkInterface; return localNetworkInterface;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
public class VersionedReportingTask extends VersionedConfigurableExtension { public class VersionedReportingTask extends VersionedConfigurableExtension {
@ -26,7 +26,7 @@ public class VersionedReportingTask extends VersionedConfigurableExtension {
private String schedulingPeriod; private String schedulingPeriod;
private String schedulingStrategy; private String schedulingStrategy;
@ApiModelProperty(value = "The annotation for the reporting task. This is how the custom UI relays configuration to the reporting task.") @Schema(description = "The annotation for the reporting task. This is how the custom UI relays configuration to the reporting task.")
public String getAnnotationData() { public String getAnnotationData() {
return annotationData; return annotationData;
} }
@ -35,7 +35,7 @@ public class VersionedReportingTask extends VersionedConfigurableExtension {
this.annotationData = annotationData; this.annotationData = annotationData;
} }
@ApiModelProperty("The frequency with which to schedule the reporting task. The format of the value will depend on the value of schedulingStrategy.") @Schema(description = "The frequency with which to schedule the reporting task. The format of the value will depend on the value of schedulingStrategy.")
public String getSchedulingPeriod() { public String getSchedulingPeriod() {
return schedulingPeriod; return schedulingPeriod;
} }
@ -44,7 +44,7 @@ public class VersionedReportingTask extends VersionedConfigurableExtension {
this.schedulingPeriod = setSchedulingPeriod; this.schedulingPeriod = setSchedulingPeriod;
} }
@ApiModelProperty("Indicates scheduling strategy that should dictate how the reporting task is triggered.") @Schema(description = "Indicates scheduling strategy that should dictate how the reporting task is triggered.")
public String getSchedulingStrategy() { public String getSchedulingStrategy() {
return schedulingStrategy; return schedulingStrategy;
} }
@ -58,7 +58,7 @@ public class VersionedReportingTask extends VersionedConfigurableExtension {
return ComponentType.REPORTING_TASK; return ComponentType.REPORTING_TASK;
} }
@ApiModelProperty("Indicates the scheduled state for the Reporting Task") @Schema(description = "Indicates the scheduled state for the Reporting Task")
public ScheduledState getScheduledState() { public ScheduledState getScheduledState() {
return scheduledState; return scheduledState;
} }

View File

@ -16,18 +16,17 @@
*/ */
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import java.util.List; import java.util.List;
@ApiModel @Schema
public class VersionedReportingTaskSnapshot { public class VersionedReportingTaskSnapshot {
private List<VersionedReportingTask> reportingTasks; private List<VersionedReportingTask> reportingTasks;
private List<VersionedControllerService> controllerServices; private List<VersionedControllerService> controllerServices;
@ApiModelProperty(value = "The controller services") @Schema(description = "The controller services")
public List<VersionedControllerService> getControllerServices() { public List<VersionedControllerService> getControllerServices() {
return controllerServices; return controllerServices;
} }
@ -36,7 +35,7 @@ public class VersionedReportingTaskSnapshot {
this.controllerServices = controllerServices; this.controllerServices = controllerServices;
} }
@ApiModelProperty(value = "The reporting tasks") @Schema(description = "The reporting tasks")
public List<VersionedReportingTask> getReportingTasks() { public List<VersionedReportingTask> getReportingTasks() {
return reportingTasks; return reportingTasks;
} }

View File

@ -17,7 +17,7 @@
package org.apache.nifi.flow; package org.apache.nifi.flow;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set; import java.util.Set;
@ -25,7 +25,7 @@ public class VersionedResourceDefinition {
private VersionedResourceCardinality cardinality; private VersionedResourceCardinality cardinality;
private Set<VersionedResourceType> resourceTypes; private Set<VersionedResourceType> resourceTypes;
@ApiModelProperty("The cardinality of the resource") @Schema(description = "The cardinality of the resource")
public VersionedResourceCardinality getCardinality() { public VersionedResourceCardinality getCardinality() {
return cardinality; return cardinality;
} }
@ -34,7 +34,7 @@ public class VersionedResourceDefinition {
this.cardinality = cardinality; this.cardinality = cardinality;
} }
@ApiModelProperty("The types of resource that the Property Descriptor is allowed to reference") @Schema(description = "The types of resource that the Property Descriptor is allowed to reference")
public Set<VersionedResourceType> getResourceTypes() { public Set<VersionedResourceType> getResourceTypes() {
return resourceTypes; return resourceTypes;
} }

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-commons</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>nifi-swagger-integration</artifactId>
<packaging>jar</packaging>
<dependencies>
<!-- Swagger Integration required for Object Mapper Processor -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-integration-jakarta</artifactId>
<version>${swagger.annotations.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,33 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.swagger.integration;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import io.swagger.v3.oas.integration.api.ObjectMapperProcessor;
/**
* Standard Jackson Object Mapper Processor for customizing OpenAPI Specification generation
*/
public class StandardObjectMapperProcessor implements ObjectMapperProcessor {
@Override
public void processJsonObjectMapper(final ObjectMapper mapper) {
// Write enums using name() instead of toString()
mapper.disable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
}
}

View File

@ -68,6 +68,7 @@
<module>nifi-single-user-utils</module> <module>nifi-single-user-utils</module>
<module>nifi-site-to-site-client</module> <module>nifi-site-to-site-client</module>
<module>nifi-socket-utils</module> <module>nifi-socket-utils</module>
<module>nifi-swagger-integration</module>
<module>nifi-utils</module> <module>nifi-utils</module>
<module>nifi-uuid5</module> <module>nifi-uuid5</module>
<module>nifi-hashicorp-vault</module> <module>nifi-hashicorp-vault</module>

View File

@ -25,7 +25,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -16,13 +16,13 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class AllowableValue { public class AllowableValue {
@ -30,7 +30,7 @@ public class AllowableValue {
private String displayName; private String displayName;
private String description; private String description;
@ApiModelProperty(value = "The value of the allowable value") @Schema(description = "The value of the allowable value")
public String getValue() { public String getValue() {
return value; return value;
} }
@ -39,7 +39,7 @@ public class AllowableValue {
this.value = value; this.value = value;
} }
@ApiModelProperty(value = "The display name of the allowable value") @Schema(description = "The display name of the allowable value")
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@ -48,7 +48,7 @@ public class AllowableValue {
this.displayName = displayName; this.displayName = displayName;
} }
@ApiModelProperty(value = "The description of the allowable value") @Schema(description = "The description of the allowable value")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -16,20 +16,18 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Attribute { public class Attribute {
private String name; private String name;
private String description; private String description;
@ApiModelProperty(value = "The name of the attribute") @Schema(description = "The name of the attribute")
public String getName() { public String getName() {
return name; return name;
} }
@ -38,7 +36,7 @@ public class Attribute {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the attribute") @Schema(description = "The description of the attribute")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class BuildInfo { public class BuildInfo {
@ -33,7 +31,7 @@ public class BuildInfo {
private String builtBy; private String builtBy;
private String timestamp; private String timestamp;
@ApiModelProperty(value = "The tag the NAR was built from") @Schema(description = "The tag the NAR was built from")
public String getTag() { public String getTag() {
return tag; return tag;
} }
@ -42,7 +40,7 @@ public class BuildInfo {
this.tag = tag; this.tag = tag;
} }
@ApiModelProperty(value = "The branch the NAR was built from") @Schema(description = "The branch the NAR was built from")
public String getBranch() { public String getBranch() {
return branch; return branch;
} }
@ -51,7 +49,7 @@ public class BuildInfo {
this.branch = branch; this.branch = branch;
} }
@ApiModelProperty(value = "The revision the NAR was built from") @Schema(description = "The revision the NAR was built from")
public String getRevision() { public String getRevision() {
return revision; return revision;
} }
@ -60,7 +58,7 @@ public class BuildInfo {
this.revision = revision; this.revision = revision;
} }
@ApiModelProperty(value = "The JDK the NAR was built with") @Schema(description = "The JDK the NAR was built with")
public String getJdk() { public String getJdk() {
return jdk; return jdk;
} }
@ -69,7 +67,7 @@ public class BuildInfo {
this.jdk = jdk; this.jdk = jdk;
} }
@ApiModelProperty(value = "The OS user that performed the build") @Schema(description = "The OS user that performed the build")
public String getBuiltBy() { public String getBuiltBy() {
return builtBy; return builtBy;
} }
@ -78,7 +76,7 @@ public class BuildInfo {
this.builtBy = builtBy; this.builtBy = builtBy;
} }
@ApiModelProperty(value = "The timestamp of the build") @Schema(description = "The timestamp of the build")
public String getTimestamp() { public String getTimestamp() {
return timestamp; return timestamp;
} }

View File

@ -16,9 +16,6 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
@ApiModel
public enum Cardinality { public enum Cardinality {
/** /**

View File

@ -16,14 +16,12 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
import java.util.Objects; import java.util.Objects;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class ControllerServiceDefinition { public class ControllerServiceDefinition {
@ -32,7 +30,7 @@ public class ControllerServiceDefinition {
private String artifactId; private String artifactId;
private String version; private String version;
@ApiModelProperty(value = "The class name of the service API") @Schema(description = "The class name of the service API")
public String getClassName() { public String getClassName() {
return className; return className;
} }
@ -41,7 +39,7 @@ public class ControllerServiceDefinition {
this.className = className; this.className = className;
} }
@ApiModelProperty(value = "The group id of the service API") @Schema(description = "The group id of the service API")
public String getGroupId() { public String getGroupId() {
return groupId; return groupId;
} }
@ -50,7 +48,7 @@ public class ControllerServiceDefinition {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty(value = "The artifact id of the service API") @Schema(description = "The artifact id of the service API")
public String getArtifactId() { public String getArtifactId() {
return artifactId; return artifactId;
} }
@ -59,7 +57,7 @@ public class ControllerServiceDefinition {
this.artifactId = artifactId; this.artifactId = artifactId;
} }
@ApiModelProperty(value = "The version of the service API") @Schema(description = "The version of the service API")
public String getVersion() { public String getVersion() {
return version; return version;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DefaultSchedule { public class DefaultSchedule {
@ -30,7 +28,7 @@ public class DefaultSchedule {
private String period; private String period;
private String concurrentTasks; private String concurrentTasks;
@ApiModelProperty("The default scheduling strategy") @Schema(description = "The default scheduling strategy")
public String getStrategy() { public String getStrategy() {
return strategy; return strategy;
} }
@ -39,7 +37,7 @@ public class DefaultSchedule {
this.strategy = strategy; this.strategy = strategy;
} }
@ApiModelProperty("The default scheduling period") @Schema(description = "The default scheduling period")
public String getPeriod() { public String getPeriod() {
return period; return period;
} }
@ -48,7 +46,7 @@ public class DefaultSchedule {
this.period = period; this.period = period;
} }
@ApiModelProperty("The default concurrent tasks") @Schema(description = "The default concurrent tasks")
public String getConcurrentTasks() { public String getConcurrentTasks() {
return concurrentTasks; return concurrentTasks;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DefaultSettings { public class DefaultSettings {
@ -30,7 +28,7 @@ public class DefaultSettings {
private String penaltyDuration; private String penaltyDuration;
private String bulletinLevel; private String bulletinLevel;
@ApiModelProperty("The default yield duration") @Schema(description = "The default yield duration")
public String getYieldDuration() { public String getYieldDuration() {
return yieldDuration; return yieldDuration;
} }
@ -39,7 +37,7 @@ public class DefaultSettings {
this.yieldDuration = yieldDuration; this.yieldDuration = yieldDuration;
} }
@ApiModelProperty("The default penalty duration") @Schema(description = "The default penalty duration")
public String getPenaltyDuration() { public String getPenaltyDuration() {
return penaltyDuration; return penaltyDuration;
} }
@ -48,7 +46,7 @@ public class DefaultSettings {
this.penaltyDuration = penaltyDuration; this.penaltyDuration = penaltyDuration;
} }
@ApiModelProperty("The default bulletin level") @Schema(description = "The default bulletin level")
public String getBulletinLevel() { public String getBulletinLevel() {
return bulletinLevel; return bulletinLevel;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Dependency { public class Dependency {
@ -30,7 +28,7 @@ public class Dependency {
private String propertyDisplayName; private String propertyDisplayName;
private DependentValues dependentValues; private DependentValues dependentValues;
@ApiModelProperty(value = "The name of the dependent property") @Schema(description = "The name of the dependent property")
public String getPropertyName() { public String getPropertyName() {
return propertyName; return propertyName;
} }
@ -39,7 +37,7 @@ public class Dependency {
this.propertyName = propertyName; this.propertyName = propertyName;
} }
@ApiModelProperty(value = "The display name of the dependent property") @Schema(description = "The display name of the dependent property")
public String getPropertyDisplayName() { public String getPropertyDisplayName() {
return propertyDisplayName; return propertyDisplayName;
} }
@ -48,7 +46,7 @@ public class Dependency {
this.propertyDisplayName = propertyDisplayName; this.propertyDisplayName = propertyDisplayName;
} }
@ApiModelProperty(value = "The values of the dependent property that enable the depending property") @Schema(description = "The values of the dependent property that enable the depending property")
public DependentValues getDependentValues() { public DependentValues getDependentValues() {
return dependentValues; return dependentValues;
} }

View File

@ -16,22 +16,20 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlElement;
import java.util.List; import java.util.List;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DependentValues { public class DependentValues {
@XmlElement(name = "dependentValue") @XmlElement(name = "dependentValue")
private List<String> values; private List<String> values;
@ApiModelProperty(value = "The dependent values") @Schema(description = "The dependent values")
public List<String> getValues() { public List<String> getValues() {
return values; return values;
} }

View File

@ -16,8 +16,7 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ -25,7 +24,6 @@ import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper; import jakarta.xml.bind.annotation.XmlElementWrapper;
import java.util.List; import java.util.List;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DeprecationNotice { public class DeprecationNotice {
@ -35,7 +33,7 @@ public class DeprecationNotice {
@XmlElement(name = "alternative") @XmlElement(name = "alternative")
private List<String> alternatives; private List<String> alternatives;
@ApiModelProperty(value = "The reason for the deprecation") @Schema(description = "The reason for the deprecation")
public String getReason() { public String getReason() {
return reason; return reason;
} }
@ -44,7 +42,7 @@ public class DeprecationNotice {
this.reason = reason; this.reason = reason;
} }
@ApiModelProperty(value = "The alternatives to use") @Schema(description = "The alternatives to use")
public List<String> getAlternatives() { public List<String> getAlternatives() {
return alternatives; return alternatives;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DynamicProperty { public class DynamicProperty {
@ -32,7 +30,7 @@ public class DynamicProperty {
private ExpressionLanguageScope expressionLanguageScope; private ExpressionLanguageScope expressionLanguageScope;
private boolean expressionLanguageSupported; private boolean expressionLanguageSupported;
@ApiModelProperty(value = "The description of the dynamic property name") @Schema(description = "The description of the dynamic property name")
public String getName() { public String getName() {
return name; return name;
} }
@ -41,7 +39,7 @@ public class DynamicProperty {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the dynamic property value") @Schema(description = "The description of the dynamic property value")
public String getValue() { public String getValue() {
return value; return value;
} }
@ -50,7 +48,7 @@ public class DynamicProperty {
this.value = value; this.value = value;
} }
@ApiModelProperty(value = "The description of the dynamic property") @Schema(description = "The description of the dynamic property")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -59,7 +57,7 @@ public class DynamicProperty {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "Whether or not expression language is supported") @Schema(description = "Whether or not expression language is supported")
public boolean isExpressionLanguageSupported() { public boolean isExpressionLanguageSupported() {
return expressionLanguageSupported; return expressionLanguageSupported;
} }
@ -68,7 +66,7 @@ public class DynamicProperty {
this.expressionLanguageSupported = expressionLanguageSupported; this.expressionLanguageSupported = expressionLanguageSupported;
} }
@ApiModelProperty(value = "The scope of the expression language support") @Schema(description = "The scope of the expression language support")
public ExpressionLanguageScope getExpressionLanguageScope() { public ExpressionLanguageScope getExpressionLanguageScope() {
return expressionLanguageScope; return expressionLanguageScope;
} }

View File

@ -16,20 +16,20 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class DynamicRelationship { public class DynamicRelationship {
private String name; private String name;
private String description; private String description;
@ApiModelProperty(value = "The description of the dynamic relationship name") @Schema(description = "The description of the dynamic relationship name")
public String getName() { public String getName() {
return name; return name;
} }
@ -38,7 +38,7 @@ public class DynamicRelationship {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the dynamic relationship") @Schema(description = "The description of the dynamic relationship")
public String getDescription() { public String getDescription() {
return description; return description;
} }

View File

@ -16,9 +16,6 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
@ApiModel
public enum ExpressionLanguageScope { public enum ExpressionLanguageScope {
/** /**

View File

@ -16,8 +16,7 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid; import javax.validation.Valid;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
@ -27,7 +26,6 @@ import jakarta.xml.bind.annotation.XmlElementWrapper;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Extension { public class Extension {
@ -109,7 +107,7 @@ public class Extension {
@XmlElement(name = "multiProcessorUseCase") @XmlElement(name = "multiProcessorUseCase")
private List<MultiProcessorUseCase> multiProcessorUseCases; private List<MultiProcessorUseCase> multiProcessorUseCases;
@ApiModelProperty(value = "The name of the extension") @Schema(description = "The name of the extension")
public String getName() { public String getName() {
return name; return name;
} }
@ -118,7 +116,7 @@ public class Extension {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The type of the extension") @Schema(description = "The type of the extension")
public ExtensionType getType() { public ExtensionType getType() {
return type; return type;
} }
@ -127,7 +125,7 @@ public class Extension {
this.type = type; this.type = type;
} }
@ApiModelProperty(value = "The deprecation notice of the extension") @Schema(description = "The deprecation notice of the extension")
public DeprecationNotice getDeprecationNotice() { public DeprecationNotice getDeprecationNotice() {
return deprecationNotice; return deprecationNotice;
} }
@ -136,7 +134,7 @@ public class Extension {
this.deprecationNotice = deprecationNotice; this.deprecationNotice = deprecationNotice;
} }
@ApiModelProperty(value = "The description of the extension") @Schema(description = "The description of the extension")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -145,7 +143,7 @@ public class Extension {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "The tags of the extension") @Schema(description = "The tags of the extension")
public List<String> getTags() { public List<String> getTags() {
return tags; return tags;
} }
@ -154,7 +152,7 @@ public class Extension {
this.tags = tags; this.tags = tags;
} }
@ApiModelProperty(value = "The properties of the extension") @Schema(description = "The properties of the extension")
public List<Property> getProperties() { public List<Property> getProperties() {
return properties; return properties;
} }
@ -171,7 +169,7 @@ public class Extension {
this.supportsSensitiveDynamicProperties = supportsSensitiveDynamicProperties; this.supportsSensitiveDynamicProperties = supportsSensitiveDynamicProperties;
} }
@ApiModelProperty(value = "The dynamic properties of the extension") @Schema(description = "The dynamic properties of the extension")
public List<DynamicProperty> getDynamicProperties() { public List<DynamicProperty> getDynamicProperties() {
return dynamicProperties; return dynamicProperties;
} }
@ -180,7 +178,7 @@ public class Extension {
this.dynamicProperties = dynamicProperties; this.dynamicProperties = dynamicProperties;
} }
@ApiModelProperty(value = "The relationships of the extension") @Schema(description = "The relationships of the extension")
public List<Relationship> getRelationships() { public List<Relationship> getRelationships() {
return relationships; return relationships;
} }
@ -189,7 +187,7 @@ public class Extension {
this.relationships = relationships; this.relationships = relationships;
} }
@ApiModelProperty(value = "The dynamic relationships of the extension") @Schema(description = "The dynamic relationships of the extension")
public DynamicRelationship getDynamicRelationship() { public DynamicRelationship getDynamicRelationship() {
return dynamicRelationship; return dynamicRelationship;
} }
@ -198,7 +196,7 @@ public class Extension {
this.dynamicRelationship = dynamicRelationship; this.dynamicRelationship = dynamicRelationship;
} }
@ApiModelProperty(value = "The attributes read from flow files by the extension") @Schema(description = "The attributes read from flow files by the extension")
public List<Attribute> getReadsAttributes() { public List<Attribute> getReadsAttributes() {
return readsAttributes; return readsAttributes;
} }
@ -207,7 +205,7 @@ public class Extension {
this.readsAttributes = readsAttributes; this.readsAttributes = readsAttributes;
} }
@ApiModelProperty(value = "The attributes written to flow files by the extension") @Schema(description = "The attributes written to flow files by the extension")
public List<Attribute> getWritesAttributes() { public List<Attribute> getWritesAttributes() {
return writesAttributes; return writesAttributes;
} }
@ -216,7 +214,7 @@ public class Extension {
this.writesAttributes = writesAttributes; this.writesAttributes = writesAttributes;
} }
@ApiModelProperty(value = "The information about how the extension stores state") @Schema(description = "The information about how the extension stores state")
public Stateful getStateful() { public Stateful getStateful() {
return stateful; return stateful;
} }
@ -225,7 +223,7 @@ public class Extension {
this.stateful = stateful; this.stateful = stateful;
} }
@ApiModelProperty(value = "The restrictions of the extension") @Schema(description = "The restrictions of the extension")
public Restricted getRestricted() { public Restricted getRestricted() {
return restricted; return restricted;
} }
@ -234,7 +232,7 @@ public class Extension {
this.restricted = restricted; this.restricted = restricted;
} }
@ApiModelProperty(value = "The input requirement of the extension") @Schema(description = "The input requirement of the extension")
public InputRequirement getInputRequirement() { public InputRequirement getInputRequirement() {
return inputRequirement; return inputRequirement;
} }
@ -243,7 +241,7 @@ public class Extension {
this.inputRequirement = inputRequirement; this.inputRequirement = inputRequirement;
} }
@ApiModelProperty(value = "The resource considerations of the extension") @Schema(description = "The resource considerations of the extension")
public List<SystemResourceConsideration> getSystemResourceConsiderations() { public List<SystemResourceConsideration> getSystemResourceConsiderations() {
return systemResourceConsiderations; return systemResourceConsiderations;
} }
@ -252,7 +250,7 @@ public class Extension {
this.systemResourceConsiderations = systemResourceConsiderations; this.systemResourceConsiderations = systemResourceConsiderations;
} }
@ApiModelProperty(value = "The names of other extensions to see") @Schema(description = "The names of other extensions to see")
public List<String> getSeeAlso() { public List<String> getSeeAlso() {
return seeAlso; return seeAlso;
} }
@ -261,7 +259,7 @@ public class Extension {
this.seeAlso = seeAlso; this.seeAlso = seeAlso;
} }
@ApiModelProperty(value = "The service APIs provided by this extension") @Schema(description = "The service APIs provided by this extension")
public List<ProvidedServiceAPI> getProvidedServiceAPIs() { public List<ProvidedServiceAPI> getProvidedServiceAPIs() {
return providedServiceAPIs; return providedServiceAPIs;
} }
@ -270,7 +268,7 @@ public class Extension {
this.providedServiceAPIs = providedServiceAPIs; this.providedServiceAPIs = providedServiceAPIs;
} }
@ApiModelProperty(value = "The default settings for a processor") @Schema(description = "The default settings for a processor")
public DefaultSettings getDefaultSettings() { public DefaultSettings getDefaultSettings() {
return defaultSettings; return defaultSettings;
} }
@ -279,7 +277,7 @@ public class Extension {
this.defaultSettings = defaultSettings; this.defaultSettings = defaultSettings;
} }
@ApiModelProperty(value = "The default schedule for a processor reporting task") @Schema(description = "The default schedule for a processor reporting task")
public DefaultSchedule getDefaultSchedule() { public DefaultSchedule getDefaultSchedule() {
return defaultSchedule; return defaultSchedule;
} }
@ -288,7 +286,7 @@ public class Extension {
this.defaultSchedule = defaultSchedule; this.defaultSchedule = defaultSchedule;
} }
@ApiModelProperty(value = "Indicates that a processor should be triggered serially") @Schema(description = "Indicates that a processor should be triggered serially")
public boolean getTriggerSerially() { public boolean getTriggerSerially() {
return triggerSerially; return triggerSerially;
} }
@ -297,7 +295,7 @@ public class Extension {
this.triggerSerially = triggerSerially; this.triggerSerially = triggerSerially;
} }
@ApiModelProperty(value = "Indicates that a processor should be triggered when the incoming queues are empty") @Schema(description = "Indicates that a processor should be triggered when the incoming queues are empty")
public boolean getTriggerWhenEmpty() { public boolean getTriggerWhenEmpty() {
return triggerWhenEmpty; return triggerWhenEmpty;
} }
@ -306,7 +304,7 @@ public class Extension {
this.triggerWhenEmpty = triggerWhenEmpty; this.triggerWhenEmpty = triggerWhenEmpty;
} }
@ApiModelProperty(value = "Indicates that a processor should be triggered when any destinations have space for flow files") @Schema(description = "Indicates that a processor should be triggered when any destinations have space for flow files")
public boolean getTriggerWhenAnyDestinationAvailable() { public boolean getTriggerWhenAnyDestinationAvailable() {
return triggerWhenAnyDestinationAvailable; return triggerWhenAnyDestinationAvailable;
} }
@ -315,7 +313,7 @@ public class Extension {
this.triggerWhenAnyDestinationAvailable = triggerWhenAnyDestinationAvailable; this.triggerWhenAnyDestinationAvailable = triggerWhenAnyDestinationAvailable;
} }
@ApiModelProperty(value = "Indicates that a processor supports batching") @Schema(description = "Indicates that a processor supports batching")
public boolean getSupportsBatching() { public boolean getSupportsBatching() {
return supportsBatching; return supportsBatching;
} }
@ -324,7 +322,7 @@ public class Extension {
this.supportsBatching = supportsBatching; this.supportsBatching = supportsBatching;
} }
@ApiModelProperty(value = "Indicates that a processor should be scheduled only on the primary node") @Schema(description = "Indicates that a processor should be scheduled only on the primary node")
public boolean getPrimaryNodeOnly() { public boolean getPrimaryNodeOnly() {
return primaryNodeOnly; return primaryNodeOnly;
} }
@ -333,7 +331,7 @@ public class Extension {
this.primaryNodeOnly = primaryNodeOnly; this.primaryNodeOnly = primaryNodeOnly;
} }
@ApiModelProperty(value = "Indicates that a processor is side effect free") @Schema(description = "Indicates that a processor is side effect free")
public boolean getSideEffectFree() { public boolean getSideEffectFree() {
return sideEffectFree; return sideEffectFree;
} }
@ -342,7 +340,7 @@ public class Extension {
this.sideEffectFree = sideEffectFree; this.sideEffectFree = sideEffectFree;
} }
@ApiModelProperty(value = "Zero or more documented use cases for how the extension may be used") @Schema(description = "Zero or more documented use cases for how the extension may be used")
public List<UseCase> getUseCases() { public List<UseCase> getUseCases() {
return useCases; return useCases;
} }
@ -351,7 +349,7 @@ public class Extension {
this.useCases = useCases; this.useCases = useCases;
} }
@ApiModelProperty(value = "Zero or more documented use cases for how the processor may be used in conjunction with other processors") @Schema(description = "Zero or more documented use cases for how the processor may be used in conjunction with other processors")
public List<MultiProcessorUseCase> getMultiProcessorUseCases() { public List<MultiProcessorUseCase> getMultiProcessorUseCases() {
return multiProcessorUseCases; return multiProcessorUseCases;
} }

View File

@ -16,8 +16,7 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ -26,7 +25,6 @@ import jakarta.xml.bind.annotation.XmlElementWrapper;
import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlRootElement;
import java.util.List; import java.util.List;
@ApiModel
@XmlRootElement(name = "extensionManifest") @XmlRootElement(name = "extensionManifest")
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class ExtensionManifest { public class ExtensionManifest {
@ -54,7 +52,7 @@ public class ExtensionManifest {
this.extensions = extensions; this.extensions = extensions;
} }
@ApiModelProperty(value = "The group id of this NAR") @Schema(description = "The group id of this NAR")
public String getGroupId() { public String getGroupId() {
return groupId; return groupId;
} }
@ -63,7 +61,7 @@ public class ExtensionManifest {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty(value = "The artifact id of this NAR") @Schema(description = "The artifact id of this NAR")
public String getArtifactId() { public String getArtifactId() {
return artifactId; return artifactId;
} }
@ -72,7 +70,7 @@ public class ExtensionManifest {
this.artifactId = artifactId; this.artifactId = artifactId;
} }
@ApiModelProperty(value = "The version of this NAR") @Schema(description = "The version of this NAR")
public String getVersion() { public String getVersion() {
return version; return version;
} }
@ -81,7 +79,7 @@ public class ExtensionManifest {
this.version = version; this.version = version;
} }
@ApiModelProperty(value = "The info for the parent NAR of this NAR") @Schema(description = "The info for the parent NAR of this NAR")
public ParentNar getParentNar() { public ParentNar getParentNar() {
return parentNar; return parentNar;
} }
@ -90,7 +88,7 @@ public class ExtensionManifest {
this.parentNar = parentNar; this.parentNar = parentNar;
} }
@ApiModelProperty(value = "The version of nifi-api this NAR was built against") @Schema(description = "The version of nifi-api this NAR was built against")
public String getSystemApiVersion() { public String getSystemApiVersion() {
return systemApiVersion; return systemApiVersion;
} }
@ -99,7 +97,7 @@ public class ExtensionManifest {
this.systemApiVersion = systemApiVersion; this.systemApiVersion = systemApiVersion;
} }
@ApiModelProperty(value = "The build info for the NAR") @Schema(description = "The build info for the NAR")
public BuildInfo getBuildInfo() { public BuildInfo getBuildInfo() {
return buildInfo; return buildInfo;
} }
@ -108,7 +106,7 @@ public class ExtensionManifest {
this.buildInfo = buildInfo; this.buildInfo = buildInfo;
} }
@ApiModelProperty(value = "The list of extensions contained in this NAR") @Schema(description = "The list of extensions contained in this NAR")
public List<Extension> getExtensions() { public List<Extension> getExtensions() {
return extensions; return extensions;
} }

View File

@ -16,9 +16,6 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
@ApiModel
public enum InputRequirement { public enum InputRequirement {
/** /**

View File

@ -17,15 +17,12 @@
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper; import jakarta.xml.bind.annotation.XmlElementWrapper;
import java.util.List; import java.util.List;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class MultiProcessorUseCase { public class MultiProcessorUseCase {
private String description; private String description;

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class ParentNar { public class ParentNar {
@ -30,7 +28,7 @@ public class ParentNar {
private String artifactId; private String artifactId;
private String version; private String version;
@ApiModelProperty(value = "The group id of the parent NAR") @Schema(description = "The group id of the parent NAR")
public String getGroupId() { public String getGroupId() {
return groupId; return groupId;
} }
@ -39,7 +37,7 @@ public class ParentNar {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty(value = "The artifact id of the parent NAR") @Schema(description = "The artifact id of the parent NAR")
public String getArtifactId() { public String getArtifactId() {
return artifactId; return artifactId;
} }
@ -48,7 +46,7 @@ public class ParentNar {
this.artifactId = artifactId; this.artifactId = artifactId;
} }
@ApiModelProperty(value = "The version of the parent NAR") @Schema(description = "The version of the parent NAR")
public String getVersion() { public String getVersion() {
return version; return version;
} }

View File

@ -17,9 +17,6 @@
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel;
@ApiModel
public class ProcessorConfiguration { public class ProcessorConfiguration {
private String processorClassName; private String processorClassName;
private String configuration; private String configuration;

View File

@ -16,8 +16,7 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ -25,7 +24,6 @@ import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper; import jakarta.xml.bind.annotation.XmlElementWrapper;
import java.util.List; import java.util.List;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Property { public class Property {
@ -54,7 +52,7 @@ public class Property {
private ResourceDefinition resourceDefinition; private ResourceDefinition resourceDefinition;
@ApiModelProperty(value = "The name of the property") @Schema(description = "The name of the property")
public String getName() { public String getName() {
return name; return name;
} }
@ -63,7 +61,7 @@ public class Property {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The display name") @Schema(description = "The display name")
public String getDisplayName() { public String getDisplayName() {
return displayName; return displayName;
} }
@ -72,7 +70,7 @@ public class Property {
this.displayName = displayName; this.displayName = displayName;
} }
@ApiModelProperty(value = "The description") @Schema(description = "The description")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -81,7 +79,7 @@ public class Property {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "The default value") @Schema(description = "The default value")
public String getDefaultValue() { public String getDefaultValue() {
return defaultValue; return defaultValue;
} }
@ -90,7 +88,7 @@ public class Property {
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
} }
@ApiModelProperty(value = "The controller service required by this property, or null if none is required") @Schema(description = "The controller service required by this property, or null if none is required")
public ControllerServiceDefinition getControllerServiceDefinition() { public ControllerServiceDefinition getControllerServiceDefinition() {
return controllerServiceDefinition; return controllerServiceDefinition;
} }
@ -99,7 +97,7 @@ public class Property {
this.controllerServiceDefinition = controllerServiceDefinition; this.controllerServiceDefinition = controllerServiceDefinition;
} }
@ApiModelProperty(value = "The allowable values for this property") @Schema(description = "The allowable values for this property")
public List<AllowableValue> getAllowableValues() { public List<AllowableValue> getAllowableValues() {
return allowableValues; return allowableValues;
} }
@ -108,7 +106,7 @@ public class Property {
this.allowableValues = allowableValues; this.allowableValues = allowableValues;
} }
@ApiModelProperty(value = "Whether or not the property is required") @Schema(description = "Whether or not the property is required")
public boolean isRequired() { public boolean isRequired() {
return required; return required;
} }
@ -117,7 +115,7 @@ public class Property {
this.required = required; this.required = required;
} }
@ApiModelProperty(value = "Whether or not the property is sensitive") @Schema(description = "Whether or not the property is sensitive")
public boolean isSensitive() { public boolean isSensitive() {
return sensitive; return sensitive;
} }
@ -126,7 +124,7 @@ public class Property {
this.sensitive = sensitive; this.sensitive = sensitive;
} }
@ApiModelProperty(value = "Whether or not expression language is supported") @Schema(description = "Whether or not expression language is supported")
public boolean isExpressionLanguageSupported() { public boolean isExpressionLanguageSupported() {
return expressionLanguageSupported; return expressionLanguageSupported;
} }
@ -135,7 +133,7 @@ public class Property {
this.expressionLanguageSupported = expressionLanguageSupported; this.expressionLanguageSupported = expressionLanguageSupported;
} }
@ApiModelProperty(value = "The scope of expression language support") @Schema(description = "The scope of expression language support")
public ExpressionLanguageScope getExpressionLanguageScope() { public ExpressionLanguageScope getExpressionLanguageScope() {
return expressionLanguageScope; return expressionLanguageScope;
} }
@ -144,7 +142,7 @@ public class Property {
this.expressionLanguageScope = expressionLanguageScope; this.expressionLanguageScope = expressionLanguageScope;
} }
@ApiModelProperty(value = "Whether or not the processor dynamically modifies the classpath") @Schema(description = "Whether or not the processor dynamically modifies the classpath")
public boolean isDynamicallyModifiesClasspath() { public boolean isDynamicallyModifiesClasspath() {
return dynamicallyModifiesClasspath; return dynamicallyModifiesClasspath;
} }
@ -153,7 +151,7 @@ public class Property {
this.dynamicallyModifiesClasspath = dynamicallyModifiesClasspath; this.dynamicallyModifiesClasspath = dynamicallyModifiesClasspath;
} }
@ApiModelProperty(value = "Whether or not the processor is dynamic") @Schema(description = "Whether or not the processor is dynamic")
public boolean isDynamic() { public boolean isDynamic() {
return dynamic; return dynamic;
} }
@ -162,7 +160,7 @@ public class Property {
this.dynamic = dynamic; this.dynamic = dynamic;
} }
@ApiModelProperty(value = "The properties that this property depends on") @Schema(description = "The properties that this property depends on")
public List<Dependency> getDependencies() { public List<Dependency> getDependencies() {
return dependencies; return dependencies;
} }
@ -171,7 +169,7 @@ public class Property {
this.dependencies = dependencies; this.dependencies = dependencies;
} }
@ApiModelProperty(value = "The optional resource definition") @Schema(description = "The optional resource definition")
public ResourceDefinition getResourceDefinition() { public ResourceDefinition getResourceDefinition() {
return resourceDefinition; return resourceDefinition;
} }

View File

@ -16,15 +16,13 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
import java.util.Objects; import java.util.Objects;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class ProvidedServiceAPI { public class ProvidedServiceAPI {
@ -37,7 +35,7 @@ public class ProvidedServiceAPI {
@NotBlank @NotBlank
private String version; private String version;
@ApiModelProperty(value = "The class name of the service API being provided") @Schema(description = "The class name of the service API being provided")
public String getClassName() { public String getClassName() {
return className; return className;
} }
@ -46,7 +44,7 @@ public class ProvidedServiceAPI {
this.className = className; this.className = className;
} }
@ApiModelProperty(value = "The group id of the service API being provided") @Schema(description = "The group id of the service API being provided")
public String getGroupId() { public String getGroupId() {
return groupId; return groupId;
} }
@ -55,7 +53,7 @@ public class ProvidedServiceAPI {
this.groupId = groupId; this.groupId = groupId;
} }
@ApiModelProperty(value = "The artifact id of the service API being provided") @Schema(description = "The artifact id of the service API being provided")
public String getArtifactId() { public String getArtifactId() {
return artifactId; return artifactId;
} }
@ -64,7 +62,7 @@ public class ProvidedServiceAPI {
this.artifactId = artifactId; this.artifactId = artifactId;
} }
@ApiModelProperty(value = "The version of the service API being provided") @Schema(description = "The version of the service API being provided")
public String getVersion() { public String getVersion() {
return version; return version;
} }

View File

@ -16,13 +16,11 @@
*/ */
package org.apache.nifi.extension.manifest; package org.apache.nifi.extension.manifest;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAccessorType;
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Relationship { public class Relationship {
@ -30,7 +28,7 @@ public class Relationship {
private String description; private String description;
private boolean autoTerminated; private boolean autoTerminated;
@ApiModelProperty(value = "The name of the relationship") @Schema(description = "The name of the relationship")
public String getName() { public String getName() {
return name; return name;
} }
@ -39,7 +37,7 @@ public class Relationship {
this.name = name; this.name = name;
} }
@ApiModelProperty(value = "The description of the relationship") @Schema(description = "The description of the relationship")
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -48,7 +46,7 @@ public class Relationship {
this.description = description; this.description = description;
} }
@ApiModelProperty(value = "Whether or not the relationship is auto-terminated by default") @Schema(description = "Whether or not the relationship is auto-terminated by default")
public boolean isAutoTerminated() { public boolean isAutoTerminated() {
return autoTerminated; return autoTerminated;
} }

Some files were not shown because too many files have changed in this diff Show More