Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rename ContainerClient file upload methods to UploadContainerFile#1138

Merged
joseharriaga merged 5 commits into
mainfrom
copilot/rename-containerclient-createcontainerfile
May 11, 2026
Merged

Rename ContainerClient file upload methods to UploadContainerFile#1138
joseharriaga merged 5 commits into
mainfrom
copilot/rename-containerclient-createcontainerfile

Conversation

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

This updates ContainerClient to use upload-oriented naming for container file writes, aligning the API with DownloadContainerFile and the rest of the library’s file semantics. The change is limited to the container file upload surface and its generated/public API projections.

  • API surface

    • Renames CreateContainerFileUploadContainerFile
    • Renames CreateContainerFileAsyncUploadContainerFileAsync
    • Applies the rename through the container client TypeSpec customization so generated and public API surfaces stay consistent
  • Generated client updates

    • Regenerates ContainerClient and its REST request factory to use the new method names
    • Updates exported API baselines for all target frameworks
  • Tests and docs

    • Updates container tests to call the renamed methods
  • Example

    var formData = new MultiPartFormDataBinaryContent();
    formData.Add(contentBytes, "file", "example.txt", "text/plain");
    
    ClientResult result =
        await client.UploadContainerFileAsync(containerId, formData, formData.ContentType);

Copilot AI changed the title [WIP] Rename CreateContainerFile operation to UploadContainerFile Rename ContainerClient file upload methods to UploadContainerFile Apr 30, 2026
Copilot AI requested a review from joseharriaga April 30, 2026 02:12
@joseharriaga

Copy link
Copy Markdown
Collaborator

@copilot Please revert the CHANGELOG for now. We will modify it later in a separate PR.

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

@joseharriaga I've opened a new pull request, #1139, to work on those changes. Once the pull request is ready, I'll request review from you.

…#1139)

* Initial plan

* Revert CHANGELOG.md changes

Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/a8c8f038-a66a-4a22-9467-318cc94a0ff0

Co-authored-by: joseharriaga <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joseharriaga <[email protected]>
@joseharriaga

Copy link
Copy Markdown
Collaborator

@copilot Sync to the latest from main and resolve the merge conflicts.

…nerclient-createcontainerfile

Co-authored-by: joseharriaga <[email protected]>

Copilot AI commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please revert the CHANGELOG for now. We will modify it later in a separate PR.

Handled in f2860c4CHANGELOG.md is reverted on this branch.

@copilot Sync to the latest from main and resolve the merge conflicts.

Synced this branch to the latest main in d7fab22. The merge completed cleanly and the container tests still pass in Playback mode.

@joseharriaga joseharriaga marked this pull request as ready for review May 4, 2026 22:50
@joseharriaga joseharriaga requested a review from christothes as a code owner May 4, 2026 22:50
Copilot AI review requested due to automatic review settings May 4, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the container file creation/upload protocol methods on ContainerClient from CreateContainerFile* to UploadContainerFile* to better match the library’s download/file semantics, and propagates that rename through TypeSpec customization, generated code, tests, and the exported public API baselines.

Changes:

  • Renamed ContainerClient.CreateContainerFile/CreateContainerFileAsync to UploadContainerFile/UploadContainerFileAsync via TypeSpec @@clientName.
  • Regenerated the ContainerClient implementation and REST request factory to use the new method names.
  • Updated container tests and API baseline exports to reflect the renamed methods.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Containers/ContainerTests.cs Updates tests to call UploadContainerFileAsync instead of CreateContainerFileAsync.
specification/client/containers.client.tsp Applies TypeSpec @@clientName rename for the container file upload operation.
OpenAI/src/Generated/ContainerClient.RestClient.cs Renames the generated request factory method to CreateUploadContainerFileRequest.
OpenAI/src/Generated/ContainerClient.cs Renames the generated protocol methods to UploadContainerFile* and updates internal call sites.
api/OpenAI.netstandard2.0.cs Updates exported public API baselines to remove CreateContainerFile* and add UploadContainerFile*.
api/OpenAI.net8.0.cs Updates exported public API baselines to remove CreateContainerFile* and add UploadContainerFile*.
api/OpenAI.net10.0.cs Updates exported public API baselines to remove CreateContainerFile* and add UploadContainerFile*.

Comment thread specification/client/containers.client.tsp
Comment thread tests/Containers/ContainerTests.cs Outdated
@joseharriaga joseharriaga merged commit 53c8c37 into main May 11, 2026
4 checks passed
@joseharriaga joseharriaga deleted the copilot/rename-containerclient-createcontainerfile branch May 11, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename ContainerClient's CreateContainerFile operation to UploadContainerFile

4 participants