Skip to content

Commit e3475bc

Browse files
authored
Update blob swagger spec to a commit on main branch (#31851)
### Packages impacted by this PR ### Issues associated with this PR ### Describe the problem that is addressed by this PR ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
1 parent 6b0d0e0 commit e3475bc

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

sdk/storage/storage-blob/swagger/README.md

+53-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enable-xml: true
1212
generate-metadata: false
1313
license-header: MICROSOFT_MIT_NO_VERSION
1414
output-folder: ../src/generated
15-
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2d3b08fe43bc4a573acd166d3d2ba0c631b016fb/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json
15+
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/b478dcdabacb37945ff89daa0eda1ae1afc98db4/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json
1616
model-date-time-as-string: true
1717
optional-response-headers: true
1818
v3: true
@@ -1483,4 +1483,56 @@ directive:
14831483
transform: $.enum = [ "2025-01-05" ];
14841484
```
14851485

1486+
### Remove structured body parameters.
1487+
1488+
```yaml
1489+
directive:
1490+
- from: swagger-document
1491+
where: $["x-ms-paths"]["/{containerName}/{blob}]["get"]
1492+
transform: >
1493+
$["parameters"] = $["parameters"].filter(function(param) { return false == param['$ref'].endsWith("#/parameters/StructuredBodyGet")});
1494+
- from: swagger-document
1495+
where: $["x-ms-paths"]["/{containerName}/{blob}"]["get"]["responses"]["200"]["headers"]
1496+
transform: >
1497+
delete $["x-ms-structured-body"];
1498+
delete $["x-ms-structured-content-length"];
1499+
- from: swagger-document
1500+
where: $["x-ms-paths"]["/{containerName}/{blob}"]["get"]["responses"]["200"]["headers"]
1501+
transform: >
1502+
delete $["x-ms-structured-body"];
1503+
delete $["x-ms-structured-content-length"];
1504+
- from: swagger-document
1505+
where: $["x-ms-paths"]["/{containerName}/{blob}?BlockBlob"]["put"]
1506+
transform: >
1507+
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
1508+
- from: swagger-document
1509+
where: $["x-ms-paths"]["/{containerName}/{blob}?BlockBlob"]["put"]["responses"]["201"]["headers"]
1510+
transform: >
1511+
delete $["x-ms-structured-body"];
1512+
- from: swagger-document
1513+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=block"]["put"]
1514+
transform: >
1515+
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
1516+
- from: swagger-document
1517+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=block"]["put"]["responses"]["201"]["headers"]
1518+
transform: >
1519+
delete $["x-ms-structured-body"];
1520+
- from: swagger-document
1521+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&update"]["put"]
1522+
transform: >
1523+
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
1524+
- from: swagger-document
1525+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&update"]["put"]["responses"]["201"]["headers"]
1526+
transform: >
1527+
delete $["x-ms-structured-body"];
1528+
- from: swagger-document
1529+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock"]["put"]
1530+
transform: >
1531+
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
1532+
- from: swagger-document
1533+
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock"]["put"]["responses"]["201"]["headers"]
1534+
transform: >
1535+
delete $["x-ms-structured-body"];
1536+
```
1537+
14861538
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2Fswagger%2FREADME.png)

0 commit comments

Comments
 (0)