Skip to content

Commit

Permalink
[Batch] Switch contentLength from int64 to string (#29656)
Browse files Browse the repository at this point in the history
This is a breaking change, but accurately reflects what the Batch
service has always returned for this property.
  • Loading branch information
dpwatrous authored Jul 17, 2024
1 parent 46de0ae commit b9c724d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion specification/batch/Azure.Batch/common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ alias FileResponseHeaders = {

@header("Content-Length")
@doc("The length of the file.")
contentLength: int64;
contentLength: string;

...BatchEtagResponseHeaders;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentLength": "1813",
"contentType": "application/octet-stream"
}
},
Expand All @@ -37,7 +37,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentLength": "0",
"contentType": "application/octet-stream"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentLength": "1813",
"contentType": "application/octet-stream"
}
},
Expand All @@ -32,7 +32,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentLength": "0",
"contentType": "application/octet-stream"
}
}
Expand Down
2 changes: 1 addition & 1 deletion specification/batch/Azure.Batch/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ model FileProperties {
lastModified: utcDateTime;

@doc("The length of the file.")
contentLength: int64;
contentLength: string;

@doc("The content type of the file.")
contentType?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2570,8 +2570,7 @@
},
"headers": {
"Content-Length": {
"type": "integer",
"format": "int64",
"type": "string",
"description": "The length of the file."
},
"ETag": {
Expand Down Expand Up @@ -2815,8 +2814,7 @@
"description": "The request has succeeded.",
"headers": {
"Content-Length": {
"type": "integer",
"format": "int64",
"type": "string",
"description": "The length of the file."
},
"ETag": {
Expand Down Expand Up @@ -7031,8 +7029,7 @@
},
"headers": {
"Content-Length": {
"type": "integer",
"format": "int64",
"type": "string",
"description": "The length of the file."
},
"ETag": {
Expand Down Expand Up @@ -7276,8 +7273,7 @@
"description": "The request has succeeded.",
"headers": {
"Content-Length": {
"type": "integer",
"format": "int64",
"type": "string",
"description": "The length of the file."
},
"ETag": {
Expand Down Expand Up @@ -14502,8 +14498,7 @@
"description": "The time at which the file was last modified."
},
"contentLength": {
"type": "integer",
"format": "int64",
"type": "string",
"description": "The length of the file."
},
"contentType": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentLength": "1813",
"contentType": "application/octet-stream"
}
},
Expand All @@ -37,7 +37,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentLength": "0",
"contentType": "application/octet-stream"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentLength": "1813",
"contentType": "application/octet-stream"
}
},
Expand All @@ -32,7 +32,7 @@
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentLength": "0",
"contentType": "application/octet-stream"
}
}
Expand Down

0 comments on commit b9c724d

Please sign in to comment.