external help file | online version | schema |
---|---|---|
PSSwagger-help.xml |
2.0.0 |
PowerShell command to generate the PowerShell commands for a given RESTful Web Services using Swagger/OpenAPI documents.
New-PSSwaggerModule -SpecificationPath <String> -Path <String> -Name <String> [-Version <Version>]
[-NoVersionFolder] [-DefaultCommandPrefix <String>] [-Header <String[]>] [-UseAzureCsharpGenerator]
[-NoAssembly] [-PowerShellCorePath <String>] [-IncludeCoreFxAssembly] [-InstallToolsForAllUsers] [-TestBuild]
[-SymbolPath <String>] [-ConfirmBootstrap] [-Formatter <String>]
New-PSSwaggerModule -SpecificationPath <String> -Path <String> -AssemblyFileName <String>
[-ClientTypeName <String>] [-ModelsName <String>] -Name <String> [-Version <Version>] [-NoVersionFolder]
[-DefaultCommandPrefix <String>] [-Header <String[]>] [-UseAzureCsharpGenerator][-Formatter <String>]
New-PSSwaggerModule -SpecificationUri <Uri> [-Credential <PSCredential>] [-UseDefaultCredential] -Path <String>
-AssemblyFileName <String> [-ClientTypeName <String>] [-ModelsName <String>] -Name <String>
[-Version <Version>] [-NoVersionFolder] [-DefaultCommandPrefix <String>] [-Header <String[]>]
[-UseAzureCsharpGenerator] [-Formatter <String>]
New-PSSwaggerModule -SpecificationUri <Uri> [-Credential <PSCredential>] [-UseDefaultCredential] -Path <String>
-Name <String> [-Version <Version>] [-NoVersionFolder] [-DefaultCommandPrefix <String>] [-Header <String[]>]
[-UseAzureCsharpGenerator] [-NoAssembly] [-PowerShellCorePath <String>] [-IncludeCoreFxAssembly]
[-InstallToolsForAllUsers] [-TestBuild] [-SymbolPath <String>] [-ConfirmBootstrap] [-Formatter <String>]
PowerShell command to generate the PowerShell commands for a given RESTful Web Services using Swagger/OpenAPI documents.
New-PSSwaggerModule -SpecificationUri 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-batch/2015-12-01/swagger/BatchManagement.json' -Path 'C:\GeneratedModules\' -Name 'AzBatchManagement' -UseAzureCsharpGenerator
Generates a PS Module for the specified SpecificationUri.
New-PSSwaggerModule -SpecificationPath 'C:\SwaggerSpecs\BatchManagement.json' -Path 'C:\GeneratedModules\' -Name 'AzBatchManagement' -UseAzureCsharpGenerator
Generates a PS Module for the specified SpecificationPath.
Full Path to a Swagger based JSON spec.
Type: String
Parameter Sets: SpecificationPath, SdkAssemblyWithSpecificationPath
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Uri to a Swagger based JSON spec.
Type: Uri
Parameter Sets: SdkAssemblyWithSpecificationUri, SpecificationUri
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Credential to use when the SpecificationUri requires authentication. It will override -UseDefaultCredential when both are specified at the same time.
Type: PSCredential
Parameter Sets: SdkAssemblyWithSpecificationUri, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Use default credentials to download the SpecificationUri. Overridden by -Credential when both are specified at the same time.
Type: SwitchParameter
Parameter Sets: SdkAssemblyWithSpecificationUri, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Full Path to a file where the commands are exported to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
File name of the pre-compiled SDK assembly. This assembly along with its dependencies should be available in '.\ref\fullclr' folder under the target module version base path ($Path$Name$Version\). If your generated module needs to work on PowerShell Core, place the coreclr assembly along with its dependencies under '.\ref\coreclr' folder under the target module version base path ($Path$Name$Version\). For FullClr, the specified assembly should be available at "$Path$Name$Version\ref\fullclr$AssemblyFileName". For CoreClr, the specified assembly should be available at "$Path$Name$Version\ref\coreclr$AssemblyFileName".
Type: String
Parameter Sets: SdkAssemblyWithSpecificationPath, SdkAssemblyWithSpecificationUri
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Client type name in the pre-compiled SDK assembly. Specify if client type name is different from the value of 'Title' field from the input specification, or if client type namespace is different from the specified namespace in the specification. It is recommended to specify the fully qualified client type name.
Type: String
Parameter Sets: SdkAssemblyWithSpecificationPath, SdkAssemblyWithSpecificationUri
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Models name if it is different from default value 'Models'. It is recommended to specify the custom models name in using x-ms-code-generation-settings extension in specification.
Type: String
Parameter Sets: SdkAssemblyWithSpecificationPath, SdkAssemblyWithSpecificationUri
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Name of the module to be generated. A folder with this name will be created in the location specified by Path parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Version of the generated PowerShell module.
Type: Version
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0.0.1
Accept pipeline input: False
Accept wildcard characters: False
Switch to not create the version folder under the generated module folder.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Prefix value to be prepended to cmdlet noun or to cmdlet name without verb.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Text to include as a header comment in the PSSwagger generated files. It also can be a path to a .txt file with the content to be added as header in the PSSwagger generated files.
Supported predefined license header values:
- NONE: Suppresses the default header.
- MICROSOFT_MIT: Adds predefined Microsoft MIT license text with default PSSwagger code generation header content.
- MICROSOFT_MIT_NO_VERSION: Adds predefined Microsoft MIT license text with default PSSwagger code generation header content without version.
- MICROSOFT_MIT_NO_CODEGEN: Adds predefined Microsoft MIT license text without default PSSwagger code generation header content.
- MICROSOFT_APACHE: Adds predefined Microsoft Apache license text with default PSSwagger code generation header content.
- MICROSOFT_APACHE_NO_VERSION: Adds predefined Microsoft Apache license text with default PSSwagger code generation header content without version.
- MICROSOFT_APACHE_NO_CODEGEN: Adds predefined Microsoft Apache license text without default PSSwagger code generation header content.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Switch to specify whether AzureCsharp code generator is required. By default, this command uses CSharp code generator.
When this switch is specified and the resource id follows the guidelines of Azure Resource operations
- The following additional parameter sets will be generated
- InputObject parameter set with the same object type returned by Get. Supports piping from Get operarion to action cmdlets.
- ResourceId parameter set which splits the resource id into component parts (supports piping from generic cmdlets).
- Parameter name of Azure resource name parameter will be generated as 'Name' and the actual resource name parameter from the resource id will be added as an alias.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Switch to disable saving the precompiled module assembly and instead enable dynamic compilation.
Type: SwitchParameter
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Path to PowerShell.exe for PowerShell Core. Only required if PowerShell Core not installed via MSI in the default path.
Type: String
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Switch to additionally compile the module's binary component for Core CLR.
Type: SwitchParameter
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
User wants to install local tools for all users.
Type: SwitchParameter
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Switch to disable optimizations during build of full CLR binary component.
Type: SwitchParameter
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Path to save the generated C# code and PDB file. Defaults to $Path\symbols.
Type: String
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Automatically consent to downloading nuget.exe or NuGet packages as required.
Type: SwitchParameter
Parameter Sets: SpecificationPath, SpecificationUri
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specify a formatter to use. One of: 'None', 'PSScriptAnalyzer'
Type: String
Parameter Sets: SpecificationPath, SpecificationUri, SdkAssemblyWithSpecificationPath, SdkAssemblyWithSpecificationUri
Aliases:
Required: False
Position: Named
Default value: 'None'
Accept pipeline input: False
Accept wildcard characters: False