Skip to content

Commit e29e934

Browse files
box-sdk-buildbox-sdk-build
andauthored
docs: Improve descriptions of types (box/box-openapi#527) (#600)
Co-authored-by: box-sdk-build <[email protected]>
1 parent d56228d commit e29e934

File tree

6 files changed

+33
-14
lines changed

6 files changed

+33
-14
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "20cb559", "specHash": "2da99e0", "version": "1.14.0" }
1+
{ "engineHash": "20cb559", "specHash": "a54170e", "version": "1.14.0" }

box_sdk_gen/managers/files.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ def update_file_by_id(
371371
Example: "12345"
372372
:type file_id: str
373373
:param name: An optional different name for the file. This can be used to
374-
rename the file., defaults to None
374+
rename the file.
375+
376+
File names must be unique within their parent folder. The name check is case-insensitive, so a file
377+
named `New File` cannot be created in a parent folder that already contains a folder named `new file`., defaults to None
375378
:type name: Optional[str], optional
376379
:param description: The description for a file. This can be seen in the right-hand sidebar panel
377380
when viewing a file in the Box web app. Additionally, this index is used in

box_sdk_gen/managers/folders.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def update_folder_by_id(
464464
if_match: Optional[str] = None,
465465
extra_headers: Optional[Dict[str, Optional[str]]] = None
466466
) -> FolderFull:
467-
"""
467+
r"""
468468
Updates a folder. This can be also be used to move the folder,
469469
470470
create shared links, update collaborations, and more.
@@ -481,7 +481,16 @@ def update_folder_by_id(
481481
always represented by the ID `0`.
482482
Example: "12345"
483483
:type folder_id: str
484-
:param name: The optional new name for this folder., defaults to None
484+
:param name: The optional new name for this folder.
485+
486+
The following restrictions to folder names apply: names containing
487+
non-printable ASCII characters, forward and backward slashes
488+
(`/`, `\`), names with trailing spaces, and names `.` and `..` are
489+
not allowed.
490+
491+
Folder names must be unique within their parent folder. The name check is case-insensitive,
492+
so a folder named `New Folder` cannot be created in a parent folder that already contains
493+
a folder named `new folder`., defaults to None
485494
:type name: Optional[str], optional
486495
:param description: The optional description of this folder, defaults to None
487496
:type description: Optional[str], optional
@@ -826,13 +835,14 @@ def create_folder(
826835
Creates a new empty folder within the specified parent folder.
827836
:param name: The name for the new folder.
828837
829-
There are some restrictions to the file name. Names containing
838+
The following restrictions to folder names apply: names containing
830839
non-printable ASCII characters, forward and backward slashes
831-
(`/`, `\`), as well as names with trailing spaces are
832-
prohibited.
840+
(`/`, `\`), names with trailing spaces, and names `.` and `..` are
841+
not allowed.
833842
834-
Additionally, the names `.` and `..` are
835-
not allowed either.
843+
Folder names must be unique within their parent folder. The name check is case-insensitive,
844+
so a folder named `New Folder` cannot be created in a parent folder that already contains
845+
a folder named `new folder`.
836846
:type name: str
837847
:param parent: The parent folder to create the new folder within.
838848
:type parent: CreateFolderParent

box_sdk_gen/managers/uploads.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ def __init__(
9797
**kwargs
9898
):
9999
"""
100-
:param name: The name of the file
100+
:param name: The name of the file.
101+
102+
File names must be unique within their parent folder. The name check is case-insensitive, so a file
103+
named `New File` cannot be created in a parent folder that already contains a folder named `new file`.
101104
:type name: str
102105
:param parent: The parent folder to upload the file to
103106
:type parent: UploadFileAttributesParentField
@@ -140,7 +143,10 @@ def __init__(
140143
**kwargs
141144
):
142145
"""
143-
:param name: The name of the file
146+
:param name: The name of the file.
147+
148+
File names must be unique within their parent folder. The name check is case-insensitive, so a file
149+
named `New File` cannot be created in a parent folder that already contains a folder named `new file`.
144150
:type name: str
145151
:param parent: The parent folder to upload the file to
146152
:type parent: UploadWithPreflightCheckAttributesParentField

docs/files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ client.files.update_file_by_id(
7272
- file_id `str`
7373
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
7474
- name `Optional[str]`
75-
- An optional different name for the file. This can be used to rename the file.
75+
- An optional different name for the file. This can be used to rename the file. File names must be unique within their parent folder. The name check is case-insensitive, so a file named `New File` cannot be created in a parent folder that already contains a folder named `new file`.
7676
- description `Optional[str]`
7777
- The description for a file. This can be seen in the right-hand sidebar panel when viewing a file in the Box web app. Additionally, this index is used in the search index of the file, allowing users to find the file by the content in the description.
7878
- parent `Optional[UpdateFileByIdParent]`

docs/folders.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ client.folders.update_folder_by_id(
9191
- folder_id `str`
9292
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`. The root folder of a Box account is always represented by the ID `0`. Example: "12345"
9393
- name `Optional[str]`
94-
- The optional new name for this folder.
94+
- The optional new name for this folder. The following restrictions to folder names apply: names containing non-printable ASCII characters, forward and backward slashes (`/`, `\`), names with trailing spaces, and names `.` and `..` are not allowed. Folder names must be unique within their parent folder. The name check is case-insensitive, so a folder named `New Folder` cannot be created in a parent folder that already contains a folder named `new folder`.
9595
- description `Optional[str]`
9696
- The optional description of this folder
9797
- sync_state `Optional[UpdateFolderByIdSyncState]`
@@ -234,7 +234,7 @@ client.folders.create_folder(new_folder_name, CreateFolderParent(id="0"))
234234
### Arguments
235235

236236
- name `str`
237-
- The name for the new folder. There are some restrictions to the file name. Names containing non-printable ASCII characters, forward and backward slashes (`/`, `\`), as well as names with trailing spaces are prohibited. Additionally, the names `.` and `..` are not allowed either.
237+
- The name for the new folder. The following restrictions to folder names apply: names containing non-printable ASCII characters, forward and backward slashes (`/`, `\`), names with trailing spaces, and names `.` and `..` are not allowed. Folder names must be unique within their parent folder. The name check is case-insensitive, so a folder named `New Folder` cannot be created in a parent folder that already contains a folder named `new folder`.
238238
- parent `CreateFolderParent`
239239
- The parent folder to create the new folder within.
240240
- folder_upload_email `Optional[CreateFolderFolderUploadEmail]`

0 commit comments

Comments
 (0)