Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions sdk/storage/azure-storage-files-shares/src/rest_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) AutoRest C++ Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
#include <azure/storage/files/shares/rest_client.hpp>

#include <algorithm>
Expand Down Expand Up @@ -2569,13 +2568,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
response.FileAttributes = pRawResponse->GetHeaders().at("x-ms-file-attributes");
response.FileCreationTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-creation-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileLastWriteTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-last-write-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileChangeTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-change-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileId = pRawResponse->GetHeaders().at("x-ms-file-id");
response.FileParentId = pRawResponse->GetHeaders().at("x-ms-file-parent-id");
return Response<Models::_detail::RenameDirectoryResult>(
Expand Down Expand Up @@ -3926,13 +3925,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
response.FileAttributes = pRawResponse->GetHeaders().at("x-ms-file-attributes");
response.FileCreationTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-creation-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileLastWriteTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-last-write-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileChangeTime = DateTime::Parse(
pRawResponse->GetHeaders().at("x-ms-file-change-time"),
Azure::DateTime::DateFormat::Rfc1123);
Azure::DateTime::DateFormat::Rfc3339);
response.FileId = pRawResponse->GetHeaders().at("x-ms-file-id");
response.FileParentId = pRawResponse->GetHeaders().at("x-ms-file-parent-id");
return Response<Models::_detail::RenameFileResult>(
Expand Down
20 changes: 19 additions & 1 deletion sdk/storage/azure-storage-files-shares/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -967,4 +967,22 @@ directive:
where: $["x-ms-paths"]["/{shareName}/{directory}/{fileName}?comp=lease&break"].put.responses["202"].headers
transform: >
delete $["x-ms-lease-id"];
```
```

### RenameFile/Directory

```yaml
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{shareName}/{directory}/{fileName}?comp=rename"].put.responses["200"].headers
transform: >
$["x-ms-file-creation-time"].format = "date-time";
$["x-ms-file-last-write-time"].format = "date-time";
$["x-ms-file-change-time"].format = "date-time";
- from: swagger-document
where: $["x-ms-paths"]["/{shareName}/{directory}?restype=directory&comp=rename"].put.responses["200"].headers
transform: >
$["x-ms-file-creation-time"].format = "date-time";
$["x-ms-file-last-write-time"].format = "date-time";
$["x-ms-file-change-time"].format = "date-time";
```