Skip to content

Commit 5de0c19

Browse files
authored
docs(dropbox): update descriptions (#16)
1 parent b1a1eab commit 5de0c19

File tree

10 files changed

+125
-100
lines changed

10 files changed

+125
-100
lines changed

src/main/java/io/kestra/plugin/dropbox/files/Copy.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,34 @@
4949
)
5050
}
5151
)
52-
@Schema(title = "Copy a file or folder to a different location in Dropbox.")
52+
@Schema(
53+
title = "Copy Dropbox file or folder",
54+
description = "Copies an item to another Dropbox path. Paths must start with `/`; can be read from kestra:// URIs. Conflicts can autorename (default false)."
55+
)
5356
public class Copy extends Task implements RunnableTask<Copy.Output> {
5457

55-
@Schema(title = "Dropbox access token.")
58+
@Schema(title = "Dropbox access token", description = "Token must allow reading source and writing destination.")
5659
@NotNull
5760
private Property<String> accessToken;
5861

5962
@Schema(
60-
title = "The path of the file or folder to be copied.",
61-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
63+
title = "Source path",
64+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
6265
)
6366
@NotNull
6467
private Object from;
6568

6669
@Schema(
67-
title = "The destination path where the file or folder should be copied.",
68-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
70+
title = "Destination path",
71+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
6972
)
7073
@NotNull
7174
private Object to;
7275

7376
@Schema(
74-
title = "If there's a conflict, have the Dropbox server try to autorename the file.",
75-
description = "For example, appending (1) or (2).")
77+
title = "Auto-rename on conflict",
78+
description = "Default false. When true, Dropbox appends suffixes like (1) if destination exists."
79+
)
7680
@Builder.Default
7781
private Property<Boolean> autorename = Property.ofValue(false);
7882

@@ -157,7 +161,7 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
157161
@SuperBuilder
158162
@Getter
159163
public static class Output implements io.kestra.core.models.tasks.Output {
160-
@Schema(title = "The metadata of the newly copied file or folder.")
164+
@Schema(title = "Copied item metadata")
161165
private final DropboxFile file;
162166
}
163-
}
167+
}

src/main/java/io/kestra/plugin/dropbox/files/CreateFolder.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,27 @@
4848
)
4949
}
5050
)
51-
@Schema(title = "Create a new folder in Dropbox.")
51+
@Schema(
52+
title = "Create folder in Dropbox",
53+
description = "Creates a new Dropbox folder at the resolved path. Path must start with `/`; can be read from a kestra:// URI. Fails on conflicts unless `autorename` is true (default: false)."
54+
)
5255
public class CreateFolder extends Task implements RunnableTask<CreateFolder.Output> {
5356

54-
@Schema(title = "Dropbox access token.")
57+
@Schema(title = "Dropbox access token", description = "Token must allow writing to the target path.")
5558
@NotNull
5659
private Property<String> accessToken;
5760

5861
@Schema(
59-
title = "The path of the folder to create.",
60-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
62+
title = "Folder path to create",
63+
description = "Accepts a literal Dropbox path or a kestra:// URI pointing to a file that contains the path. Resolved path must start with `/`."
6164
)
6265
@NotNull
6366
private Object path;
6467

6568
@Schema(
66-
title = "If there's a conflict, have the Dropbox server try to autorename the file.",
67-
description = "For example, appending (1) or (2).")
69+
title = "Auto-rename on conflict",
70+
description = "Default false. When true, Dropbox appends suffixes like (1) if the folder already exists."
71+
)
6872
@Builder.Default
6973
private Property<Boolean> autorename = Property.ofValue(false);
7074

@@ -143,7 +147,7 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
143147
@SuperBuilder
144148
@Getter
145149
public static class Output implements io.kestra.core.models.tasks.Output {
146-
@Schema(title = "The metadata of the created folder.")
150+
@Schema(title = "Created folder metadata")
147151
private final DropboxFile file;
148152
}
149-
}
153+
}

src/main/java/io/kestra/plugin/dropbox/files/Delete.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@
4747
)
4848
}
4949
)
50-
@Schema(title = "Delete a file or folder from Dropbox.")
50+
@Schema(
51+
title = "Delete Dropbox file or folder",
52+
description = "Removes a Dropbox item at the resolved path. Path must start with `/`; can be read from a kestra:// URI. Fails if not found or token lacks delete permission."
53+
)
5154
public class Delete extends Task implements RunnableTask<Delete.Output> {
5255

53-
@Schema(title = "Dropbox access token.")
56+
@Schema(title = "Dropbox access token", description = "Token must allow deleting the target path.")
5457
@NotNull
5558
private Property<String> accessToken;
5659

5760
@Schema(
58-
title = "The path of the file or folder to delete.",
59-
description = "Can be a direct path as a string (e.g., `/my/file.txt`), or a Kestra internal storage URI (kestra://...) of a file containing the path."
61+
title = "Path to delete",
62+
description = "Literal Dropbox path or kestra:// URI pointing to the path content. Resolved path must start with `/`."
6063
)
6164
@NotNull
6265
private Object from;
@@ -133,7 +136,7 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
133136
@SuperBuilder
134137
@Getter
135138
public static class Output implements io.kestra.core.models.tasks.Output {
136-
@Schema(title = "The metadata of the deleted file or folder.")
139+
@Schema(title = "Deleted item metadata")
137140
private final DropboxFile file;
138141
}
139-
}
142+
}

src/main/java/io/kestra/plugin/dropbox/files/Download.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,19 @@
6666
)
6767
}
6868
)
69-
@Schema(title = "Download a file from Dropbox.")
69+
@Schema(
70+
title = "Download Dropbox file to storage",
71+
description = "Downloads a Dropbox file and writes it to Kestra internal storage. Source path must start with `/` or be read from a kestra:// URI. Fails if the path is missing or token lacks read access."
72+
)
7073
public class Download extends Task implements RunnableTask<Download.Output> {
7174

72-
@Schema(title = "Dropbox access token.")
75+
@Schema(title = "Dropbox access token", description = "Token must allow reading the source path.")
7376
@NotNull
7477
private Property<String> accessToken;
7578

7679
@Schema(
77-
title = "The path of the file to download.",
78-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
80+
title = "Path to download",
81+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
7982
)
8083
@NotNull
8184
private Object from;
@@ -154,10 +157,10 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
154157
@SuperBuilder
155158
@Getter
156159
public static class Output implements io.kestra.core.models.tasks.Output {
157-
@Schema(title = "The URI of the downloaded file in Kestra's internal storage.")
160+
@Schema(title = "Downloaded file URI")
158161
private final URI uri;
159162

160-
@Schema(title = "The metadata of the downloaded file from Dropbox.")
163+
@Schema(title = "Downloaded file metadata")
161164
private final FileMetadata metadata;
162165
}
163-
}
166+
}

src/main/java/io/kestra/plugin/dropbox/files/GetMetadata.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,24 @@
4747
)
4848
}
4949
)
50-
@Schema(title = "Get metadata for a file or folder from Dropbox.")
50+
@Schema(
51+
title = "Retrieve Dropbox item metadata",
52+
description = "Retrieves metadata for a Dropbox file or folder. Path must start with `/` or come from a kestra:// URI. Optional media info disabled by default."
53+
)
5154
public class GetMetadata extends Task implements RunnableTask<GetMetadata.Output> {
5255

53-
@Schema(title = "Dropbox access token.")
56+
@Schema(title = "Dropbox access token", description = "Token must allow reading the target path.")
5457
@NotNull
5558
private Property<String> accessToken;
5659

5760
@Schema(
58-
title = "The path of the file or folder to get metadata for.",
59-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
61+
title = "Path to inspect",
62+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
6063
)
6164
@NotNull
6265
private Object path;
6366

64-
@Schema(title = "If true, media info will be in the response.")
67+
@Schema(title = "Include media info", description = "Default false. When true, returns media info if available.")
6568
@Builder.Default
6669
private Property<Boolean> includeMediaInfo = Property.ofValue(false);
6770

@@ -141,7 +144,7 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
141144
@SuperBuilder
142145
@Getter
143146
public static class Output implements io.kestra.core.models.tasks.Output {
144-
@Schema(title = "The metadata of the file or folder.")
147+
@Schema(title = "Metadata for the item")
145148
private final DropboxFile file;
146149
}
147-
}
150+
}

src/main/java/io/kestra/plugin/dropbox/files/List.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,32 +62,33 @@
6262
)
6363
}
6464
)
65-
@Schema(title = "List files and folders in a Dropbox directory.")
65+
@Schema(
66+
title = "List Dropbox directory entries",
67+
description = "Lists files and folders under a path (default root). Path can come from a string or kestra:// URI and should start with `/` when set. Supports recursion, limit (default 2000), and `fetchType` (default FETCH) to control memory vs storage output."
68+
)
6669
public class List extends Task implements RunnableTask<List.Output> {
6770

68-
@Schema(title = "Dropbox access token.")
71+
@Schema(title = "Dropbox access token", description = "Token must allow listing the target path.")
6972
@NotNull
7073
private Property<String> accessToken;
7174

7275
@Schema(
73-
title = "The path to the directory to list.",
74-
description = "Can be a direct path as a string, or a Kestra internal storage URI of a file containing the path."
76+
title = "Directory path",
77+
description = "Literal Dropbox path or kestra:// URI containing the path. Empty or null lists root. Should start with `/` when provided."
7578
)
7679
private Object from;
7780

78-
@Schema(title = "Whether to list files recursively in all sub-folders.")
81+
@Schema(title = "Recursive listing", description = "Default false. When true, traverses sub-folders.")
7982
@Builder.Default
8083
private Property<Boolean> recursive = Property.ofValue(false);
8184

82-
@Schema(title = "The maximum number of files to return.")
85+
@Schema(title = "Maximum entries", description = "Default 2000. Passed to Dropbox API as limit.")
8386
@Builder.Default
8487
private Property<Integer> limit = Property.ofValue(2000);
8588

8689
@Schema(
87-
title = "How to fetch the data.",
88-
description = "FETCH_ONE: Returns a single row.\n" +
89-
"FETCH: Returns all rows in memory.\n" +
90-
"STORE: Returns all rows in a file stored in Kestra's internal storage."
90+
title = "Fetch strategy",
91+
description = "`FETCH_ONE`: return first entry.\n`FETCH` (default): return all entries in memory.\n`STORE`: stream entries to Kestra storage and return URI."
9192
)
9293
@Builder.Default
9394
private Property<FetchType> fetchType = Property.ofValue(FetchType.FETCH);
@@ -191,16 +192,16 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
191192
@SuperBuilder
192193
@Getter
193194
public static class Output implements io.kestra.core.models.tasks.Output {
194-
@Schema(title = "The list of files and folders.", description = "Only populated if `fetchType` is `FETCH`.")
195+
@Schema(title = "Directory entries", description = "Populated when `fetchType` is `FETCH`.")
195196
private final java.util.List<DropboxFile> rows;
196197

197-
@Schema(title = "The first file or folder found.", description = "Only populated if `fetchType` is `FETCH_ONE`.")
198+
@Schema(title = "First entry", description = "Populated when `fetchType` is `FETCH_ONE`.")
198199
private final DropboxFile row;
199200

200-
@Schema(title = "The URI of the file in Kestra's internal storage.", description = "Only populated if `fetchType` is `STORE`.")
201+
@Schema(title = "Stored entries URI", description = "Populated when `fetchType` is `STORE`.")
201202
private URI uri;
202203

203-
@Schema(title = "The number of files and folders found.")
204+
@Schema(title = "Entry count")
204205
private final long size;
205206
}
206-
}
207+
}

src/main/java/io/kestra/plugin/dropbox/files/Move.java

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,38 @@
4949
)
5050
}
5151
)
52-
@Schema(title = "Move a file or folder to a different location in Dropbox.")
52+
@Schema(
53+
title = "Move Dropbox file or folder",
54+
description = "Moves an item to a new Dropbox path. Paths must start with `/`; can be read from kestra:// URIs. Conflicts can autorename (default false). Cross-user moves require `allowOwnershipTransfer`."
55+
)
5356
public class Move extends Task implements RunnableTask<Move.Output> {
5457

55-
@Schema(title = "Dropbox access token.")
58+
@Schema(title = "Dropbox access token", description = "Token must allow moving both source and destination paths.")
5659
@NotNull
5760
private Property<String> accessToken;
5861

5962
@Schema(
60-
title = "The path of the file or folder to be moved.",
61-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
63+
title = "Source path",
64+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
6265
)
6366
@NotNull
6467
private Object from;
6568

6669
@Schema(
67-
title = "The destination path where the file or folder should be moved.",
68-
description = "Can be a direct path as a string, or a Kestra internal storage URI (kestra://...) of a file containing the path."
70+
title = "Destination path",
71+
description = "Literal Dropbox path or kestra:// URI containing the path. Must start with `/`."
6972
)
7073
@NotNull
7174
private Object to;
7275

7376
@Schema(
74-
title = "If there's a conflict, have the Dropbox server try to autorename the file.",
75-
description = "For example, appending (1) or (2).")
77+
title = "Auto-rename on conflict",
78+
description = "Default false. When true, Dropbox appends suffixes like (1) if destination exists."
79+
)
7680
@Builder.Default
7781
private Property<Boolean> autorename = Property.ofValue(false);
7882

79-
@Schema(title = "Allow move to be performed even if it is between two different users.")
83+
@Schema(title = "Allow ownership transfer", description = "Default false. Enables moves across different owners.")
8084
@Builder.Default
8185
private Property<Boolean> allowOwnershipTransfer = Property.ofValue(false);
8286

@@ -163,7 +167,7 @@ DbxClientV2 createClient(RunContext runContext) throws Exception {
163167
@SuperBuilder
164168
@Getter
165169
public static class Output implements io.kestra.core.models.tasks.Output {
166-
@Schema(title = "The metadata of the moved file or folder.")
170+
@Schema(title = "Moved item metadata")
167171
private final DropboxFile file;
168172
}
169-
}
173+
}

0 commit comments

Comments
 (0)