@@ -53,35 +53,145 @@ directive:
5353 # rename paged operations from Get* to List*
5454 - rename-operation :
5555 from : GetCertificates
56- to : ListCertificates
56+ to : ListCertificateProperties
5757 - rename-operation :
5858 from : GetCertificateIssuers
59- to : ListCertificateIssuers
59+ to : ListIssuerProperties
6060 - rename-operation :
6161 from : GetCertificateVersions
62- to : ListCertificateVersions
62+ to : ListCertificatePropertiesVersions
6363 - rename-operation :
6464 from : GetDeletedCertificates
65- to : ListDeletedCertificates
65+ to : ListDeletedCertificateProperties
66+ - rename-model :
67+ from : CertificateListResult
68+ to : CertificatePropertiesListResult
69+ - rename-model :
70+ from : DeletedCertificateListResult
71+ to : DeletedCertificatePropertiesListResult
6672
67- # Maxresults -> MaxResults
68- - from : swagger-document
69- where : $.paths..parameters..[?(@.name=='maxresults')]
70- transform : $["x-ms-client-name"] = "MaxResults"
73+ # remove redunant "certificate" from operation name
74+ - rename-operation :
75+ from : SetCertificateContacts
76+ to : SetContacts
77+ - rename-operation :
78+ from : GetCertificateContacts
79+ to : GetContacts
80+ - rename-operation :
81+ from : DeleteCertificateContacts
82+ to : DeleteContacts
83+ - rename-operation :
84+ from : SetCertificateIssuer
85+ to : SetIssuer
86+ - rename-operation :
87+ from : UpdateCertificateIssuer
88+ to : UpdateIssuer
89+ - rename-operation :
90+ from : GetCertificateIssuer
91+ to : GetIssuer
92+ - rename-operation :
93+ from : DeleteCertificateIssuer
94+ to : DeleteIssuer
95+ - rename-model :
96+ from : CertificateIssuerListResult
97+ to : IssuerPropertiesListResult
98+ - rename-model :
99+ from : UpdateCertificateIssuerParameters
100+ to : UpdateIssuerParameters
101+ - rename-model :
102+ from : SetCertificateIssuerParameters
103+ to : SetIssuerParameters
104+
105+ # rename LifetimeAction
106+ - rename-model :
107+ from : Action
108+ to : LifetimeActionType
109+ - rename-model :
110+ from : Trigger
111+ to : LifetimeActionTrigger
112+
113+ # rename CertificateBundle, CertificateItem, IssuerBundle
114+ - rename-model :
115+ from : CertificateBundle
116+ to : Certificate
117+ - rename-model :
118+ from : CertificateItem
119+ to : CertificateProperties
120+ - rename-model :
121+ from : DeletedCertificateBundle
122+ to : DeletedCertificate
123+ - rename-model :
124+ from : DeletedCertificateItem
125+ to : DeletedCertificateProperties
126+ - rename-model :
127+ from : IssuerBundle
128+ to : Issuer
129+ - rename-model :
130+ from : CertificateIssuerItem
131+ to : IssuerProperties
132+ - where-model : RestoreCertificateParameters
133+ transform : $.properties.value["x-ms-client-name"] = "CertificateBackup"
134+
135+ # rename AdministratorDetails to AdministratorContact
136+ - rename-model :
137+ from : AdministratorDetails
138+ to : AdministratorContact
139+ - where-model : OrganizationDetails
140+ transform : $.properties.admin_details["x-ms-client-name"] = "AdminContacts"
141+ - where-model :
142+ - Contact
143+ - AdministratorContact
144+ transform : $.properties.email["x-ms-client-name"] = "Email"
145+
146+ # rename UPNs to UserPrincipalNames
147+ - where-model : SubjectAlternativeNames
148+ transform : $.properties.upns["x-ms-client-name"] = "UserPrincipalNames"
149+
150+ # rename EKUs to EnhancedKeyUsage
151+ - where-model : X509CertificateProperties
152+ transform : $.properties.ekus["x-ms-client-name"] = "EnhancedKeyUsage"
71153
72154 # capitalize acronyms
73- - where-model : CertificateBundle
155+ - where-model : Certificate
74156 transform : $.properties.cer["x-ms-client-name"] = "CER"
75- - where-model : CertificateBundle
157+ - where-model : Certificate
76158 transform : $.properties.kid["x-ms-client-name"] = "KID"
77- - where-model : CertificateBundle
159+ - where-model : Certificate
78160 transform : $.properties.sid["x-ms-client-name"] = "SID"
79161 - where-model : CertificateOperation
80162 transform : $.properties.csr["x-ms-client-name"] = "CSR"
81- - where-model : SubjectAlternativeNames
82- transform : $.properties.upns["x-ms-client-name"] = "UPNs"
83- - where-model : X509CertificateProperties
84- transform : $.properties.ekus["x-ms-client-name"] = "EKUs"
163+
164+ # Remove MaxResults parameter
165+ - where : " $.paths..*"
166+ remove-parameter :
167+ in : query
168+ name : maxresults
169+
170+ # remove JSONWeb prefix
171+ - from :
172+ - models.go
173+ - constants.go
174+ where : $
175+ transform : return $.replace(/JSONWebKeyCurveName/g, "CurveName");
176+ - from :
177+ - models.go
178+ - constants.go
179+ where : $
180+ transform : return $.replace(/JSONWebKeyType/g, "KeyType");
181+
182+ # remove DeletionRecoveryLevel type
183+ - from : models.go
184+ where : $
185+ transform : return $.replace(/RecoveryLevel \*DeletionRecoveryLevel/g, "RecoveryLevel *string");
186+ - from : constants.go
187+ where : $
188+ transform : return $.replace(/(?:\/\/.*\s)+type DeletionRecoveryLevel string/, "");
189+ - from : constants.go
190+ where : $
191+ transform : return $.replace(/(?:\/\/.*\s)+func PossibleDeletionRecovery(?:.+\s)+\}/, "");
192+ - from : constants.go
193+ where : $
194+ transform : return $.replace(/const \(\n\s\/\/ DeletionRecoveryLevel(?:.+\s)+\)/, "");
85195
86196 # delete unused error models
87197 - from : models.go
@@ -116,15 +226,21 @@ directive:
116226 transform : return $.replace(/Client(\w+)((?:Options|Response))/g, "$1$2");
117227
118228 # make cert IDs a convenience type so we can add parsing methods
119- # (specifying models because others have "ID" fields whose values aren't cert IDs )
229+ # (specifying models because others have "ID" fields whose values aren't key vault object identifiers )
120230 - from : models.go
121231 where : $
122- transform : return $.replace(/(type (?:Deleted)?Certificate(?:Bundle|Item) struct \{(?:\s.+\s)+\sID \*)string/g, "$1ID")
232+ transform : return $.replace(/(type (?:Deleted)?Certificate(?:Properties|Policy|Operation)? struct \{(?:\s.+\s)+\sID \*)string/g, "$1ID")
233+ - from : models.go
234+ where : $
235+ transform : return $.replace(/(type (?:Deleted)?Certificate struct \{(?:\s.+\s)+\sKID \*)string/g, "$1ID")
236+ - from : models.go
237+ where : $
238+ transform : return $.replace(/(type (?:Deleted)?Certificate struct \{(?:\s.+\s)+\sSID \*)string/g, "$1ID")
123239
124240 # remove "certificate" prefix from some method parameter names
125241 - from : client.go
126- - where : $
127- - transform : return $.replace(/certificate((?:Name|Policy|Version)) string/g, (match) => { return match[0].toLowerCase() + match.substr(1); })
242+ where : $
243+ transform : return $.replace(/certificate((?:Name|Policy|Version)) string/g, (match) => { return match[0].toLowerCase() + match.substr(1); })
128244
129245 # add doc comment
130246 - from : swagger-document
0 commit comments