Skip to content

[Storage] STG105 Files GET APIs by File ID - #50629

Open
browndav-msft wants to merge 39 commits into
Azure:feature/storage/stg105basefrom
browndav-msft:stg105/files-by-id
Open

browndav-msft wants to merge 39 commits into
Azure:feature/storage/stg105basefrom
browndav-msft:stg105/files-by-id

Conversation

@browndav-msft

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Sep 29, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
34 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@browndav-msft
browndav-msft changed the base branch from main to feature/storage/stg105base September 29, 2026 22:21
…rides

Extend the Files-by-ID response timestamp directive to Get Hard Links and regenerate its headers. ISO-8601 SMB creation, last-write, and change timestamps cannot be parsed by the RFC 1123 deserializer selected by the shared Swagger.

Research: the pre-existing Java swagger/README.md already overrides these response headers to date-time for directory create/get/set/rename and file create/get/download/set/rename/link operations. Generated FilesGetPropertiesHeaders and DirectoriesCreateHeaders use OffsetDateTime.parse, as does the hand-written FileSmbProperties header mapping. Python's azure-storage-file-share/swagger/README.md instead overrides all three response headers to strings to preserve timestamp precision.

Keep the shared Microsoft.FileStorage/stable/2027-03-07/file.json unchanged: SDKs already apply language-specific handling, and changing existing shared definitions would broaden this feature's compatibility impact. Scope the new Java directives to file/directory properties by ID and Get Hard Links. Preserve previous operations and the RFC 1123 handling of HTTP Date, Last-Modified, and copy-completion timestamps. Generated Java was produced by AutoRest, not manually edited.

The local Files-by-ID mock regressions cover fractional-second timestamps and sync/async file and directory property calls. The hard-link cases exposed the same parser mismatch and now pass with the regenerated model.
Replace the hand-written FileIdOperations REST client with generated
operations in both synchronous and asynchronous clients.

Centralize file-ID validation and addressing-mode guards in ShareErrors.
Reuse property response mapping across path- and ID-addressed requests
while preserving existing path-based behavior.

Add regression coverage for timestamp and metadata mapping, service
errors, and addressing-mode restrictions.
@ibrandes Isabelle (ibrandes) changed the title Stg105/files by id [Storage] STG105 Files GET APIs by File ID Oct 6, 2026
@ibrandes
Isabelle (ibrandes) marked this pull request as ready for review October 6, 2026 20:34

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.

@browndav-msft

Copy link
Copy Markdown
Member Author

/azp run java - storage - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@browndav-msft

Copy link
Copy Markdown
Member Author

/azp run java - storage - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

Comment on lines +239 to +242
ShareFileAsyncClient asyncClient = new ShareFileAsyncClient(azureFileStorageClient, shareName, "", fileId,
snapshot, accountName, serviceVersion, sasToken);
return new ShareFileClient(asyncClient, azureFileStorageClient, shareName, "", fileId, snapshot, accountName,
serviceVersion, sasToken);
``` yaml
use: '@autorest/java@4.1.63'
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/15d7f54a5389d5906ffb4e56bb2f38fe5525c0d3/specification/storage/data-plane/Microsoft.FileStorage/stable/2026-06-06/file.json
input-file: C:\repos\azure-rest-api-specs\specification\storage\data-plane\Microsoft.FileStorage\stable\2027-03-07\file.json

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants