Skip to content

Commit

Permalink
fix(docs): doc corrections for plugin-amqp (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutimantri authored Jan 15, 2024
1 parent eba3c76 commit a8f389d
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
10 changes: 5 additions & 5 deletions src/main/java/io/kestra/plugin/amqp/AmqpConnectionInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ public interface AmqpConnectionInterface {

@PluginProperty(dynamic = true)
@Schema(
title = "The broker host"
title = "The broker host."
)
String getHost();

@PluginProperty(dynamic = true)
@Schema(
title = "The broker port"
title = "The broker port."
)
String getPort();

@PluginProperty(dynamic = true)
@Schema(
title = "The broker virtual host"
title = "The broker virtual host."
)
String getVirtualHost();

@PluginProperty(dynamic = true)
@Schema(
title = "The broker username"
title = "The broker username."
)
String getUsername();

@PluginProperty(dynamic = true)
@Schema(
title = "The broker password"
title = "The broker password."
)
String getPassword();
}
6 changes: 3 additions & 3 deletions src/main/java/io/kestra/plugin/amqp/Consume.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@NoArgsConstructor
@Schema(
title = "Consume messages from an AMQP queue.",
description = "Required a maxDuration or a maxRecords."
description = "Requires `maxDuration` or `maxRecords`."
)
@Plugin(
examples = {
Expand Down Expand Up @@ -149,11 +149,11 @@ private boolean ended(AtomicInteger count, ZonedDateTime start) {
@Getter
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "Number of row consumed."
title = "Number of rows consumed."
)
private final Integer count;
@Schema(
title = "File URI containing consumed message."
title = "File URI containing consumed messages."
)
private final URI uri;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/kestra/plugin/amqp/ConsumeInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public interface ConsumeInterface {
String getConsumerTag();

@Schema(
title = "The max number of rows to fetch before stopping.",
title = "The maximum number of rows to fetch before stopping.",
description = "It's not an hard limit and is evaluated every second."
)
Integer getMaxRecords();

@Schema(
title = "The max duration waiting for new rows.",
title = "The maximum duration to wait for new rows.",
description = "It's not an hard limit and is evaluated every second."
)
Duration getMaxDuration();
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/io/kestra/plugin/amqp/CreateQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Create a Queue",
description = "Create a Queue, including specified arguments"
title = "Create a queue.",
description = "Create a queue, including specified arguments."
)
@Plugin(
examples = {
Expand All @@ -39,30 +39,30 @@ public class CreateQueue extends AbstractAmqpConnection implements RunnableTask<
@NotNull
@PluginProperty(dynamic = true)
@Schema(
title = "The name of the queue"
title = "The name of the queue."
)
private String name;

@Builder.Default
@Schema(
title = "True if we are declaring a durable queue (the queue will survive a server restart)"
title = "Specify if we are declaring a durable queue (the queue will survive a server restart)."
)
private boolean durability = true;

@Builder.Default
@Schema(
title = "True if we are declaring an exclusive queue (restricted to this connection)"
title = "Specify if we are declaring an exclusive queue (restricted to this connection)."
)
private boolean exclusive = false;

@Builder.Default
@Schema(
title = "True if we are declaring an autodelete queue (server will delete it when no longer in use)"
title = "Specify if we are declaring an auto-delete queue (server will delete it when no longer in use)."
)
private boolean autoDelete = false;

@Schema(
title = "Other properties (construction arguments) for the queue"
title = "Other properties (construction arguments) for the queue."
)
private Map<String, Object> args;

Expand All @@ -84,7 +84,7 @@ public Output run(RunContext runContext) throws Exception {
@Getter
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "Queue name"
title = "The queue name."
)
private String queue;
}
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/io/kestra/plugin/amqp/DeclareExchange.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Create an Exchange"
title = "Create an exchange."
)
@Plugin(
examples = {
Expand All @@ -35,36 +35,36 @@ public class DeclareExchange extends AbstractAmqpConnection implements RunnableT
@NotNull
@PluginProperty(dynamic = true)
@Schema(
title = "The name of the exchange"
title = "The name of the exchange."
)
private String name;

@Builder.Default
@Schema(
title = "The exchange type"
title = "The exchange type."
)
private BuiltinExchangeType exchangeType = BuiltinExchangeType.DIRECT;

@Builder.Default
@Schema(
title = "True if we are declaring a durable exchange (the exchange will survive a server restart)"
title = "Specify if we are declaring a durable exchange (the exchange will survive a server restart)."
)
private boolean durability = true;

@Builder.Default
@Schema(
title = "True if the server should delete the exchange when it is no longer in use"
title = "Specify if the server should delete the exchange when it is no longer in use."
)
private boolean autoDelete = false;

@Builder.Default
@Schema(
title = "True if the exchange is internal, i.e. can't be directly published to by a client."
title = "Specify if the exchange is internal, i.e. can't be directly published to by a client."
)
private boolean internal = false;

@Schema(
title = "Other properties (construction arguments) for the exchange"
title = "Other properties (construction arguments) for the exchange."
)
private Map<String, Object> args;

Expand All @@ -88,7 +88,7 @@ public Output run(RunContext runContext) throws Exception {
@Getter
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "Exchange name"
title = "The exchange name."
)
private String exchange;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/kestra/plugin/amqp/Publish.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Publish a message to an AMQP exchange"
title = "Publish a message to an AMQP exchange."
)
@Plugin(
examples = {
Expand Down Expand Up @@ -76,8 +76,8 @@ public class Publish extends AbstractAmqpConnection implements RunnableTask<Publ
@PluginProperty(dynamic = true)
@NotNull
@Schema(
title = "The source of the data published",
description = "Can be an internal storage uri or a list.",
title = "The source of the data published.",
description = "It can be an Kestra's internal storage URI or a list.",
anyOf = {String.class, List.class, Object.class}
)
private Object from;
Expand Down Expand Up @@ -193,7 +193,7 @@ private void publish(Channel channel, Message message, RunContext runContext) th
@Getter
public static class Output implements io.kestra.core.models.tasks.Output {
@io.swagger.v3.oas.annotations.media.Schema(
title = "Number of message published"
title = "Number of messages published."
)
private final Integer messagesCount;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/kestra/plugin/amqp/QueueBind.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Bind a Queue to an Exchange."
title = "Bind a queue to an exchange."
)
@Plugin(
examples = {
Expand Down Expand Up @@ -82,11 +82,11 @@ public Output run(RunContext runContext) throws Exception {
@Getter
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "The queue name"
title = "The queue name."
)
private String queue;
@Schema(
title = "The exchange name"
title = "The exchange name."
)
private String exchange;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/kestra/plugin/amqp/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Wait for message in AMQP queue"
title = "Wait for message in AMQP queue."
)
@Plugin(
examples = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/kestra/plugin/amqp/models/SerdeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.nio.charset.StandardCharsets;

@Schema(
title = "Serializer / Deserializer used for the message"
title = "Serializer / Deserializer used for the message."
)
public enum SerdeType {
STRING,
Expand Down

0 comments on commit a8f389d

Please sign in to comment.