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)
This commit is contained in:
Родитель
6b0d0e049e
Коммит
e3475bc17b
|
@ -12,7 +12,7 @@ enable-xml: true
|
||||||
generate-metadata: false
|
generate-metadata: false
|
||||||
license-header: MICROSOFT_MIT_NO_VERSION
|
license-header: MICROSOFT_MIT_NO_VERSION
|
||||||
output-folder: ../src/generated
|
output-folder: ../src/generated
|
||||||
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2d3b08fe43bc4a573acd166d3d2ba0c631b016fb/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json
|
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/b478dcdabacb37945ff89daa0eda1ae1afc98db4/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json
|
||||||
model-date-time-as-string: true
|
model-date-time-as-string: true
|
||||||
optional-response-headers: true
|
optional-response-headers: true
|
||||||
v3: true
|
v3: true
|
||||||
|
@ -1483,4 +1483,56 @@ directive:
|
||||||
transform: $.enum = [ "2025-01-05" ];
|
transform: $.enum = [ "2025-01-05" ];
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Remove structured body parameters.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
directive:
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}]["get"]
|
||||||
|
transform: >
|
||||||
|
$["parameters"] = $["parameters"].filter(function(param) { return false == param['$ref'].endsWith("#/parameters/StructuredBodyGet")});
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}"]["get"]["responses"]["200"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
delete $["x-ms-structured-content-length"];
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}"]["get"]["responses"]["200"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
delete $["x-ms-structured-content-length"];
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?BlockBlob"]["put"]
|
||||||
|
transform: >
|
||||||
|
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?BlockBlob"]["put"]["responses"]["201"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=block"]["put"]
|
||||||
|
transform: >
|
||||||
|
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=block"]["put"]["responses"]["201"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&update"]["put"]
|
||||||
|
transform: >
|
||||||
|
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&update"]["put"]["responses"]["201"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock"]["put"]
|
||||||
|
transform: >
|
||||||
|
$["parameters"] = $["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/StructuredBodyPut") && false == param['$ref'].endsWith("#/parameters/StructuredContentLength"))});
|
||||||
|
- from: swagger-document
|
||||||
|
where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock"]["put"]["responses"]["201"]["headers"]
|
||||||
|
transform: >
|
||||||
|
delete $["x-ms-structured-body"];
|
||||||
|
```
|
||||||
|
|
||||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2Fswagger%2FREADME.png)
|
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2Fswagger%2FREADME.png)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче