Skip to content

Commit db9cd36

Browse files
committed
remove redundant intra-doc link targets from generated doc comments
1 parent c141442 commit db9cd36

File tree

15 files changed

+232
-268
lines changed

15 files changed

+232
-268
lines changed

generator/rust.stoneg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ def _docf(self, tag: str, val: str) -> str:
868868
field = self.field_name_raw(field)
869869
return f'`{field}`'
870870
field = self.enum_variant_name_raw(field)
871-
return f'[`{type_name}::{field}`]({type_name}::{field})'
871+
return f'[`{type_name}::{field}`]'
872872
else:
873873
field = self.field_name_raw(field)
874874
# we can't link to the field itself, so just link to the struct
@@ -894,7 +894,7 @@ def _docf(self, tag: str, val: str) -> str:
894894
else:
895895
typ = self._all_types[self._current_namespace][val]
896896
rust_name = self._rust_type(typ)
897-
return f'[`{rust_name}`]({rust_name})'
897+
return f'[`{rust_name}`]'
898898
elif tag == 'link':
899899
title, url = val.rsplit(' ', 1)
900900
return f'[{title}]({url})'

src/generated/async_routes/files.rs

+45-52
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,8 @@ pub fn create_folder_batch_check<'a>(
251251

252252
/// Delete the file or folder at a given path. If the path is a folder, all its contents will be
253253
/// deleted too. A successful response indicates that the file or folder was deleted. The returned
254-
/// metadata will be the corresponding [`FileMetadata`](FileMetadata) or
255-
/// [`FolderMetadata`](FolderMetadata) for the item at time of deletion, and not a
256-
/// [`DeletedMetadata`](DeletedMetadata) object.
254+
/// metadata will be the corresponding [`FileMetadata`] or [`FolderMetadata`] for the item at time
255+
/// of deletion, and not a [`DeletedMetadata`] object.
257256
pub fn delete_v2<'a>(
258257
client: &'a impl crate::async_client_trait::UserAuthClient,
259258
arg: &'a DeleteArg,
@@ -269,9 +268,8 @@ pub fn delete_v2<'a>(
269268

270269
/// Delete the file or folder at a given path. If the path is a folder, all its contents will be
271270
/// deleted too. A successful response indicates that the file or folder was deleted. The returned
272-
/// metadata will be the corresponding [`FileMetadata`](FileMetadata) or
273-
/// [`FolderMetadata`](FolderMetadata) for the item at time of deletion, and not a
274-
/// [`DeletedMetadata`](DeletedMetadata) object.
271+
/// metadata will be the corresponding [`FileMetadata`] or [`FolderMetadata`] for the item at time
272+
/// of deletion, and not a [`DeletedMetadata`] object.
275273
#[deprecated(note = "replaced by delete_v2")]
276274
pub fn delete<'a>(
277275
client: &'a impl crate::async_client_trait::UserAuthClient,
@@ -451,14 +449,13 @@ pub fn get_temporary_link<'a>(
451449
///
452450
/// This endpoint acts as a delayed [`upload()`](crate::files::upload). The returned temporary
453451
/// upload link may be used to make a POST request with the data to be uploaded. The upload will
454-
/// then be perfomed with the [`CommitInfo`](CommitInfo) previously provided to
452+
/// then be perfomed with the [`CommitInfo`] previously provided to
455453
/// [`get_temporary_upload_link()`](crate::files::get_temporary_upload_link) but evaluated only upon
456-
/// consumption. Hence, errors stemming from invalid [`CommitInfo`](CommitInfo) with respect to the
457-
/// state of the user's Dropbox will only be communicated at consumption time. Additionally, these
458-
/// errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details.
459-
/// The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new
460-
/// link will have to be generated. Multiple links may exist for a specific upload path at any given
461-
/// time.
454+
/// consumption. Hence, errors stemming from invalid [`CommitInfo`] with respect to the state of the
455+
/// user's Dropbox will only be communicated at consumption time. Additionally, these errors are
456+
/// surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum
457+
/// temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have
458+
/// to be generated. Multiple links may exist for a specific upload path at any given time.
462459
///
463460
/// The POST request on the temporary upload link must have its Content-Type set to
464461
/// "application/octet-stream".
@@ -579,17 +576,17 @@ pub fn get_thumbnail_batch<'a>(
579576
/// [`ListFolderResult::cursor`](ListFolderResult) to retrieve more entries. If you're using
580577
/// [`ListFolderArg::recursive`](ListFolderArg) set to `true` to keep a local cache of the contents
581578
/// of a Dropbox account, iterate through each entry in order and process them as follows to keep
582-
/// your local state in sync: For each [`FileMetadata`](FileMetadata), store the new entry at the
583-
/// given path in your local state. If the required parent folders don't exist yet, create them. If
584-
/// there's already something else at the given path, replace it and remove all its children. For
585-
/// each [`FolderMetadata`](FolderMetadata), store the new entry at the given path in your local
586-
/// state. If the required parent folders don't exist yet, create them. If there's already something
587-
/// else at the given path, replace it but leave the children as they are. Check the new entry's
579+
/// your local state in sync: For each [`FileMetadata`], store the new entry at the given path in
580+
/// your local state. If the required parent folders don't exist yet, create them. If there's
581+
/// already something else at the given path, replace it and remove all its children. For each
582+
/// [`FolderMetadata`], store the new entry at the given path in your local state. If the required
583+
/// parent folders don't exist yet, create them. If there's already something else at the given
584+
/// path, replace it but leave the children as they are. Check the new entry's
588585
/// [`FolderSharingInfo::read_only`](FolderSharingInfo) and set all its children's read-only
589-
/// statuses to match. For each [`DeletedMetadata`](DeletedMetadata), if your local state has
590-
/// something at the given path, remove it and all its children. If there's nothing at the given
591-
/// path, ignore this entry. Note: [`auth::RateLimitError`](crate::types::auth::RateLimitError) may
592-
/// be returned if multiple [`list_folder()`](crate::files::list_folder) or
586+
/// statuses to match. For each [`DeletedMetadata`], if your local state has something at the given
587+
/// path, remove it and all its children. If there's nothing at the given path, ignore this entry.
588+
/// Note: [`auth::RateLimitError`](crate::types::auth::RateLimitError) may be returned if multiple
589+
/// [`list_folder()`](crate::files::list_folder) or
593590
/// [`list_folder_continue()`](crate::files::list_folder_continue) calls with same parameters are
594591
/// made simultaneously by same API app for same user. If your app implements retry logic, please
595592
/// hold off the retry until the previous request finishes.
@@ -612,17 +609,17 @@ pub fn list_folder<'a>(
612609
/// [`ListFolderResult::cursor`](ListFolderResult) to retrieve more entries. If you're using
613610
/// [`ListFolderArg::recursive`](ListFolderArg) set to `true` to keep a local cache of the contents
614611
/// of a Dropbox account, iterate through each entry in order and process them as follows to keep
615-
/// your local state in sync: For each [`FileMetadata`](FileMetadata), store the new entry at the
616-
/// given path in your local state. If the required parent folders don't exist yet, create them. If
617-
/// there's already something else at the given path, replace it and remove all its children. For
618-
/// each [`FolderMetadata`](FolderMetadata), store the new entry at the given path in your local
619-
/// state. If the required parent folders don't exist yet, create them. If there's already something
620-
/// else at the given path, replace it but leave the children as they are. Check the new entry's
612+
/// your local state in sync: For each [`FileMetadata`], store the new entry at the given path in
613+
/// your local state. If the required parent folders don't exist yet, create them. If there's
614+
/// already something else at the given path, replace it and remove all its children. For each
615+
/// [`FolderMetadata`], store the new entry at the given path in your local state. If the required
616+
/// parent folders don't exist yet, create them. If there's already something else at the given
617+
/// path, replace it but leave the children as they are. Check the new entry's
621618
/// [`FolderSharingInfo::read_only`](FolderSharingInfo) and set all its children's read-only
622-
/// statuses to match. For each [`DeletedMetadata`](DeletedMetadata), if your local state has
623-
/// something at the given path, remove it and all its children. If there's nothing at the given
624-
/// path, ignore this entry. Note: [`auth::RateLimitError`](crate::types::auth::RateLimitError) may
625-
/// be returned if multiple [`list_folder()`](crate::files::list_folder) or
619+
/// statuses to match. For each [`DeletedMetadata`], if your local state has something at the given
620+
/// path, remove it and all its children. If there's nothing at the given path, ignore this entry.
621+
/// Note: [`auth::RateLimitError`](crate::types::auth::RateLimitError) may be returned if multiple
622+
/// [`list_folder()`](crate::files::list_folder) or
626623
/// [`list_folder_continue()`](crate::files::list_folder_continue) calls with same parameters are
627624
/// made simultaneously by same API app for same user. If your app implements retry logic, please
628625
/// hold off the retry until the previous request finishes.
@@ -711,11 +708,10 @@ pub fn list_folder_longpoll<'a>(
711708
/// Returns revisions for files based on a file path or a file id. The file path or file id is
712709
/// identified from the latest file entry at the given file path or id. This end point allows your
713710
/// app to query either by file path or file id by setting the mode parameter appropriately. In the
714-
/// [`ListRevisionsMode::Path`](ListRevisionsMode::Path) (default) mode, all revisions at the same
715-
/// file path as the latest file entry are returned. If revisions with the same file id are desired,
716-
/// then mode must be set to [`ListRevisionsMode::Id`](ListRevisionsMode::Id). The
717-
/// [`ListRevisionsMode::Id`](ListRevisionsMode::Id) mode is useful to retrieve revisions for a
718-
/// given file across moves or renames.
711+
/// [`ListRevisionsMode::Path`] (default) mode, all revisions at the same file path as the latest
712+
/// file entry are returned. If revisions with the same file id are desired, then mode must be set
713+
/// to [`ListRevisionsMode::Id`]. The [`ListRevisionsMode::Id`] mode is useful to retrieve revisions
714+
/// for a given file across moves or renames.
719715
pub fn list_revisions<'a>(
720716
client: &'a impl crate::async_client_trait::UserAuthClient,
721717
arg: &'a ListRevisionsArg,
@@ -1326,23 +1322,20 @@ pub fn upload_session_finish_batch_check<'a>(
13261322
/// [`UploadSessionStartResult::session_id`](UploadSessionStartResult) with
13271323
/// [`upload_session_append_v2()`](crate::files::upload_session_append_v2) or
13281324
/// [`upload_session_finish()`](crate::files::upload_session_finish) more than 7 days after its
1329-
/// creation will return a
1330-
/// [`UploadSessionLookupError::NotFound`](UploadSessionLookupError::NotFound). Calls to this
1331-
/// endpoint will count as data transport calls for any Dropbox Business teams with a limit on the
1332-
/// number of data transport calls allowed per month. For more information, see the [Data transport
1333-
/// limit page](https://www.dropbox.com/developers/reference/data-transport-limit). By default,
1334-
/// upload sessions require you to send content of the file in sequential order via consecutive
1325+
/// creation will return a [`UploadSessionLookupError::NotFound`]. Calls to this endpoint will count
1326+
/// as data transport calls for any Dropbox Business teams with a limit on the number of data
1327+
/// transport calls allowed per month. For more information, see the [Data transport limit
1328+
/// page](https://www.dropbox.com/developers/reference/data-transport-limit). By default, upload
1329+
/// sessions require you to send content of the file in sequential order via consecutive
13351330
/// [`upload_session_start()`](crate::files::upload_session_start),
13361331
/// [`upload_session_append_v2()`](crate::files::upload_session_append_v2),
13371332
/// [`upload_session_finish()`](crate::files::upload_session_finish) calls. For better performance,
1338-
/// you can instead optionally use a
1339-
/// [`UploadSessionType::Concurrent`](UploadSessionType::Concurrent) upload session. To start a new
1340-
/// concurrent session, set [`UploadSessionStartArg::session_type`](UploadSessionStartArg) to
1341-
/// [`UploadSessionType::Concurrent`](UploadSessionType::Concurrent). After that, you can send file
1342-
/// data in concurrent [`upload_session_append_v2()`](crate::files::upload_session_append_v2)
1343-
/// requests. Finally finish the session with
1344-
/// [`upload_session_finish()`](crate::files::upload_session_finish). There are couple of
1345-
/// constraints with concurrent sessions to make them work. You can not send data with
1333+
/// you can instead optionally use a [`UploadSessionType::Concurrent`] upload session. To start a
1334+
/// new concurrent session, set [`UploadSessionStartArg::session_type`](UploadSessionStartArg) to
1335+
/// [`UploadSessionType::Concurrent`]. After that, you can send file data in concurrent
1336+
/// [`upload_session_append_v2()`](crate::files::upload_session_append_v2) requests. Finally finish
1337+
/// the session with [`upload_session_finish()`](crate::files::upload_session_finish). There are
1338+
/// couple of constraints with concurrent sessions to make them work. You can not send data with
13461339
/// [`upload_session_start()`](crate::files::upload_session_start) or
13471340
/// [`upload_session_finish()`](crate::files::upload_session_finish) call, only with
13481341
/// [`upload_session_append_v2()`](crate::files::upload_session_append_v2) call. Also data uploaded

src/generated/async_routes/sharing.rs

+13-16
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ pub fn create_shared_link<'a>(
103103
}
104104

105105
/// Create a shared link with custom settings. If no settings are given then the default visibility
106-
/// is [`RequestedVisibility::Public`](RequestedVisibility::Public) (The resolved visibility,
107-
/// though, may depend on other aspects such as team and shared folder settings).
106+
/// is [`RequestedVisibility::Public`] (The resolved visibility, though, may depend on other aspects
107+
/// such as team and shared folder settings).
108108
pub fn create_shared_link_with_settings<'a>(
109109
client: &'a impl crate::async_client_trait::UserAuthClient,
110110
arg: &'a CreateSharedLinkWithSettingsArg,
@@ -206,11 +206,10 @@ pub fn get_shared_link_metadata_app_auth<'a>(
206206
None)
207207
}
208208

209-
/// Returns a list of [`LinkMetadata`](LinkMetadata) objects for this user, including collection
210-
/// links. If no path is given, returns a list of all shared links for the current user, including
211-
/// collection links, up to a maximum of 1000 links. If a non-empty path is given, returns a list of
212-
/// all shared links that allow access to the given path. Collection links are never returned in
213-
/// this case.
209+
/// Returns a list of [`LinkMetadata`] objects for this user, including collection links. If no path
210+
/// is given, returns a list of all shared links for the current user, including collection links,
211+
/// up to a maximum of 1000 links. If a non-empty path is given, returns a list of all shared links
212+
/// that allow access to the given path. Collection links are never returned in this case.
214213
#[deprecated(note = "replaced by list_shared_links")]
215214
pub fn get_shared_links<'a>(
216215
client: &'a impl crate::async_client_trait::UserAuthClient,
@@ -420,8 +419,8 @@ pub fn list_shared_links<'a>(
420419
/// Modify the shared link's settings. If the requested visibility conflict with the shared links
421420
/// policy of the team or the shared folder (in case the linked file is part of a shared folder)
422421
/// then the [`LinkPermissions::resolved_visibility`](LinkPermissions) of the returned
423-
/// [`SharedLinkMetadata`](SharedLinkMetadata) will reflect the actual visibility of the shared link
424-
/// and the [`LinkPermissions::requested_visibility`](LinkPermissions) will reflect the requested
422+
/// [`SharedLinkMetadata`] will reflect the actual visibility of the shared link and the
423+
/// [`LinkPermissions::requested_visibility`](LinkPermissions) will reflect the requested
425424
/// visibility.
426425
pub fn modify_shared_link_settings<'a>(
427426
client: &'a impl crate::async_client_trait::UserAuthClient,
@@ -546,8 +545,7 @@ pub fn revoke_shared_link<'a>(
546545
}
547546

548547
/// Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in
549-
/// a shared team root. If a [`ShareFolderLaunch::AsyncJobId`](ShareFolderLaunch::AsyncJobId) is
550-
/// returned, you'll need to call
548+
/// a shared team root. If a [`ShareFolderLaunch::AsyncJobId`] is returned, you'll need to call
551549
/// [`check_share_job_status()`](crate::sharing::check_share_job_status) until the action completes
552550
/// to get the metadata for the folder.
553551
pub fn set_access_inheritance<'a>(
@@ -565,8 +563,7 @@ pub fn set_access_inheritance<'a>(
565563

566564
/// Share a folder with collaborators. Most sharing will be completed synchronously. Large folders
567565
/// will be completed asynchronously. To make testing the async case repeatable, set
568-
/// `ShareFolderArg.force_async`. If a
569-
/// [`ShareFolderLaunch::AsyncJobId`](ShareFolderLaunch::AsyncJobId) is returned, you'll need to
566+
/// `ShareFolderArg.force_async`. If a [`ShareFolderLaunch::AsyncJobId`] is returned, you'll need to
570567
/// call [`check_share_job_status()`](crate::sharing::check_share_job_status) until the action
571568
/// completes to get the metadata for the folder.
572569
pub fn share_folder<'a>(
@@ -583,7 +580,7 @@ pub fn share_folder<'a>(
583580
}
584581

585582
/// Transfer ownership of a shared folder to a member of the shared folder. User must have
586-
/// [`AccessLevel::Owner`](AccessLevel::Owner) access to the shared folder to perform a transfer.
583+
/// [`AccessLevel::Owner`] access to the shared folder to perform a transfer.
587584
pub fn transfer_folder<'a>(
588585
client: &'a impl crate::async_client_trait::UserAuthClient,
589586
arg: &'a TransferFolderArg,
@@ -670,8 +667,8 @@ pub fn update_folder_member<'a>(
670667
None)
671668
}
672669

673-
/// Update the sharing policies for a shared folder. User must have
674-
/// [`AccessLevel::Owner`](AccessLevel::Owner) access to the shared folder to update its policies.
670+
/// Update the sharing policies for a shared folder. User must have [`AccessLevel::Owner`] access to
671+
/// the shared folder to update its policies.
675672
pub fn update_folder_policy<'a>(
676673
client: &'a impl crate::async_client_trait::UserAuthClient,
677674
arg: &'a UpdateFolderPolicyArg,

0 commit comments

Comments
 (0)