package-name: azure-storage-datalake
title: StorageClient
description: Storage Client
enable-xml: true
generate-metadata: false
license-header: MICROSOFT_MIT_NO_VERSION
output-folder: ../src/generated
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0b1123325e02aa5515ed7641923a8f7a6c8b545a/specification/storage/data-plane/Azure.Storage.Files.DataLake/preview/2021-06-08/DataLakeStorage.json
model-date-time-as-string: true
optional-response-headers: true
v3: true
disable-async-iterators: true
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210223.1"
package-version: 12.11.0
See the AutoRest samples for more about how we're customizing things.
directive:
- from: swagger-document
where: $["x-ms-paths"]
transform: >
for (const property in $)
{
if (property.includes('/{filesystem}/{path}'))
{
$[property]["parameters"] = $[property]["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/FileSystem") && false == param['$ref'].endsWith("#/parameters/Path"))});
}
else if (property.includes('/{filesystem}'))
{
$[property]["parameters"] = $[property]["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/FileSystem"))});
}
}
directive:
- from: swagger-document
where: $.info["x-ms-code-generation-settings"]
transform: >
$.name = "StorageClient"
directive:
- from: swagger-document
where: $.parameters
transform: >
$.FileSystem = undefined
directive:
- from: swagger-document
where: $.parameters
transform: >
$.Path = undefined
directive:
- from: swagger-document
where: $["parameters"].PathSetAccessControlRecursiveMode
transform: >
$["x-ms-parameter-location"] = "method";
directive:
- from: swagger-document
where: $.parameters
transform: >
$.CacheControl["x-ms-parameter-grouping"].name = "path-Http-headers";
$.ContentDisposition["x-ms-parameter-grouping"].name = "path-Http-headers";
$.ContentEncoding["x-ms-parameter-grouping"].name = "path-Http-headers";
$.ContentLanguage["x-ms-parameter-grouping"].name = "path-Http-headers";
$.ContentType["x-ms-parameter-grouping"].name = "path-Http-headers";
$.TransactionalContentMD5["x-ms-parameter-grouping"].name = "path-Http-headers";
$.ContentMD5["x-ms-parameter-grouping"].name = "path-Http-headers";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"].head.responses["200"].headers["x-ms-acl"]
transform: >
$["x-ms-client-name"] = "acl";
directive:
- from: swagger-document
where: $.definitions
transform: >
$.FileSystem.properties.lastModified.format = "date-time-rfc1123";
$.Path.properties.lastModified.format = "date-time-rfc1123";
directive:
- from: swagger-document
where: $["x-ms-paths"]..responses..headers["ETag"]
transform: >
$["x-ms-client-name"] = "etag";
- from: swagger-document
where: $["definitions"]..["eTag"]
transform: >
$["x-ms-client-name"] = "etag";
directive:
- from: swagger-document
where: $["parameters"].PathSetAccessControlRecursiveMode
transform: >
$["x-ms-parameter-location"] = "method";
directive:
- from: swagger-document
where: $.definitions.StorageError
transform: >
$.properties.Code = { "type": "string" };
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"]["put"]["responses"]["201"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"]["delete"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}?comp=expiry"]["put"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}?resource=filesystem"]["get"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"]["patch"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"]["patch"]["responses"]["202"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}/{path}"]["head"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["parameters"].PathExpiryOptions
transform: >
delete $["x-ms-enum"]["modelAsString"];
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}?restype=container&comp=list&hierarchy"]["get"]["responses"]["200"]["headers"]
transform: >
$["x-ms-error-code"] = {};
$["x-ms-error-code"]["x-ms-client-name"] = "ErrorCode";
$["x-ms-error-code"]["type"] = "string";
$["x-ms-error-code"]["description"] = "Error Code";
directive:
- from: swagger-document
where: $["x-ms-paths"]["/{filesystem}?restype=container&comp=list&hierarchy"]["get"]
transform: >
delete $["x-ms-pageable"];
directive:
- from: swagger-document
where: $["definitions"]["BlobItemInternal"]
transform: >
$["x-ms-client-name"] = "BlobItemModel";
directive:
- from: swagger-document
where: $["definitions"]["BlobPropertiesInternal"]
transform: >
$["x-ms-client-name"] = "BlobPropertiesModel";
directive:
- from: swagger-document
where: $["definitions"]["BlobPropertiesInternal"]
transform: >
delete $["properties"]["Sealed"]["x-ms-client-name"];
directive:
- from: swagger-document
where: $["definitions"]["BlobPropertiesInternal"]
transform: >
delete $["properties"]["DeleteTime"]
directive:
- from: swagger-document
where: $.parameters.EncryptionAlgorithm
transform: >
$["x-ms-enum"]["modelAsString"] = true;
directive:
- from: swagger-document
where: $.parameters
transform: >
delete $.EncryptionAlgorithm.enum;
$.EncryptionAlgorithm.enum = [
"None",
"AES256"
];
directive:
- from: swagger-document
where: $.parameters.ApiVersionParameter
transform: $.enum = [ "2021-10-04" ];