Skip to content

Commit 1e76843

Browse files
authored
Prepare settings to release Azure.ResourceManager.TrustedSigning first GA (Azure#38171)
1 parent d007b3b commit 1e76843

File tree

14 files changed

+98
-9
lines changed

14 files changed

+98
-9
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
4+
using Microsoft.CodeSigning;
5+
6+
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
7+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CertificateProfile.properties
8+
);
9+
10+
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
11+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccount.properties
12+
);
13+
14+
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
15+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccountPatch.properties
16+
);
17+
18+
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
19+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Certificate.revocation);

specification/codesigning/CodeSigning.Management/client.tsp

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,57 @@ import "./main.tsp";
22
import "@azure-tools/typespec-client-generator-core";
33

44
using Azure.ClientGenerator.Core;
5+
using Microsoft.CodeSigning;
6+
using Azure.Core;
57

68
@@clientName(Microsoft.CodeSigning, "TrustedSigningMgmt", "python");
79
@@clientName(Microsoft.CodeSigning, "TrustedSigningManagementClient", "java");
10+
11+
@@clientName(AccountSku, "TrustedSigningAccountSku", "csharp");
12+
@@clientName(Certificate, "TrustedSigningCertificate", "csharp");
13+
@@clientName(CertificateProfile, "TrustedSigningCertificateProfile", "csharp");
14+
@@clientName(CertificateStatus, "TrustedSigningCertificateStatus", "csharp");
15+
@@clientName(ProvisioningState, "TrustedSigningProvisioningState", "csharp");
16+
@@clientName(CheckNameAvailability,
17+
"TrustedSigningAccountNameAvailabilityContent",
18+
"csharp"
19+
);
20+
@@clientName(CheckNameAvailability.type, "ResourceType", "csharp");
21+
@@clientName(CheckNameAvailabilityResult,
22+
"TrustedSigningAccountNameAvailabilityResult",
23+
"csharp"
24+
);
25+
@@clientName(CheckNameAvailabilityResult.nameAvailable,
26+
"IsNameAvailable",
27+
"csharp"
28+
);
29+
@@clientName(NameUnavailabilityReason,
30+
"TrustedSigningAccountNameUnavailabilityReason",
31+
"csharp"
32+
);
33+
@@clientName(CodeSigningAccount, "TrustedSigningAccount", "csharp");
34+
@@clientName(ProfileType, "CertificateProfileType", "csharp");
35+
@@clientName(ProfileType.VBSEnclave, "VbsEnclave", "csharp");
36+
@@clientName(RevocationStatus, "CertificateRevocationStatus", "csharp");
37+
@@clientName(RevokeCertificate, "RevokeCertificateContent", "csharp");
38+
@@clientName(Certificate.createdDate, "CreateOn", "csharp");
39+
@@clientName(Certificate.expiryDate, "ExpireOn", "csharp");
40+
@@clientName(Revocation.status, "RevocationStatus", "csharp");
41+
42+
@@clientName(CodeSigningAccounts.checkNameAvailability,
43+
"CheckTrustedSigningAccountNameAvailability",
44+
"csharp"
45+
);
46+
@@clientName(CodeSigningAccounts.checkNameAvailability::parameters.body,
47+
"content",
48+
"csharp"
49+
);
50+
@@clientName(CertificateProfiles.revokeCertificate::parameters.body,
51+
"content",
52+
"csharp"
53+
);
54+
55+
@@alternateType(Certificate.createdDate, utcDateTime, "csharp");
56+
@@alternateType(Certificate.expiryDate, utcDateTime, "csharp");
57+
@@alternateType(CheckNameAvailability.type, armResourceType, "csharp");
58+
@@alternateType(CodeSigningAccountProperties.accountUri, url, "csharp");

specification/codesigning/CodeSigning.Management/examples/2024-02-05-preview/CodeSigningAccounts_CheckNameAvailability.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"parameters": {
33
"body": {
4+
"type": "Microsoft.CodeSigning/codeSigningAccounts",
45
"name": "sample-account"
56
},
67
"api-version": "2024-02-05-preview",

specification/codesigning/CodeSigning.Management/examples/2024-09-30-preview/CodeSigningAccounts_CheckNameAvailability.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"parameters": {
33
"body": {
4+
"type": "Microsoft.CodeSigning/codeSigningAccounts",
45
"name": "sample-account"
56
},
67
"api-version": "2024-09-30-preview",

specification/codesigning/CodeSigning.Management/examples/2025-10-13/CodeSigningAccounts_CheckNameAvailability.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"parameters": {
33
"body": {
4+
"type": "Microsoft.CodeSigning/codeSigningAccounts",
45
"name": "sample-account"
56
},
67
"api-version": "2025-10-13",

specification/codesigning/CodeSigning.Management/main.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "@azure-tools/typespec-azure-resource-manager";
55
import "./models.tsp";
66
import "./CodeSigningAccount.tsp";
77
import "./CertificateProfile.tsp";
8+
import "./back-compatible.tsp";
89

910
using TypeSpec.Rest;
1011
using TypeSpec.Http;

specification/codesigning/CodeSigning.Management/models.tsp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ model CodeSigningAccountPatch {
151151
@doc("Resource tags.")
152152
tags?: Record<string>;
153153

154-
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Legacy flatten"
155154
@doc("Properties of the trusted signing account.")
156-
@Azure.ClientGenerator.Core.Legacy.flattenProperty
157155
properties?: CodeSigningAccountPatchProperties;
158156
}
159157

@@ -248,11 +246,9 @@ model CertificateProfileProperties {
248246
@visibility(Lifecycle.Read)
249247
status?: CertificateProfileStatus;
250248

251-
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Legacy flatten"
252249
@doc("List of renewed certificates.")
253250
@visibility(Lifecycle.Read)
254251
@identifiers(#[])
255-
@Azure.ClientGenerator.Core.Legacy.flattenProperty
256252
certificates?: Certificate[];
257253
}
258254

@@ -280,9 +276,7 @@ model Certificate {
280276
@doc("Status of the certificate.")
281277
status?: CertificateStatus;
282278

283-
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Legacy flatten"
284279
@doc("Revocations history of a certificate.")
285-
@Azure.ClientGenerator.Core.Legacy.flattenProperty
286280
revocation?: Revocation;
287281
}
288282

@@ -328,6 +322,9 @@ model RevokeCertificate {
328322

329323
@doc("The parameters used to check the availability of the trusted signing account name.")
330324
model CheckNameAvailability {
325+
@doc("The type of the resource, \"Microsoft.CodeSigning/codeSigningAccounts\".")
326+
type: string;
327+
331328
@doc("Trusted signing account name.")
332329
name: string;
333330
}

specification/codesigning/CodeSigning.Management/tspconfig.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ options:
3939
generate-fakes: true
4040
head-as-boolean: true
4141
inject-spans: true
42+
"@azure-typespec/http-client-csharp-mgmt":
43+
namespace: "Azure.ResourceManager.TrustedSigning"
44+
emitter-output-dir: "{output-dir}/{service-dir}/{namespace}"
4245
linter:
4346
extends:
4447
- "@azure-tools/typespec-azure-rulesets/resource-manager"

specification/codesigning/resource-manager/Microsoft.CodeSigning/preview/2024-02-05-preview/codeSigningAccount.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,6 @@
961961
"$ref": "#/definitions/Certificate"
962962
},
963963
"readOnly": true,
964-
"x-ms-client-flatten": true,
965964
"x-ms-identifiers": []
966965
}
967966
},
@@ -1033,12 +1032,17 @@
10331032
"type": "object",
10341033
"description": "The parameters used to check the availability of the trusted signing account name.",
10351034
"properties": {
1035+
"type": {
1036+
"type": "string",
1037+
"description": "The type of the resource, \"Microsoft.CodeSigning/codeSigningAccounts\"."
1038+
},
10361039
"name": {
10371040
"type": "string",
10381041
"description": "Trusted signing account name."
10391042
}
10401043
},
10411044
"required": [
1045+
"type",
10421046
"name"
10431047
]
10441048
},

specification/codesigning/resource-manager/Microsoft.CodeSigning/preview/2024-02-05-preview/examples/CodeSigningAccounts_CheckNameAvailability.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"parameters": {
33
"body": {
4+
"type": "Microsoft.CodeSigning/codeSigningAccounts",
45
"name": "sample-account"
56
},
67
"api-version": "2024-02-05-preview",

0 commit comments

Comments
 (0)