Skip to content

Commit afa9d31

Browse files
test(boxsdkgen): remove token dowscope from notes test (box/box-codegen#957) (#1528)
1 parent 685c49c commit afa9d31

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "5a7add6", "specHash": "d028758", "version": "6.10.0" }
1+
{ "engineHash": "2e559a0", "specHash": "d028758", "version": "6.10.0" }

BoxSdkGen/Tests/Notes/NotesManagerTests.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ class NotesManagerTests: RetryableTestCase {
1313
await runWithRetryAsync {
1414
let noteName: String = Utils.getUUID()
1515
let markdownContent: String = "# Heading\n\nSome text"
16-
let downscopedToken: AccessToken = try await client.auth.downscopeToken(scopes: ["item_upload"], resource: nil, sharedLink: nil, networkSession: nil)
17-
let downscopedClient: BoxClient = BoxClient(auth: BoxDeveloperTokenAuth(token: downscopedToken.accessToken!))
18-
let response: NotesConvertResponseV2026R0 = try await downscopedClient.notes.createNoteConvertV2026R0(requestBody: NotesConvertRequestBodyV2026R0(content: markdownContent, parent: FolderReferenceV2026R0(id: "0"), name: noteName, contentFormat: NotesConvertRequestBodyV2026R0ContentFormatField.markdown))
16+
let response: NotesConvertResponseV2026R0 = try await client.notes.createNoteConvertV2026R0(requestBody: NotesConvertRequestBodyV2026R0(content: markdownContent, parent: FolderReferenceV2026R0(id: "0"), name: noteName, contentFormat: NotesConvertRequestBodyV2026R0ContentFormatField.markdown))
1917
XCTAssertTrue(response.id != "")
2018
XCTAssertTrue(Utils.Strings.toString(value: response.type) == "file")
2119
let file: FileFull = try await client.files.getFileById(fileId: response.id)

docs/BoxSdkGen/Notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the endpoint docs at
1414

1515
<!-- sample post_notes_convert_v2026.0 -->
1616
```
17-
try await downscopedClient.notes.createNoteConvertV2026R0(requestBody: NotesConvertRequestBodyV2026R0(content: markdownContent, contentFormat: NotesConvertRequestBodyV2026R0ContentFormatField.markdown, parent: FolderReferenceV2026R0(id: "0"), name: noteName))
17+
try await client.notes.createNoteConvertV2026R0(requestBody: NotesConvertRequestBodyV2026R0(content: markdownContent, contentFormat: NotesConvertRequestBodyV2026R0ContentFormatField.markdown, parent: FolderReferenceV2026R0(id: "0"), name: noteName))
1818
```
1919

2020
### Arguments

0 commit comments

Comments
 (0)