Skip to content

Commit b485b7a

Browse files
authored
Merge pull request #549 from dropbox/MF-5759-2
MF-5759 fix unstable route order for routes with same name but different versions
2 parents 99c78ef + 43b8b8e commit b485b7a

18 files changed

+710
-712
lines changed

.github/workflows/check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-python@v3
3030
with:
3131
python-version: '3.9.14'
32-
- run: python -m pip install ply && pip install six
32+
- run: python -m pip install ply six packaging
3333

3434
- name: Grant execute permissions
3535
run: chmod +x gradlew

core/build/generated_stone_source/main/refs/javadoc-refs.json

+1-1
Large diffs are not rendered by default.

core/build/generated_stone_source/main/src/com/dropbox/core/v2/async/PollErrorException.java

+15-15
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
* Exception thrown when the server responds with a {@link PollError} error.
1111
*
1212
* <p> This exception is raised by {@link
13-
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
14-
* {@link
1513
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
1614
* {@link
15+
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
16+
* {@link
1717
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersMoveFormerMemberFilesJobStatusCheck(String)},
1818
* {@link
1919
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersRemoveJobStatusGet(String)},
2020
* {@link
2121
* com.dropbox.core.v2.team.DbxTeamTeamRequests#teamFolderArchiveCheck(String)},
2222
* {@link
23-
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
24-
* {@link
2523
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheck(String)},
2624
* {@link
25+
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
26+
* {@link
2727
* com.dropbox.core.v2.files.DbxUserFilesRequests#createFolderBatchCheck(String)},
2828
* {@link
2929
* com.dropbox.core.v2.files.DbxUserFilesRequests#deleteBatchCheck(String)},
3030
* {@link
31-
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
32-
* {@link
3331
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheck(String)},
3432
* {@link
33+
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
34+
* {@link
3535
* com.dropbox.core.v2.files.DbxUserFilesRequests#saveUrlCheckJobStatus(String)},
3636
* {@link
3737
* com.dropbox.core.v2.files.DbxUserFilesRequests#uploadSessionFinishBatchCheck(String)},
@@ -45,17 +45,17 @@
4545
*/
4646
public class PollErrorException extends DbxApiException {
4747
// exception for routes:
48-
// 2/team/members/add/job_status/get_v2
4948
// 2/team/members/add/job_status/get
49+
// 2/team/members/add/job_status/get_v2
5050
// 2/team/members/move_former_member_files/job_status/check
5151
// 2/team/members/remove/job_status/get
5252
// 2/team/team_folder/archive/check
53-
// 2/files/copy_batch/check_v2
5453
// 2/files/copy_batch/check
54+
// 2/files/copy_batch/check_v2
5555
// 2/files/create_folder_batch/check
5656
// 2/files/delete_batch/check
57-
// 2/files/move_batch/check_v2
5857
// 2/files/move_batch/check
58+
// 2/files/move_batch/check_v2
5959
// 2/files/save_url/check_job_status
6060
// 2/files/upload_session/finish_batch/check
6161
// 2/sharing/check_job_status
@@ -66,28 +66,28 @@ public class PollErrorException extends DbxApiException {
6666

6767
/**
6868
* The error reported by {@link
69-
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
70-
* {@link
7169
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGet(String)},
7270
* {@link
71+
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersAddJobStatusGetV2(String)},
72+
* {@link
7373
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersMoveFormerMemberFilesJobStatusCheck(String)},
7474
* {@link
7575
* com.dropbox.core.v2.team.DbxTeamTeamRequests#membersRemoveJobStatusGet(String)},
7676
* {@link
7777
* com.dropbox.core.v2.team.DbxTeamTeamRequests#teamFolderArchiveCheck(String)},
7878
* {@link
79-
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
80-
* {@link
8179
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheck(String)},
8280
* {@link
81+
* com.dropbox.core.v2.files.DbxUserFilesRequests#copyBatchCheckV2(String)},
82+
* {@link
8383
* com.dropbox.core.v2.files.DbxUserFilesRequests#createFolderBatchCheck(String)},
8484
* {@link
8585
* com.dropbox.core.v2.files.DbxUserFilesRequests#deleteBatchCheck(String)},
8686
* {@link
87-
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
88-
* {@link
8987
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheck(String)},
9088
* {@link
89+
* com.dropbox.core.v2.files.DbxUserFilesRequests#moveBatchCheckV2(String)},
90+
* {@link
9191
* com.dropbox.core.v2.files.DbxUserFilesRequests#saveUrlCheckJobStatus(String)},
9292
* {@link
9393
* com.dropbox.core.v2.files.DbxUserFilesRequests#uploadSessionFinishBatchCheck(String)},

core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/DbxUserFileRequestsRequests.java

+26-26
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,32 @@ public FileRequest get(String id) throws GetFileRequestErrorException, DbxExcept
235235
return get(_arg);
236236
}
237237

238+
//
239+
// route 2/file_requests/list
240+
//
241+
242+
/**
243+
* Returns a list of file requests owned by this user. For apps with the app
244+
* folder permission, this will only return file requests with destinations
245+
* in the app folder.
246+
*
247+
* @return Result for {@link DbxUserFileRequestsRequests#list}.
248+
*/
249+
public ListFileRequestsResult list() throws ListFileRequestsErrorException, DbxException {
250+
try {
251+
return this.client.rpcStyle(this.client.getHost().getApi(),
252+
"2/file_requests/list",
253+
null,
254+
false,
255+
com.dropbox.core.stone.StoneSerializers.void_(),
256+
ListFileRequestsResult.Serializer.INSTANCE,
257+
ListFileRequestsError.Serializer.INSTANCE);
258+
}
259+
catch (DbxWrappedException ex) {
260+
throw new ListFileRequestsErrorException("2/file_requests/list", ex.getRequestId(), ex.getUserMessage(), (ListFileRequestsError) ex.getErrorValue());
261+
}
262+
}
263+
238264
//
239265
// route 2/file_requests/list_v2
240266
//
@@ -297,32 +323,6 @@ public ListFileRequestsV2Result listV2(long limit) throws ListFileRequestsErrorE
297323
return listV2(_arg);
298324
}
299325

300-
//
301-
// route 2/file_requests/list
302-
//
303-
304-
/**
305-
* Returns a list of file requests owned by this user. For apps with the app
306-
* folder permission, this will only return file requests with destinations
307-
* in the app folder.
308-
*
309-
* @return Result for {@link DbxUserFileRequestsRequests#list}.
310-
*/
311-
public ListFileRequestsResult list() throws ListFileRequestsErrorException, DbxException {
312-
try {
313-
return this.client.rpcStyle(this.client.getHost().getApi(),
314-
"2/file_requests/list",
315-
null,
316-
false,
317-
com.dropbox.core.stone.StoneSerializers.void_(),
318-
ListFileRequestsResult.Serializer.INSTANCE,
319-
ListFileRequestsError.Serializer.INSTANCE);
320-
}
321-
catch (DbxWrappedException ex) {
322-
throw new ListFileRequestsErrorException("2/file_requests/list", ex.getRequestId(), ex.getUserMessage(), (ListFileRequestsError) ex.getErrorValue());
323-
}
324-
}
325-
326326
//
327327
// route 2/file_requests/list/continue
328328
//

core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/ListFileRequestsErrorException.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@
1010
* Exception thrown when the server responds with a {@link
1111
* ListFileRequestsError} error.
1212
*
13-
* <p> This exception is raised by {@link
14-
* DbxUserFileRequestsRequests#listV2(long)} and {@link
15-
* DbxUserFileRequestsRequests#list}. </p>
13+
* <p> This exception is raised by {@link DbxUserFileRequestsRequests#list} and
14+
* {@link DbxUserFileRequestsRequests#listV2(long)}. </p>
1615
*/
1716
public class ListFileRequestsErrorException extends DbxApiException {
1817
// exception for routes:
19-
// 2/file_requests/list_v2
2018
// 2/file_requests/list
19+
// 2/file_requests/list_v2
2120

2221
private static final long serialVersionUID = 0L;
2322

2423
/**
25-
* The error reported by {@link DbxUserFileRequestsRequests#listV2(long)}
26-
* and {@link DbxUserFileRequestsRequests#list}.
24+
* The error reported by {@link DbxUserFileRequestsRequests#list} and {@link
25+
* DbxUserFileRequestsRequests#listV2(long)}.
2726
*/
2827
public final ListFileRequestsError errorValue;
2928

core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/CreateFolderErrorException.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
* error.
1212
*
1313
* <p> This exception is raised by {@link
14-
* DbxUserFilesRequests#createFolderV2(String,boolean)} and {@link
15-
* DbxUserFilesRequests#createFolder(String,boolean)}. </p>
14+
* DbxUserFilesRequests#createFolder(String,boolean)} and {@link
15+
* DbxUserFilesRequests#createFolderV2(String,boolean)}. </p>
1616
*/
1717
public class CreateFolderErrorException extends DbxApiException {
1818
// exception for routes:
19-
// 2/files/create_folder_v2
2019
// 2/files/create_folder
20+
// 2/files/create_folder_v2
2121

2222
private static final long serialVersionUID = 0L;
2323

2424
/**
2525
* The error reported by {@link
26-
* DbxUserFilesRequests#createFolderV2(String,boolean)} and {@link
27-
* DbxUserFilesRequests#createFolder(String,boolean)}.
26+
* DbxUserFilesRequests#createFolder(String,boolean)} and {@link
27+
* DbxUserFilesRequests#createFolderV2(String,boolean)}.
2828
*/
2929
public final CreateFolderError errorValue;
3030

0 commit comments

Comments
 (0)