Skip to content

Commit 3edff75

Browse files
committed
upgrade websites module to autorest v4
1 parent b9cd199 commit 3edff75

File tree

58 files changed

+58
-11069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+58
-11069
lines changed

src/Websites/Websites.Autorest/Az.Websites.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<copyright>Microsoft Corporation. All rights reserved.</copyright>
1414
<tags>Azure ResourceManager ARM PSModule $(service-name)</tags>
1515
<dependencies>
16-
<dependency id="Az.Accounts" version="2.2.3" />
16+
<dependency id="Az.Accounts" version="2.7.5" />
1717
</dependencies>
1818
</metadata>
1919
<files>
@@ -23,9 +23,9 @@
2323
<!-- https://github.com/NuGet/Home/issues/3584 -->
2424
<file src="bin/Az.Websites.private.dll" target="bin" />
2525
<file src="bin\Az.Websites.private.deps.json" target="bin" />
26-
<file src="internal\**\*.*" exclude="internal\readme.md" target="internal" />
27-
<file src="custom\**\*.*" exclude="custom\readme.md;custom\**\*.cs" target="custom" />
28-
<file src="docs\**\*.md" exclude="docs\readme.md" target="docs" />
26+
<file src="internal\**\*.*" exclude="internal\README.md" target="internal" />
27+
<file src="custom\**\*.*" exclude="custom\README.md;custom\**\*.cs" target="custom" />
28+
<file src="docs\**\*.md" exclude="docs\README.md" target="docs" />
2929
<file src="exports\**\ProxyCmdletDefinitions.ps1" target="exports" />
3030
<file src="utils\**\*.*" target="utils" />
3131
</files>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Websites")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/Websites/Websites.Autorest/README.md

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ input-file:
3737
title: Websites
3838
module-version: 0.1.0
3939
subject-prefix: $(service-name)
40-
identity-correction-for-post: true
41-
resourcegroup-append: true
42-
nested-object-to-string: true
43-
44-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
45-
use-extension:
46-
"@autorest/powershell": "3.x"
4740

4841
directive:
4942
#Modify operationId
@@ -206,70 +199,8 @@ directive:
206199
verb: Unregister
207200
subject: BuildUserProvidedFunctionApp
208201

209-
# Remove variant
210-
# Following is two common directive which are normally required in all the RPs
211-
# 1. Remove the unexpanded parameter set
212-
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
213-
- where:
214-
variant: ^CreateViaIdentityExpanded$|^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
215-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
216-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
217-
subject: CustomDomain
218-
219-
remove: true
220-
- where:
221-
verb: Test
222-
variant: ^Validate$|^ValidateViaIdentity$
223-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
224-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
225-
subject: CustomDomain
226-
remove: true
227-
228-
- where:
229-
variant: ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
230-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
231-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
232-
subject: BuildAppSetting
233-
remove: true
234-
235-
- where:
236-
variant: ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
237-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
238-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
239-
subject: FunctionAppSetting
240-
remove: true
241-
242-
- where:
243-
variant: ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
244-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
245-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
246-
subject: Setting
247-
remove: true
248-
249-
- where:
250-
variant: ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
251-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
252-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
253-
subject: BuildFunctionAppSetting
254-
remove: true
255-
256-
- where:
257-
variant: ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
258-
# We got to keep the Create variant of CustomDomain because it's special that it doesn't have a
259-
# CreateExpanded variant, because the only parameters are all in URL rather than request body
260-
subject: UserRoleInvitationLink
261-
remove: true
262-
263-
- where:
264-
verb: New
265-
subject: ^$
266-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$
267-
remove: true
268-
269202
- where:
270-
verb: Update
271-
subject: null
272-
variant: ^Update$|^UpdateViaIdentity$
203+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
273204
remove: true
274205

275206
- where:
@@ -281,7 +212,7 @@ directive:
281212
- where:
282213
verb: Register
283214
subject: UserProvidedFunctionApp
284-
variant: ^Register$|^Register1$|^RegisterViaIdentity$|^RegisterViaIdentity1$|^RegisterViaIdentityExpanded$|^RegisterViaIdentityExpanded1$
215+
variant: ^Register(?!.*?(JsonFilePath|JsonString))
285216
remove: true
286217

287218
# Rename parameters

src/Websites/Websites.Autorest/custom/New-AzStaticWebApp.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PS C:\> {{ Add code here }}
2828
{{ Add output here }}
2929
3030
.Outputs
31-
Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.Api20201201.IStaticSiteArmResource
31+
Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.IStaticSiteArmResource
3232
.Notes
3333
COMPLEX PARAMETER PROPERTIES
3434
@@ -42,7 +42,7 @@ SKUCAPABILITY <ICapability[]>: Capabilities of the SKU, e.g., is traffic manager
4242
https://learn.microsoft.com/powershell/module/az.websites/new-azstaticwebapp
4343
#>
4444
function New-AzStaticWebApp {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.Api20201201.IStaticSiteArmResource])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.IStaticSiteArmResource])]
4646
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
4747
param(
4848
[Parameter(Mandatory)]
@@ -135,7 +135,7 @@ param(
135135

136136
[Parameter()]
137137
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Category('Body')]
138-
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.Api20201201.IManagedServiceIdentityUserAssignedIdentities]))]
138+
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.IManagedServiceIdentityUserAssignedIdentities]))]
139139
[System.Collections.Hashtable]
140140
# The list of user assigned identities associated with the resource.
141141
# The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}
@@ -187,7 +187,7 @@ param(
187187

188188
[Parameter()]
189189
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Category('Body')]
190-
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.Api20201201.IResourceTags]))]
190+
[Microsoft.Azure.PowerShell.Cmdlets.Websites.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Websites.Models.IResourceTags]))]
191191
[System.Collections.Hashtable]
192192
# Resource tags.
193193
${Tag},

src/Websites/Websites.Autorest/docs/Az.Websites.md

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)