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: 15 additions & 0 deletions specification/storage/Microsoft.BlobStorage/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ interface PageBlobClient extends Storage.Blob.PageBlob {}
uint64,
"rust"
);
// Range/source-range string parameters → HttpRange for Rust
@@alternateType(Blob.download::parameters.range, HttpRange, "rust");
@@alternateType(RangeParameter.range, HttpRange, "rust");
@@alternateType(RangeParameterRequired.range, HttpRange, "rust");
@@alternateType(SourceRangeParameter.sourceRange, HttpRange, "rust");
@@alternateType(SourceRangeParameterRequired.sourceRange, HttpRange, "rust");

@@scope(Storage.Blob.Container.submitBatch, "!rust");
@@scope(Storage.Blob.Service.submitBatch, "!rust");
Expand Down Expand Up @@ -935,3 +941,12 @@ op setAccessPolicyRequiredContainerAcl is StorageOperationNoBody<
setAccessPolicyRequiredContainerAcl,
"rust"
);

/** An HTTP byte range, e.g. "bytes=0-1023". */
@alternateType(
{
identity: "crate::models::HttpRange",
},
"rust"
)
scalar HttpRange extends string;
14 changes: 14 additions & 0 deletions specification/storage/Microsoft.BlobStorage/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,13 @@ alias SourceRangeParameter = {
sourceRange?: string;
};

/** The required source range parameter. */
alias SourceRangeParameterRequired = {
/** Bytes of source data in the specified range. */
@header("x-ms-source-range")
sourceRange: string;
};

/** The source URL parameter. */
alias SourceUrlParameter = {
/** Specify a URL to the copy source. */
Expand Down Expand Up @@ -2486,6 +2493,13 @@ alias RangeParameter = {
range?: string;
};

/** The required range parameter. */
alias RangeParameterRequired = {
/** Bytes of data in the specified range. */
@header("Range")
range: string;
};

/** The version ID parameter. */
alias VersionIdParameter = {
/** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */
Expand Down
29 changes: 8 additions & 21 deletions specification/storage/Microsoft.BlobStorage/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,10 @@ interface Blob {
...EncryptionKeySha256Parameter,
...EncryptionAlgorithmParameter,
...IfTagsParameter,
...ConditionalRequestHeaders,
...IfModifiedSinceParameter,
...IfUnmodifiedSinceParameter,
...IfNoneMatchParameter,
...IfMatchParameter,
Comment on lines +704 to +707
Copy link
Copy Markdown
Member

@catalinaperalta catalinaperalta Apr 24, 2026

Choose a reason for hiding this comment

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

Are the headers in the Azure.Core.ConditionalRequestHeaders not typed with etag? That's the reason for this update?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll open an issue to get this fixed in the azure.core types

): (BodyParameter & {
/** The media type of the body of the response. */
@header("Content-Type")
Expand Down Expand Up @@ -1544,11 +1547,7 @@ interface PageBlob {
...ContentMd5Parameter;
...ContentCrc64Parameter;
...TimeoutParameter;

/** Bytes of data in the specified range. */
@header("Range")
range: string;

...RangeParameterRequired;
...LeaseIdOptionalParameter;
...EncryptionKeyParameter;
...EncryptionKeySha256Parameter;
Expand Down Expand Up @@ -1595,11 +1594,7 @@ interface PageBlob {
contentLength: 0;

...TimeoutParameter;

/** Bytes of data in the specified range. */
@header("Range")
range: string;

...RangeParameterRequired;
...LeaseIdOptionalParameter;
...EncryptionKeyParameter;
...EncryptionKeySha256Parameter;
Expand Down Expand Up @@ -1635,20 +1630,12 @@ interface PageBlob {
uploadPagesFromUrl is StorageOperationNoBody<
{
...SourceUrlParameter;

/** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */
@header("x-ms-source-range")
sourceRange: string;

...SourceRangeParameterRequired;
...SourceContentMd5Parameter;
...SourceContentCrc64Parameter;
...ContentLengthParameter;
...TimeoutParameter;

/** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */
@header("Range")
range: string;

...RangeParameterRequired;
...EncryptionKeyParameter;
...EncryptionKeySha256Parameter;
...EncryptionAlgorithmParameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,38 @@
"x-ms-client-name": "ifTags"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch"
"name": "If-Modified-Since",
"in": "header",
"description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.",
"required": false,
"type": "string",
"format": "date-time-rfc7231",
"x-ms-client-name": "ifModifiedSince"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch"
"name": "If-Unmodified-Since",
"in": "header",
"description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.",
"required": false,
"type": "string",
"format": "date-time-rfc7231",
"x-ms-client-name": "ifUnmodifiedSince"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince"
"name": "If-None-Match",
"in": "header",
"description": "A condition that must be met in order for the request to be processed.",
"required": false,
"type": "string",
"x-ms-client-name": "ifNoneMatch"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince"
"name": "If-Match",
"in": "header",
"description": "A condition that must be met in order for the request to be processed.",
"required": false,
"type": "string",
"x-ms-client-name": "ifMatch"
}
],
"responses": {
Expand Down Expand Up @@ -7465,7 +7487,7 @@
{
"name": "x-ms-source-range",
"in": "header",
"description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.",
"description": "Bytes of source data in the specified range.",
"required": true,
"type": "string",
"x-ms-client-name": "sourceRange"
Expand Down Expand Up @@ -7509,7 +7531,7 @@
{
"name": "Range",
"in": "header",
"description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.",
"description": "Bytes of data in the specified range.",
"required": true,
"type": "string",
"x-ms-client-name": "range"
Expand Down Expand Up @@ -17951,44 +17973,5 @@
"format": "byte"
}
},
"parameters": {
"Azure.Core.ConditionalRequestHeaders.ifMatch": {
"name": "If-Match",
"in": "header",
"description": "The request should only proceed if an entity matches this string.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifMatch"
},
"Azure.Core.ConditionalRequestHeaders.ifModifiedSince": {
"name": "If-Modified-Since",
"in": "header",
"description": "The request should only proceed if the entity was modified after this time.",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifModifiedSince"
},
"Azure.Core.ConditionalRequestHeaders.ifNoneMatch": {
"name": "If-None-Match",
"in": "header",
"description": "The request should only proceed if no entity matches this string.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifNoneMatch"
},
"Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": {
"name": "If-Unmodified-Since",
"in": "header",
"description": "The request should only proceed if the entity was not modified after this time.",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifUnmodifiedSince"
}
}
"parameters": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,38 @@
"x-ms-client-name": "ifTags"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch"
"name": "If-Modified-Since",
"in": "header",
"description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.",
"required": false,
"type": "string",
"format": "date-time-rfc7231",
"x-ms-client-name": "ifModifiedSince"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch"
"name": "If-Unmodified-Since",
"in": "header",
"description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.",
"required": false,
"type": "string",
"format": "date-time-rfc7231",
"x-ms-client-name": "ifUnmodifiedSince"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince"
"name": "If-None-Match",
"in": "header",
"description": "A condition that must be met in order for the request to be processed.",
"required": false,
"type": "string",
"x-ms-client-name": "ifNoneMatch"
},
{
"$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince"
"name": "If-Match",
"in": "header",
"description": "A condition that must be met in order for the request to be processed.",
"required": false,
"type": "string",
"x-ms-client-name": "ifMatch"
}
],
"responses": {
Expand Down Expand Up @@ -7465,7 +7487,7 @@
{
"name": "x-ms-source-range",
"in": "header",
"description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.",
"description": "Bytes of source data in the specified range.",
"required": true,
"type": "string",
"x-ms-client-name": "sourceRange"
Expand Down Expand Up @@ -7509,7 +7531,7 @@
{
"name": "Range",
"in": "header",
"description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.",
"description": "Bytes of data in the specified range.",
"required": true,
"type": "string",
"x-ms-client-name": "range"
Expand Down Expand Up @@ -18033,44 +18055,5 @@
"format": "byte"
}
},
"parameters": {
"Azure.Core.ConditionalRequestHeaders.ifMatch": {
"name": "If-Match",
"in": "header",
"description": "The request should only proceed if an entity matches this string.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifMatch"
},
"Azure.Core.ConditionalRequestHeaders.ifModifiedSince": {
"name": "If-Modified-Since",
"in": "header",
"description": "The request should only proceed if the entity was modified after this time.",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifModifiedSince"
},
"Azure.Core.ConditionalRequestHeaders.ifNoneMatch": {
"name": "If-None-Match",
"in": "header",
"description": "The request should only proceed if no entity matches this string.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifNoneMatch"
},
"Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": {
"name": "If-Unmodified-Since",
"in": "header",
"description": "The request should only proceed if the entity was not modified after this time.",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-parameter-location": "method",
"x-ms-client-name": "ifUnmodifiedSince"
}
}
"parameters": {}
}
Loading
Loading