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

[wip] Blob tsp #32527

Draft
wants to merge 139 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
9dc72b8
[Storage Blob] Adding TypeSpec
mpodwysocki Feb 27, 2024
09f0582
[storage] Update models
mpodwysocki Feb 27, 2024
4e15d54
[Storage Blob] Updating routes
mpodwysocki Feb 29, 2024
9b04eff
[Storage Blob] Updating routes
mpodwysocki Feb 29, 2024
51a7995
[Storage Blob] Updating routes
mpodwysocki Feb 29, 2024
efe933d
[Storage Blob] Updating routes
mpodwysocki Mar 1, 2024
14b3b8b
[Storage Blob] Updating routes
mpodwysocki Mar 1, 2024
1ea0d3c
[Storage Blob] Updating routes
mpodwysocki Mar 1, 2024
ebe4866
[Storage Blob] Updating routes
mpodwysocki Mar 1, 2024
84e768a
[Storage Blob] Updating routes
mpodwysocki Mar 4, 2024
0a6c716
[storage] Update models
mpodwysocki Mar 4, 2024
d140a2d
[storage] Update models
mpodwysocki Mar 12, 2024
19e85ae
[storage blob] update the routes
mpodwysocki Mar 20, 2024
f2bb784
[storage blob] update the routes
mpodwysocki Mar 20, 2024
4b3e1c1
[storage blob] update the routes
mpodwysocki Mar 21, 2024
cd8cc73
[storage blob] update the routes
mpodwysocki Mar 22, 2024
9e4aea5
[storage blob] update the routes
mpodwysocki Mar 22, 2024
064a4bb
[storage blob] update the routes
mpodwysocki Mar 22, 2024
22e9270
[storage blob] update the routes
mpodwysocki Mar 22, 2024
c42b7aa
[storage blob] update the routes
mpodwysocki Mar 22, 2024
daee537
[storage blob] update the routes
mpodwysocki Mar 25, 2024
04cd1f4
[storage blob] update the routes
mpodwysocki Mar 25, 2024
796e2b4
[storage blob] update the routes
mpodwysocki Mar 25, 2024
88ca308
[storage blob] update the routes
mpodwysocki Mar 25, 2024
6afa7c6
[storage blob] update the routes
mpodwysocki Mar 25, 2024
94e646d
[storage blob] update the routes
mpodwysocki Mar 25, 2024
a174e91
[storage blob] Fix dependencies
mpodwysocki May 6, 2024
cefd1b1
[Storage Blob] Updating routes
mpodwysocki Jul 2, 2024
0ec8fa1
Update blob path parameter
mpodwysocki Aug 23, 2024
8b8e861
tsp format
cperaltah Sep 30, 2024
298ec0b
fix blob path param
cperaltah Sep 30, 2024
48be60a
regen openapi
cperaltah Sep 30, 2024
1be3d63
add suppressions
cperaltah Sep 30, 2024
257ba9c
update code dependency
cperaltah Sep 30, 2024
b8b9fce
remove package.json + lock
cperaltah Oct 1, 2024
10c390d
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Oct 1, 2024
ccae6a2
fix query params
cperaltah Oct 1, 2024
d0ab6a1
fix versioning
cperaltah Oct 1, 2024
c136d53
refactor interface usage, fix operation ids
cperaltah Oct 1, 2024
e6d535e
tcgc cleanup
cperaltah Oct 2, 2024
5c61884
import cleanup
cperaltah Oct 2, 2024
7873ad4
update namespace
cperaltah Oct 2, 2024
25ca894
remove old versions
cperaltah Oct 2, 2024
a4a967e
update tspconfig.yaml
cperaltah Oct 2, 2024
8c613c6
fix versions, regen openapi
cperaltah Oct 2, 2024
e18f785
add template
cperaltah Oct 2, 2024
57eb072
clean up headers
cperaltah Oct 2, 2024
e12aa8d
use template, regen
cperaltah Oct 2, 2024
3bb504e
remove operation id suppressions
cperaltah Oct 2, 2024
036cd02
clientName clean up
cperaltah Oct 2, 2024
fda2a85
clean up headers and template
cperaltah Oct 8, 2024
e112ea6
add rust configs
cperaltah Oct 10, 2024
e914450
clean up and fix models
cperaltah Oct 10, 2024
95ee3bf
fix routes
cperaltah Oct 10, 2024
982a089
regen openapi
cperaltah Oct 10, 2024
8eb9093
add content type to template
cperaltah Oct 12, 2024
94198b5
revert - package.json update
cperaltah Oct 14, 2024
fde1cac
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Oct 17, 2024
c617d51
rename endpoint param
cperaltah Oct 18, 2024
ff84cd4
move version param to client init
cperaltah Oct 18, 2024
b13c9b9
model corrections
cperaltah Oct 18, 2024
de02b79
update routes and openapi
cperaltah Oct 18, 2024
bc242e5
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Oct 18, 2024
0a6102e
remove incorrect file changes
cperaltah Oct 18, 2024
6b9b4cc
undo package json changes
cperaltah Oct 18, 2024
ef9d940
add missing param
cperaltah Oct 19, 2024
99e5fe6
fix tspconfig.yaml example dir
cperaltah Oct 19, 2024
7e2a473
specify page response
cperaltah Oct 19, 2024
5b05774
add missing header
cperaltah Oct 19, 2024
6cd92ae
more spec fixes
cperaltah Oct 19, 2024
45619c6
more spec fixes - container interface
cperaltah Oct 19, 2024
e1ba1b9
specify client parameters
cperaltah Oct 19, 2024
332aa5d
regen openapi
cperaltah Oct 19, 2024
d0dea81
fix blob interface operations
cperaltah Oct 22, 2024
3168d17
regen openapi
cperaltah Oct 22, 2024
3ca03d4
fix pageblob operations
cperaltah Oct 23, 2024
1010181
move base blob interface route to each operation
cperaltah Oct 23, 2024
6096fcd
use template where possible
cperaltah Oct 23, 2024
6d0e3b6
fix appendblob operations
cperaltah Oct 31, 2024
86a034c
fix NextMarker casing
cperaltah Oct 31, 2024
3cfa98c
regen openapi
cperaltah Oct 31, 2024
75db1c6
update blockblob operations
cperaltah Oct 31, 2024
56b3896
clean up more models and routes
cperaltah Nov 1, 2024
5e27b40
accuracy updates
cperaltah Nov 5, 2024
43bae19
add placeholders for metadata and object replication headers
cperaltah Nov 6, 2024
2df5bfa
update multipart/mixed content type
cperaltah Nov 6, 2024
a042e47
update to 2025-01-05 api version
cperaltah Nov 6, 2024
da04a91
reset swagger
cperaltah Nov 6, 2024
e3360bc
tspconfig.yaml updates
cperaltah Nov 6, 2024
a663167
example placeholder
cperaltah Nov 6, 2024
e2860b8
fix collection headers
cperaltah Nov 6, 2024
8e0d1c4
fixes
cperaltah Nov 12, 2024
9fa8f5c
revert wip
cperaltah Dec 4, 2024
ed5b4b8
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Dec 10, 2024
901f28a
regen openapi
cperaltah Dec 11, 2024
40b2360
add continuation token decorator
cperaltah Jan 4, 2025
0612495
simplify spec
cperaltah Jan 4, 2025
19f80ab
add linter suppression
cperaltah Jan 4, 2025
c93a8a3
regen openapi
cperaltah Jan 4, 2025
cd6164d
clean up
cperaltah Jan 4, 2025
f70d5fc
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Jan 4, 2025
56b8e1b
regen openapi
cperaltah Jan 4, 2025
444d799
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Jan 6, 2025
9972f75
use apiVersion decorator
cperaltah Jan 6, 2025
5af211e
add typespec/xml to package.json
cperaltah Jan 6, 2025
f9b9dc7
remove duplicate x-ms-version headers
jhendrixMSFT Jan 8, 2025
55d0cae
spelling
cperaltah Jan 8, 2025
d1868de
comment out @pagedResult decorator
cperaltah Jan 8, 2025
d8e7165
spelling + openapi regen
cperaltah Jan 8, 2025
e11ada6
update SignedIdentifiers
cperaltah Jan 8, 2025
8be8f66
clean up
cperaltah Jan 10, 2025
51553f8
clean up
cperaltah Jan 10, 2025
3c1dc53
remove containerName param from client
cperaltah Jan 15, 2025
8937e56
add client customizations
cperaltah Jan 15, 2025
d8d0c7c
add other interfaces
cperaltah Jan 17, 2025
0982127
clean up some doc comments
jhendrixMSFT Jan 17, 2025
085ed01
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Jan 24, 2025
b2db3e4
add missing x-ms-blob-type header
jhendrixMSFT Feb 3, 2025
643e2cd
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Feb 8, 2025
1021c5b
update lock file
cperaltah Feb 8, 2025
47dd493
Merge branch 'feature/blob-tsp' of https://github.com/Azure/azure-res…
cperaltah Feb 8, 2025
d218e6e
regen openapi
cperaltah Feb 8, 2025
05a7704
update blob type
cperaltah Feb 12, 2025
7104303
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cperaltah Feb 12, 2025
308f6b4
add missing content type for appendBlock
jhendrixMSFT Feb 18, 2025
0583c50
Add initial crate-version, rename package-dir and crate-name (#32687)
vincenttran-msft Feb 19, 2025
469022d
make request and response media types configurable
jhendrixMSFT Feb 19, 2025
7171d96
fix client naming for x-ms-meta and x-ms-or headers for Rust
jhendrixMSFT Feb 20, 2025
1530d96
fix headers that contain time stamps
jhendrixMSFT Feb 20, 2025
c7a7a98
consolidate redundant response headers
jhendrixMSFT Feb 20, 2025
e5bdccb
fix getBlockList
jhendrixMSFT Feb 20, 2025
1348546
suppress swagger lint error
cperaltah Feb 21, 2025
1468fa9
update namespace structure + client customizations
cperaltah Feb 22, 2025
95265d4
openapi
cperaltah Feb 22, 2025
1239c76
fix service operations
cperaltah Feb 22, 2025
b185501
clean up routes
cperaltah Feb 22, 2025
3e04784
update suppression
cperaltah Feb 22, 2025
8f64ced
update refs to blob namespace
cperaltah Feb 24, 2025
617c74d
nest append/block/page blobs under container
jhendrixMSFT Feb 24, 2025
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check failure on line 1 in package.json

View workflow job for this annotation

GitHub Actions / Protected Files

File 'package.json' should only be updated by the Azure SDK team. If intentional, the PR may be merged by the Azure SDK team via bypassing the branch protections.
"name": "azure-rest-api-specs",
"devDependencies": {
"@azure-tools/typespec-apiview": "0.5.0",
Expand Down Expand Up @@ -31,4 +31,4 @@
"npm": ">=9.0.0"
},
"private": true
}
}
70 changes: 70 additions & 0 deletions specification/storage/Microsoft.BlobStorage/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using TypeSpec.Http;
using Azure.ClientGenerator.Core;
using Storage.Blob;

namespace Customizations;

/** Parameters to be added in client constructors */
model BlobServiceClientParameters {
...ContainerNamePathParameter;
...BlobPathParameter;
}

@@clientNamespace(Storage.Blob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.Blob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.AppendBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.BlockBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.PageBlob, "Azure.Storage.Blobs");

@@clientName(Storage.Blob, "ServiceClient");

@@clientInitialization(Storage.Blob.Container,
{
parameters: ContainerNamePathParameter,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.Blob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.AppendBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.BlockBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.PageBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);

@@clientName(ContainerProperties.denyEncryptionScopeOverride,
"PreventEncryptionScopeOverride"
);
@@clientName(ContainerProperties.immutableStorageWithVersioningEnabled,
"IsImmutableStorageWithVersioningEnabled"
);
@@clientName(BlobPropertiesInternal.expiryTime, "ExpiresOn");
@@clientName(BlobPropertiesInternal.sealed, "IsSealed");
@@clientName(BlobPropertiesInternal.lastAccessTime, "LastAccessedOn");
@@clientName(BlobPropertiesInternal.immutabilityPolicyUntilDate,
"ImmutabilityPolicyExpiresOn"
);

@@clientName(MetadataHeaders, "metadata", "rust");
@@clientName(ObjectReplicationHeaders, "objectReplicationHeaders", "rust");
41 changes: 41 additions & 0 deletions specification/storage/Microsoft.BlobStorage/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "./routes.tsp";

using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;

@useAuth(
ApiKeyAuth<ApiKeyLocation.header, "api-key"> | OAuth2Auth<[
{
type: OAuth2FlowType.implicit,
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize",
scopes: ["https://storage.azure.com/.default"],
}
]>
)
@service({
title: "Azure Storage Blob service",
})
@server(
"{url}",
"The host name of the blob storage account, e.g. accountName.blob.core.windows.net",
{
@doc("The host name of the blob storage account, e.g. accountName.blob.core.windows.net")
url: url,
}
)
@versioned(Versions)
namespace Storage.Blob;

#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Following standard typespec recommendation"
#suppress "@azure-tools/typespec-azure-core/no-enum" "Following standard typespec recommendation"
@doc("The Azure.Storage.Blob service versions.")
enum Versions {
@doc("The 2025-01-05 version of the Azure.Storage.Blob service.")
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2025_01_05: "2025-01-05",
}
Loading
Loading