[PowerShell] minor improvements and bug fixes (#5635)

* add output type, minor format fix

* minor test improvement
This commit is contained in:
William Cheng 2020-03-19 22:51:13 +08:00 committed by GitHub
parent 457aff8496
commit b1efe20a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 49 additions and 364 deletions

View File

@ -44,7 +44,8 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen
protected String packageVersion = "0.1.2"; protected String packageVersion = "0.1.2";
protected String apiDocPath = "docs/"; protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/"; protected String modelDocPath = "docs/";
protected String testPath = "tests/"; protected String apiTestPath = "tests/Api";
protected String modelTestPath = "tests/Model";
protected HashSet nullablePrimitives; protected HashSet nullablePrimitives;
protected HashSet powershellVerbs; protected HashSet powershellVerbs;
@ -433,7 +434,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen
@Override @Override
public String apiTestFileFolder() { public String apiTestFileFolder() {
return (outputFolder + "/" + testPath).replace('/', File.separatorChar); return (outputFolder + "/" + apiTestPath).replace('/', File.separatorChar);
} }
@Override @Override
@ -448,7 +449,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen
@Override @Override
public String modelTestFileFolder() { public String modelTestFileFolder() {
return (outputFolder + "/" + testPath).replace('/', File.separatorChar); return (outputFolder + "/" + modelTestPath).replace('/', File.separatorChar);
} }
@Override @Override
@ -771,7 +772,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen
String dataType; String dataType;
if (cp.isPrimitiveType) { if (cp.isPrimitiveType) {
dataType = cp.dataType; dataType = cp.dataType;
if (!(cp.isString || cp.isFile) if (!(cp.isString || cp.isFile || cp.isContainer)
&& (cp.isNullable || !cp.required)) { && (cp.isNullable || !cp.required)) {
dataType = "System.Nullable[" + dataType + "]"; dataType = "System.Nullable[" + dataType + "]";
} }
@ -789,7 +790,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen
String dataType; String dataType;
if (cp.isPrimitiveType) { if (cp.isPrimitiveType) {
dataType = cp.dataType; dataType = cp.dataType;
if (!(cp.isString || cp.isFile) if (!(cp.isString || cp.isFile || cp.isContainer)
&& (cp.isNullable || !cp.required)) { && (cp.isNullable || !cp.required)) {
dataType = "System.Nullable[" + dataType + "]"; dataType = "System.Nullable[" + dataType + "]";
} }

View File

@ -2,6 +2,7 @@
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
function {{{vendorExtensions.x-powershell-method-name}}} { function {{{vendorExtensions.x-powershell-method-name}}} {
    [OutputType({{#returnType}}"{{{.}}}"{{/returnType}}{{^returnType}}[System.Void]{{/returnType}})]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
{{#allParams}} {{#allParams}}

View File

@ -1,6 +1,6 @@
{{> partial_header}} {{> partial_header}}
function Invoke-{{{apiNamePrefix}}}ApiClient { function Invoke-{{{apiNamePrefix}}}ApiClient {
[OutputType('System.Collections.Hashtable')]
[CmdletBinding()] [CmdletBinding()]
Param( Param(
[Parameter(Mandatory)] [Parameter(Mandatory)]
@ -32,7 +32,7 @@ function Invoke-{{{apiNamePrefix}}}ApiClient {
'Calling method: Invoke-{{{apiNamePrefix}}}ApiClient' | Write-Debug 'Calling method: Invoke-{{{apiNamePrefix}}}ApiClient' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug
$Configuraiton = Get-{{{apiNamePrefix}}}Configuration $Configuration = Get-{{{apiNamePrefix}}}Configuration
$RequestUri = $Configuration["BaseUrl"] + $Uri $RequestUri = $Configuration["BaseUrl"] + $Uri
# cookie parameters # cookie parameters

View File

@ -4,7 +4,8 @@
Describe -tag '{{{packageName}}}' -name '{{{classname}}}' { Describe -tag '{{{packageName}}}' -name '{{{classname}}}' {
Context '{{{classname}}}' { Context '{{{classname}}}' {
It 'New-{{{classname}}}' { It 'New-{{{classname}}}' {
#$NewObject = New-{{{classname}}}{{#vars}} -{{name}} TEST_VALUE{{/vars}} # a simple test to create an object
#$NewObject = New-{{{classname}}}{{#vars}} -{{name}} "TEST_VALUE"{{/vars}}
#$NewObject | Should BeOfType {{classname}} #$NewObject | Should BeOfType {{classname}}
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -6,6 +6,7 @@
# #
function Add-PSPet { function Add-PSPet {
    [OutputType("Pet")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -58,6 +59,7 @@ function Add-PSPet {
} }
function Remove-Pet { function Remove-Pet {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -109,6 +111,7 @@ function Remove-Pet {
} }
function Find-PSPetsByStatus { function Find-PSPetsByStatus {
    [OutputType("Pet[]")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -157,6 +160,7 @@ function Find-PSPetsByStatus {
} }
function Find-PSPetsByTags { function Find-PSPetsByTags {
    [OutputType("Pet[]")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -205,6 +209,7 @@ function Find-PSPetsByTags {
} }
function Get-PSPetById { function Get-PSPetById {
    [OutputType("Pet")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -255,6 +260,7 @@ function Get-PSPetById {
} }
function Update-PSPet { function Update-PSPet {
    [OutputType("Pet")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -307,6 +313,7 @@ function Update-PSPet {
} }
function Update-PSPetWithForm { function Update-PSPetWithForm {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -368,6 +375,7 @@ function Update-PSPetWithForm {
} }
function Invoke-PSUploadFile { function Invoke-PSUploadFile {
    [OutputType("ApiResponse")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]

View File

@ -6,6 +6,7 @@
# #
function Invoke-PSDeleteOrder { function Invoke-PSDeleteOrder {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -49,6 +50,7 @@ function Invoke-PSDeleteOrder {
} }
function Get-PSInventory { function Get-PSInventory {
    [OutputType("{String, Int32}")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
) )
@ -92,6 +94,7 @@ function Get-PSInventory {
} }
function Get-PSOrderById { function Get-PSOrderById {
    [OutputType("Order")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -138,6 +141,7 @@ function Get-PSOrderById {
} }
function Invoke-PSPlaceOrder { function Invoke-PSPlaceOrder {
    [OutputType("Order")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]

View File

@ -6,6 +6,7 @@
# #
function Invoke-PSCreateUser { function Invoke-PSCreateUser {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -58,6 +59,7 @@ function Invoke-PSCreateUser {
} }
function Invoke-PSCreateUsersWithArrayInput { function Invoke-PSCreateUsersWithArrayInput {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -110,6 +112,7 @@ function Invoke-PSCreateUsersWithArrayInput {
} }
function Invoke-PSCreateUsersWithListInput { function Invoke-PSCreateUsersWithListInput {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -162,6 +165,7 @@ function Invoke-PSCreateUsersWithListInput {
} }
function Invoke-PSDeleteUser { function Invoke-PSDeleteUser {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -209,6 +213,7 @@ function Invoke-PSDeleteUser {
} }
function Get-PSUserByName { function Get-PSUserByName {
    [OutputType("User")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -255,6 +260,7 @@ function Get-PSUserByName {
} }
function Invoke-PSLoginUser { function Invoke-PSLoginUser {
    [OutputType("String")]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
@ -310,6 +316,7 @@ function Invoke-PSLoginUser {
} }
function Invoke-PSLogoutUser { function Invoke-PSLogoutUser {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
) )
@ -350,6 +357,7 @@ function Invoke-PSLogoutUser {
} }
function Update-PSUser { function Update-PSUser {
    [OutputType([System.Void])]
[CmdletBinding()] [CmdletBinding()]
Param ( Param (
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]

View File

@ -6,7 +6,7 @@
# #
function Invoke-PSApiClient { function Invoke-PSApiClient {
[OutputType('System.Collections.Hashtable')]
[CmdletBinding()] [CmdletBinding()]
Param( Param(
[Parameter(Mandatory)] [Parameter(Mandatory)]
@ -38,7 +38,7 @@ function Invoke-PSApiClient {
'Calling method: Invoke-PSApiClient' | Write-Debug 'Calling method: Invoke-PSApiClient' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug
$Configuraiton = Get-PSConfiguration $Configuration = Get-PSConfiguration
$RequestUri = $Configuration["BaseUrl"] + $Uri $RequestUri = $Configuration["BaseUrl"] + $Uri
# cookie parameters # cookie parameters

View File

@ -1,31 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
Context 'Configuration' {
It 'Configuration tests' {
Set-PSConfiguration -Username "test_username" -Password "test_password" `
-AccessToken "test_accesstoken"
#-BaseUrl "https://test.api.com:8080"
Set-PSConfigurationApiKey -Id "api_key" -ApiKey "zzzzxxxxyyyy"
Set-PSConfigurationApiKeyPrefix -Id "api_key" -ApiKeyPrefix "Bearer"
$Conf = Get-PSConfiguration
$Conf."Username" | Should Be "test_username"
$Conf."Password" | Should Be "test_password"
$Conf."AccessToken" | Should Be "test_accesstoken"
#$Conf."BaseUrl" | Should Be "https://test.api.com:8080"
$Conf["ApiKey"]["api_key"] | Should Be "zzzzxxxxyyyy"
$Conf["ApiKeyPrefix"]["api_key"] | Should Be "Bearer"
$Conf | ConvertTo-Json | Write-Host
}
}
}

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'ApiResponse' { Describe -tag 'PSPetstore' -name 'ApiResponse' {
Context 'ApiResponse' { Context 'ApiResponse' {
It 'New-ApiResponse' { It 'New-ApiResponse' {
#$NewObject = New-ApiResponse -Code TEST_VALUE -Type TEST_VALUE -Message TEST_VALUE # a simple test to create an object
#$NewObject = New-ApiResponse -Code "TEST_VALUE" -Type "TEST_VALUE" -Message "TEST_VALUE"
#$NewObject | Should BeOfType ApiResponse #$NewObject | Should BeOfType ApiResponse
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'Category' { Describe -tag 'PSPetstore' -name 'Category' {
Context 'Category' { Context 'Category' {
It 'New-Category' { It 'New-Category' {
#$NewObject = New-Category -Id TEST_VALUE -Name TEST_VALUE # a simple test to create an object
#$NewObject = New-Category -Id "TEST_VALUE" -Name "TEST_VALUE"
#$NewObject | Should BeOfType Category #$NewObject | Should BeOfType Category
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'InlineObject' { Describe -tag 'PSPetstore' -name 'InlineObject' {
Context 'InlineObject' { Context 'InlineObject' {
It 'New-InlineObject' { It 'New-InlineObject' {
#$NewObject = New-InlineObject -Name TEST_VALUE -Status TEST_VALUE # a simple test to create an object
#$NewObject = New-InlineObject -Name "TEST_VALUE" -Status "TEST_VALUE"
#$NewObject | Should BeOfType InlineObject #$NewObject | Should BeOfType InlineObject
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'InlineObject1' { Describe -tag 'PSPetstore' -name 'InlineObject1' {
Context 'InlineObject1' { Context 'InlineObject1' {
It 'New-InlineObject1' { It 'New-InlineObject1' {
#$NewObject = New-InlineObject1 -AdditionalMetadata TEST_VALUE -File TEST_VALUE # a simple test to create an object
#$NewObject = New-InlineObject1 -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
#$NewObject | Should BeOfType InlineObject1 #$NewObject | Should BeOfType InlineObject1
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'Order' { Describe -tag 'PSPetstore' -name 'Order' {
Context 'Order' { Context 'Order' {
It 'New-Order' { It 'New-Order' {
#$NewObject = New-Order -Id TEST_VALUE -PetId TEST_VALUE -Quantity TEST_VALUE -ShipDate TEST_VALUE -Status TEST_VALUE -Complete TEST_VALUE # a simple test to create an object
#$NewObject = New-Order -Id "TEST_VALUE" -PetId "TEST_VALUE" -Quantity "TEST_VALUE" -ShipDate "TEST_VALUE" -Status "TEST_VALUE" -Complete "TEST_VALUE"
#$NewObject | Should BeOfType Order #$NewObject | Should BeOfType Order
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'Pet' { Describe -tag 'PSPetstore' -name 'Pet' {
Context 'Pet' { Context 'Pet' {
It 'New-Pet' { It 'New-Pet' {
#$NewObject = New-Pet -Id TEST_VALUE -Category TEST_VALUE -Name TEST_VALUE -PhotoUrls TEST_VALUE -Tags TEST_VALUE -Status TEST_VALUE # a simple test to create an object
#$NewObject = New-Pet -Id "TEST_VALUE" -Category "TEST_VALUE" -Name "TEST_VALUE" -PhotoUrls "TEST_VALUE" -Tags "TEST_VALUE" -Status "TEST_VALUE"
#$NewObject | Should BeOfType Pet #$NewObject | Should BeOfType Pet
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'Tag' { Describe -tag 'PSPetstore' -name 'Tag' {
Context 'Tag' { Context 'Tag' {
It 'New-Tag' { It 'New-Tag' {
#$NewObject = New-Tag -Id TEST_VALUE -Name TEST_VALUE # a simple test to create an object
#$NewObject = New-Tag -Id "TEST_VALUE" -Name "TEST_VALUE"
#$NewObject | Should BeOfType Tag #$NewObject | Should BeOfType Tag
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -8,7 +8,8 @@
Describe -tag 'PSPetstore' -name 'User' { Describe -tag 'PSPetstore' -name 'User' {
Context 'User' { Context 'User' {
It 'New-User' { It 'New-User' {
#$NewObject = New-User -Id TEST_VALUE -Username TEST_VALUE -FirstName TEST_VALUE -LastName TEST_VALUE -Email TEST_VALUE -Password TEST_VALUE -Phone TEST_VALUE -UserStatus TEST_VALUE # a simple test to create an object
#$NewObject = New-User -Id "TEST_VALUE" -Username "TEST_VALUE" -FirstName "TEST_VALUE" -LastName "TEST_VALUE" -Email "TEST_VALUE" -Password "TEST_VALUE" -Phone "TEST_VALUE" -UserStatus "TEST_VALUE"
#$NewObject | Should BeOfType User #$NewObject | Should BeOfType User
#$NewObject.property | Should Be 0 #$NewObject.property | Should Be 0
} }

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'ApiResponse' {
Context 'ApiResponse' {
It 'New-ApiResponse' {
#$NewObject = New-ApiResponse -Code TEST_VALUE -Type TEST_VALUE -Message TEST_VALUE
#$NewObject | Should BeOfType ApiResponse
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'Category' {
Context 'Category' {
It 'New-Category' {
#$NewObject = New-Category -Id TEST_VALUE -Name TEST_VALUE
#$NewObject | Should BeOfType Category
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSPetstore' -name 'InlineObject' {
Context 'InlineObject' {
It 'New-InlineObject' {
#$NewObject = New-InlineObject -Name TEST_VALUE -Status TEST_VALUE
#$NewObject | Should BeOfType InlineObject
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSPetstore' -name 'InlineObject1' {
Context 'InlineObject1' {
It 'New-InlineObject1' {
#$NewObject = New-InlineObject1 -AdditionalMetadata TEST_VALUE -File TEST_VALUE
#$NewObject | Should BeOfType InlineObject1
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'Order' {
Context 'Order' {
It 'New-Order' {
#$NewObject = New-Order -Id TEST_VALUE -PetId TEST_VALUE -Quantity TEST_VALUE -ShipDate TEST_VALUE -Status TEST_VALUE -Complete TEST_VALUE
#$NewObject | Should BeOfType Order
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'Pet' {
Context 'Pet' {
It 'New-Pet' {
#$NewObject = New-Pet -Id TEST_VALUE -Category TEST_VALUE -Name TEST_VALUE -PhotoUrls TEST_VALUE -Tags TEST_VALUE -Status TEST_VALUE
#$NewObject | Should BeOfType Pet
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'Tag' {
Context 'Tag' {
It 'New-Tag' {
#$NewObject = New-Tag -Id TEST_VALUE -Name TEST_VALUE
#$NewObject | Should BeOfType Tag
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,16 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSOpenAPITools' -name 'User' {
Context 'User' {
It 'New-User' {
#$NewObject = New-User -Id TEST_VALUE -Username TEST_VALUE -FirstName TEST_VALUE -LastName TEST_VALUE -Email TEST_VALUE -Password TEST_VALUE -Phone TEST_VALUE -UserStatus TEST_VALUE
#$NewObject | Should BeOfType User
#$NewObject.property | Should Be 0
}
}
}

View File

@ -1,73 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSPetstore' -name 'PetApi' {
Context 'Add-PSPet' {
It 'Test Add-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Remove-Pet' {
It 'Test Remove-Pet' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -ApiKey "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Find-PSPetsByStatus' {
It 'Test Find-PSPetsByStatus' {
#$TestResult = Invoke-PetApiGetPetById -Status "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Find-PSPetsByTags' {
It 'Test Find-PSPetsByTags' {
#$TestResult = Invoke-PetApiGetPetById -Tags "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Get-PSPetById' {
It 'Test Get-PSPetById' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Update-PSPet' {
It 'Test Update-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Update-PSPetWithForm' {
It 'Test Update-PSPetWithForm' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -Name "TEST_VALUE" -Status "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSUploadFile' {
It 'Test Invoke-PSUploadFile' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
}

View File

@ -1,41 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSPetstore' -name 'StoreApi' {
Context 'Invoke-PSDeleteOrder' {
It 'Test Invoke-PSDeleteOrder' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Get-PSInventory' {
It 'Test Get-PSInventory' {
#$TestResult = Invoke-PetApiGetPetById
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Get-PSOrderById' {
It 'Test Get-PSOrderById' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSPlaceOrder' {
It 'Test Invoke-PSPlaceOrder' {
#$TestResult = Invoke-PetApiGetPetById -Order "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
}

View File

@ -1,73 +0,0 @@
#
# OpenAPI Petstore
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
Describe -tag 'PSPetstore' -name 'UserApi' {
Context 'Invoke-PSCreateUser' {
It 'Test Invoke-PSCreateUser' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSCreateUsersWithArrayInput' {
It 'Test Invoke-PSCreateUsersWithArrayInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSCreateUsersWithListInput' {
It 'Test Invoke-PSCreateUsersWithListInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSDeleteUser' {
It 'Test Invoke-PSDeleteUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Get-PSUserByName' {
It 'Test Get-PSUserByName' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSLoginUser' {
It 'Test Invoke-PSLoginUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -Password "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Invoke-PSLogoutUser' {
It 'Test Invoke-PSLogoutUser' {
#$TestResult = Invoke-PetApiGetPetById
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
Context 'Update-PSUser' {
It 'Test Update-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
}
}
}