Skip to content

Commit 90ff132

Browse files
authored
Merge branch 'main' into vikeshi26/arm-lease-microsoft-authorization-root
2 parents 8f3a411 + 9edc689 commit 90ff132

5 files changed

Lines changed: 114 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "../main.tsp";
3+
4+
using Azure.ClientGenerator.Core;
5+
using Storage.Blob;
6+
using TypeSpec.Http;
7+
8+
namespace DatalakeGoCustomizations;
9+
10+
// Root client
11+
@client(
12+
{
13+
name: "ServiceClient",
14+
service: Storage.Blob,
15+
},
16+
"go"
17+
)
18+
interface ServiceClient {
19+
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Existing API"
20+
listContainersSegment is Service.listContainers;
21+
22+
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Existing API"
23+
getUserDelegationKey is Service.getUserDelegationKey;
24+
}
25+
@client(
26+
{
27+
name: "BlobClient",
28+
service: Storage.Blob,
29+
},
30+
"go"
31+
)
32+
interface BlobClient {
33+
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Existing API"
34+
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing API"
35+
#suppress "@azure-tools/typespec-azure-core/no-response-body" "Existing API"
36+
setExpiry is Blob.setExpiry;
37+
}
38+
39+
@@alternateType(ExpiryTimeParameter.expiresOn, string, "go");
40+
@@alternateType(KeyInfo.start, string, "go");
41+
@@alternateType(KeyInfo.expiry, string, "go");
42+
@@alternateType(UserDelegationKey.value, string, "go");
43+
@@clientName(BlobExpiryOptions, "ExpiryOptions", "go");
44+
@@clientName(ContainerItem, "FileSystemItem", "go");
45+
@@clientName(ContainerProperties, "FileSystemProperties", "go");
46+
@@clientName(KeyInfo.delegatedUserTid, "DelegatedUserTenantID", "go");
47+
@@clientName(LeaseDuration, "LeaseDurationType", "go");
48+
@@clientName(LeaseState, "LeaseStateType", "go");
49+
@@clientName(LeaseStatus, "LeaseStatusType", "go");
50+
@@clientName(ListContainersResponse, "ListFileSystemsSegmentResponse", "go");
51+
@@clientName(ListContainersResponse.containerItems, "FileSystemItems", "go");
52+
@@clientName(UserDelegationKey.signedOid, "SignedOID", "go");
53+
@@clientName(UserDelegationKey.signedTid, "SignedTID", "go");
54+
@@clientName(
55+
UserDelegationKey.signedDelegatedUserTid,
56+
"SignedDelegatedUserTenantID",
57+
"go"
58+
);
59+
#suppress "@azure-tools/typespec-client-generator-core/client-option"
60+
@@clientOption(
61+
Service.listContainers,
62+
"responseEnvelopeName",
63+
"ServiceClientListFileSystemsSegmentResponse",
64+
"go"
65+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- tool: TypeSpecValidation
2+
paths:
3+
- tspconfig.yaml
4+
rules:
5+
- SdkTspConfigValidation
6+
sub-rules:
7+
- options.@azure-tools/typespec-go.generate-fakes
8+
- options.@azure-tools/typespec-go.inject-spans
9+
- options.@azure-tools/typespec-go.service-dir
10+
- options.@azure-tools/typespec-go.package-dir
11+
- options.@azure-tools/typespec-java.emitter-output-dir
12+
- options.@azure-tools/typespec-ts.emitter-output-dir
13+
- options.@azure-tools/typespec-ts.package-details.name
14+
- options.@azure-tools/typespec-python.emitter-output-dir
15+
- options.@azure-tools/typespec-csharp.namespace
16+
- options.@azure-tools/typespec-csharp.clear-output-folder
17+
- options.@azure-tools/typespec-csharp.emitter-output-dir
18+
reason: >
19+
Suppress SDK configuration validation since this directory is only for batch sdk generation.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
"service-dir":
3+
default: "sdk/storage"
4+
options:
5+
"@azure-tools/typespec-go":
6+
containing-module: "github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake"
7+
service-dir: "sdk/storage"
8+
emitter-output-dir: "{output-dir}/{service-dir}/azdatalake/internal/generated_blob"
9+
generate-fakes: false
10+
file-prefix: "zz_"
11+
linter:
12+
extends:
13+
- "@azure-tools/typespec-azure-rulesets/data-plane"

specification/storage/Microsoft.BlobStorage/suppressions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
Keeping as fsv1 until migration is over
2626
paths:
2727
- batch
28+
- datalake-go

specification/storage/data-plane/DataLakeStorage/client.tsp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ enum ListBlobsShowOnlyGo {
179179
directories: "directories",
180180
}
181181
@@alternateType(ListBlobsShowOnly, ListBlobsShowOnlyGo, "go");
182+
@@alternateType(ContentMD5ResponseHeader.contentMD5, string, "go");
183+
@@alternateType(PathItem.eTag, string, "go");
184+
@@alternateType(BlobPropertiesInternal.etag, string, "go");
182185
@@clientName(PathItem, "Path", "go");
183186
@@clientName(BlobItem, "PathItemInternal", "go");
184187
@@clientName(BlobHierarchyListSegment.blobItems, "PathItems", "go");
@@ -191,7 +194,13 @@ enum ListBlobsShowOnlyGo {
191194
"ListPathsHierarchySegmentResponse",
192195
"go"
193196
);
197+
@@clientName(
198+
ListBlobsHierarchySegmentResponse.containerName,
199+
"FileSystemName",
200+
"go"
201+
);
194202
@@clientName(BlobHierarchyListSegment, "PathHierarchyListSegment", "go");
203+
@@clientName(BlobHierarchyListSegment.blobPrefixes, "PathPrefixes", "go");
195204
#suppress "@azure-tools/typespec-client-generator-core/client-option"
196205
@@clientOption(
197206
FileSystem.listBlobHierarchySegment,
@@ -201,3 +210,10 @@ enum ListBlobsShowOnlyGo {
201210
);
202211
#suppress "@azure-tools/typespec-client-generator-core/client-option"
203212
@@clientOption(PathItem, "omitSerdeMethods", "all", "go");
213+
#suppress "@azure-tools/typespec-client-generator-core/client-option"
214+
@@clientOption(
215+
FileSystem.listBlobHierarchySegment,
216+
"preserveContentTypeHeader",
217+
true,
218+
"go"
219+
);

0 commit comments

Comments
 (0)