Skip to content

Commit 4504957

Browse files
committed
add change for storage blob
1 parent f0f1de5 commit 4504957

File tree

8 files changed

+17132
-9038
lines changed

8 files changed

+17132
-9038
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
indent_style = space
6+
end_of_line = lf
7+
insert_final_newline = true
8+
charset = utf-8
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "./main.tsp";
3+
4+
using Azure.ClientGenerator.Core;
5+
using Storage.Blob;
6+
7+
@@clientName(ContainerProperties.denyEncryptionScopeOverride,
8+
"PreventEncryptionScopeOverride"
9+
);
10+
@@clientName(ContainerProperties.immutableStorageWithVersioningEnabled,
11+
"IsImmutableStorageWithVersioningEnabled"
12+
);
13+
@@clientName(BlobPropertiesInternal.expiryTime, "ExpiresOn");
14+
@@clientName(BlobPropertiesInternal.sealed, "IsSealed");
15+
@@clientName(BlobPropertiesInternal.immutabilityPolicyUntilDate,
16+
"ImmutabilityPolicyExpiresOn"
17+
);
18+
@@clientName(PremiumPageBlobAccessTierOptional.accessTier, "tier");
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import "@typespec/rest";
2+
import "@typespec/versioning";
3+
import "@azure-tools/typespec-azure-core";
4+
import "./routes.tsp";
5+
6+
using TypeSpec.Http;
7+
using TypeSpec.Rest;
8+
using TypeSpec.Versioning;
9+
using Azure.Core;
10+
11+
@useAuth(
12+
ApiKeyAuth<ApiKeyLocation.header, "api-key"> | OAuth2Auth<[
13+
{
14+
type: OAuth2FlowType.implicit,
15+
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize",
16+
scopes: ["https://storage.azure.com/.default"],
17+
}
18+
]>
19+
)
20+
@service({
21+
title: "Azure Storage Blob service",
22+
})
23+
@server(
24+
"{endpoint}",
25+
"The host name of the blob storage account, e.g. accountName.blob.core.windows.net",
26+
{
27+
@doc("The host name of the blob storage account, e.g. accountName.blob.core.windows.net")
28+
endpoint: url,
29+
}
30+
)
31+
@versioned(Versions)
32+
namespace Storage.Blob;
33+
34+
#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Following standard typespec recommendation"
35+
#suppress "@azure-tools/typespec-azure-core/no-enum" "Following standard typespec recommendation"
36+
@doc("The Azure.Storage.Blob service versions.")
37+
enum Versions {
38+
@doc("The 2021-12-02-preview version of the Azure.Storage.Blob service.")
39+
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
40+
v2021_12_02: "2021-12-02",
41+
}

0 commit comments

Comments
 (0)