Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blob swagger spec to a commit on main branch #31851

Merged
merged 1 commit into from
Nov 20, 2024
Merged
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
54 changes: 53 additions & 1 deletion sdk/storage/storage-blob/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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/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
optional-response-headers: true
v3: true
Expand Down Expand Up @@ -1483,4 +1483,56 @@ directive:
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)
Loading