Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

20 changes: 0 additions & 20 deletions src/SDKs/Search/DataPlane/Microsoft.Azure.Search.Data/generate.cmd

This file was deleted.

46 changes: 46 additions & 0 deletions src/SDKs/Search/DataPlane/Microsoft.Azure.Search.Data/generate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------------------------------------------------

<#

.SYNOPSIS
Powershell script that generates the C# SDK code for Microsoft.Azure.Search.Data from a Swagger spec

.DESCRIPTION
This script:
- fetches the config file from user/branch provided
- Generates code based off the config file provided

.PARAMETER SpecsRepoFork
The Rest Spec repo fork which contains the config file; the default is Azure.

.PARAMETER SpecsRepoBranch
The Branch which contains the config file; the default is master.

#>

Param(
[string] $SpecsRepoFork = "Azure",
[string] $SpecsRepoBranch = "master"
)

$repoRoot = "$PSScriptRoot\..\..\..\..\.."
$generateFolder = "$PSScriptRoot\Generated"

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$repoRoot\tools\generateTool.ps1" -ResourceProvider "search/data-plane/Microsoft.Azure.Search.Data" -PowershellInvoker -AutoRestVersion "latest" -SpecsRepoFork $SpecsRepoFork -SpecsRepoBranch $SpecsRepoBranch

Write-Output "Deleting extra files and cleaning up..."

# Delete any extra files generated for types that are shared between SearchServiceClient and SearchIndexClient.
Remove-Item "$generateFolder\Models\SearchRequestOptions.cs"

# Delete extra files we don't need.
Remove-Item "$generateFolder\DocumentsProxyOperationsExtensions.cs"

# Make any necessary modifications
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File .\Fix-GeneratedCode.ps1

Write-Output "Finished cleanup."

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------------------------------------------------

<#

.SYNOPSIS
Powershell script that generates the C# SDK code for Microsoft.Azure.Search.Service from a Swagger spec

.DESCRIPTION
This script:
- fetches the config file from user/branch provided
- Generates code based off the config file provided

.PARAMETER SpecsRepoFork
The Rest Spec repo fork which contains the config file; the default is Azure.

.PARAMETER SpecsRepoBranch
The Branch which contains the config file; the default is master.

#>

Param(
[string] $SpecsRepoFork = "Azure",
[string] $SpecsRepoBranch = "master"
)

$repoRoot = "$PSScriptRoot\..\..\..\..\.."
$generateFolder = "$PSScriptRoot\Generated"
$sharedGenerateFolder = "$generateFolder\..\..\Microsoft.Azure.Search.Common\Generated"

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$repoRoot\tools\generateTool.ps1" -ResourceProvider "search/data-plane/Microsoft.Azure.Search.Service" -PowershellInvoker -AutoRestVersion "latest" -SpecsRepoFork $SpecsRepoFork -SpecsRepoBranch $SpecsRepoBranch

Write-Output "Deleting extra files and cleaning up..."

# Move any extra files generated for types that are shared between SearchServiceClient and SearchIndexClient to Common.
if (Test-Path -Path $sharedGenerateFolder)
{
Remove-Item -Recurse -Force $sharedGenerateFolder
}

New-Item -ItemType Directory $sharedGenerateFolder
Move-Item "$generateFolder\Models\SearchRequestOptions.cs" $sharedGenerateFolder

Write-Output "Finished cleanup."

This file was deleted.

7 changes: 0 additions & 7 deletions src/SDKs/Search/Management/Management.Search/generate.cmd

This file was deleted.

32 changes: 32 additions & 0 deletions src/SDKs/Search/Management/Management.Search/generate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------------------------------------------------

<#

.SYNOPSIS
Powershell script that generates the C# SDK code for Microsoft.Azure.Management.Search from a Swagger spec

.DESCRIPTION
This script:
- fetches the config file from user/branch provided
- Generates code based off the config file provided

.PARAMETER SpecsRepoFork
The Rest Spec repo fork which contains the config file; the default is Azure.

.PARAMETER SpecsRepoBranch
The Branch which contains the config file; the default is master.

#>

Param(
[string] $SpecsRepoFork = "Azure",
[string] $SpecsRepoBranch = "master"
)

$repoRoot = "$PSScriptRoot\..\..\..\..\.."

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$repoRoot\tools\generateTool.ps1" -ResourceProvider "search/resource-manager" -PowershellInvoker -AutoRestVersion "latest" -SpecsRepoFork $SpecsRepoFork -SpecsRepoBranch $SpecsRepoBranch
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
2018-03-02 03:24:06 UTC

Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Data/readme.md --csharp --csharp-sdks-folder=E:\github\azure-sdk-for-net\tools\..\src\SDKs\ --version=latest --reflect-api-versions
2018-04-09 20:46:41 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
GitHub fork: Azure
Branch: master
Commit: f6b39d9c8f634b48af01d44ab66ba2585b40c49c

2) AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\brjohnst\AppData\Roaming\npm `-- autorest@2.0.4245
Bootstrapper version: C:\Users\brjohnst\AppData\Roaming\npm `-- autorest@2.0.4262


Latest installed version:
.\tools\generate.ps1 was invoked by generate.ps1


Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
2018-04-06 17:10:40 UTC

Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --csharp-sdks-folder=E:\github\azure-sdk-for-net\tools\..\src\SDKs\ --version=latest --reflect-api-versions
2018-04-09 20:58:00 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
GitHub fork: Azure
Branch: master
Commit: bcb73c4629b948c5a6010e3c0e8cbd3196e8ae09
Commit: f6b39d9c8f634b48af01d44ab66ba2585b40c49c

2) AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\natinimn\AppData\Roaming\npm `-- autorest@2.0.4262
Bootstrapper version: C:\Users\brjohnst\AppData\Roaming\npm `-- autorest@2.0.4262


Latest installed version:
.\tools\generate.ps1 was invoked by generate.ps1


16 changes: 11 additions & 5 deletions src/SDKs/_metadata/search_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
2018-01-11 02:33:03 UTC

Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/resource-manager/readme.md --csharp --csharp-sdks-folder=E:\github\azure-sdk-for-net\tools\..\src\SDKs\ --version=latest --reflect-api-versions
2018-04-09 21:04:22 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
GitHub fork: Azure
Branch: master
Commit: 6b8130960809d1685744222300de051f4e785bda
Commit: f6b39d9c8f634b48af01d44ab66ba2585b40c49c

2) AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\brjohnst\AppData\Roaming\npm `-- autorest@2.0.4215
Bootstrapper version: C:\Users\brjohnst\AppData\Roaming\npm `-- autorest@2.0.4262


Latest installed version:
.\tools\generate.ps1 was invoked by generate.ps1