Skip to content

Commit

Permalink
feat: Support nullable fields in TypeScript (box/box-codegen#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed Nov 24, 2024
1 parent ff3c518 commit 73fd87e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "a723fb8", "specHash": "6d5f53e", "version": "1.4.0" }
{ "engineHash": "f6ccea9", "specHash": "6d5f53e", "version": "1.4.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async System.Threading.Tasks.Task TestCreateGetAndDeleteFile() {
System.IO.Stream updatedContentStream = Utils.GenerateByteStream(size: 1024 * 1024);
FileFull uploadedFile = await UploadFileAsync(fileName: newFileName, fileStream: updatedContentStream);
FileFull file = await client.Files.GetFileByIdAsync(fileId: uploadedFile.Id);
await Assert.That.IsExceptionAsync(async() => await client.Files.GetFileByIdAsync(fileId: uploadedFile.Id, queryParams: new GetFileByIdQueryParams() { Fields = Array.AsReadOnly(new [] {"name"}) }, headers: new GetFileByIdHeaders(extraHeaders: new Dictionary<string, string>() { { "if-none-match", file.Etag } })));
await Assert.That.IsExceptionAsync(async() => await client.Files.GetFileByIdAsync(fileId: uploadedFile.Id, queryParams: new GetFileByIdQueryParams() { Fields = Array.AsReadOnly(new [] {"name"}) }, headers: new GetFileByIdHeaders(extraHeaders: new Dictionary<string, string>() { { "if-none-match", NullableUtils.Unwrap(file.Etag) } })));
Assert.IsTrue(file.Name == newFileName);
await client.Files.DeleteFileByIdAsync(fileId: uploadedFile.Id);
TrashFile trashedFile = await client.TrashedFiles.GetTrashedFileByIdAsync(fileId: uploadedFile.Id);
Expand Down

0 comments on commit 73fd87e

Please sign in to comment.