diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellExperimentalClientCodegen.java index 7a94fb006d8..60e51162262 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellExperimentalClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellExperimentalClientCodegen.java @@ -44,7 +44,8 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen protected String packageVersion = "0.1.2"; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; - protected String testPath = "tests/"; + protected String apiTestPath = "tests/Api"; + protected String modelTestPath = "tests/Model"; protected HashSet nullablePrimitives; protected HashSet powershellVerbs; @@ -433,7 +434,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen @Override public String apiTestFileFolder() { - return (outputFolder + "/" + testPath).replace('/', File.separatorChar); + return (outputFolder + "/" + apiTestPath).replace('/', File.separatorChar); } @Override @@ -448,7 +449,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen @Override public String modelTestFileFolder() { - return (outputFolder + "/" + testPath).replace('/', File.separatorChar); + return (outputFolder + "/" + modelTestPath).replace('/', File.separatorChar); } @Override @@ -771,7 +772,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen String dataType; if (cp.isPrimitiveType) { dataType = cp.dataType; - if (!(cp.isString || cp.isFile) + if (!(cp.isString || cp.isFile || cp.isContainer) && (cp.isNullable || !cp.required)) { dataType = "System.Nullable[" + dataType + "]"; } @@ -789,7 +790,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen String dataType; if (cp.isPrimitiveType) { dataType = cp.dataType; - if (!(cp.isString || cp.isFile) + if (!(cp.isString || cp.isFile || cp.isContainer) && (cp.isNullable || !cp.required)) { dataType = "System.Nullable[" + dataType + "]"; } diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache index c6cb6a24d59..5d49e5ef522 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache @@ -2,6 +2,7 @@ {{#operations}} {{#operation}} function {{{vendorExtensions.x-powershell-method-name}}} { +    [OutputType({{#returnType}}"{{{.}}}"{{/returnType}}{{^returnType}}[System.Void]{{/returnType}})] [CmdletBinding()] Param ( {{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/api_client.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/api_client.mustache index ee4cc33327a..51029124d7c 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/api_client.mustache @@ -1,6 +1,6 @@ {{> partial_header}} function Invoke-{{{apiNamePrefix}}}ApiClient { - + [OutputType('System.Collections.Hashtable')] [CmdletBinding()] Param( [Parameter(Mandatory)] @@ -32,7 +32,7 @@ function Invoke-{{{apiNamePrefix}}}ApiClient { 'Calling method: Invoke-{{{apiNamePrefix}}}ApiClient' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug - $Configuraiton = Get-{{{apiNamePrefix}}}Configuration + $Configuration = Get-{{{apiNamePrefix}}}Configuration $RequestUri = $Configuration["BaseUrl"] + $Uri # cookie parameters diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/model_test.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/model_test.mustache index a57646fb77b..626b0034712 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/model_test.mustache @@ -4,7 +4,8 @@ Describe -tag '{{{packageName}}}' -name '{{{classname}}}' { Context '{{{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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 index cb1fad7a9cf..360cb48e0cb 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 @@ -6,6 +6,7 @@ # function Add-PSPet { +    [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -58,6 +59,7 @@ function Add-PSPet { } function Remove-Pet { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -109,6 +111,7 @@ function Remove-Pet { } function Find-PSPetsByStatus { +    [OutputType("Pet[]")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -157,6 +160,7 @@ function Find-PSPetsByStatus { } function Find-PSPetsByTags { +    [OutputType("Pet[]")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -205,6 +209,7 @@ function Find-PSPetsByTags { } function Get-PSPetById { +    [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -255,6 +260,7 @@ function Get-PSPetById { } function Update-PSPet { +    [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -307,6 +313,7 @@ function Update-PSPet { } function Update-PSPetWithForm { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -368,6 +375,7 @@ function Update-PSPetWithForm { } function Invoke-PSUploadFile { +    [OutputType("ApiResponse")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 index de4dccbe6a5..0b1404b377b 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 @@ -6,6 +6,7 @@ # function Invoke-PSDeleteOrder { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -49,6 +50,7 @@ function Invoke-PSDeleteOrder { } function Get-PSInventory { +    [OutputType("{String, Int32}")] [CmdletBinding()] Param ( ) @@ -92,6 +94,7 @@ function Get-PSInventory { } function Get-PSOrderById { +    [OutputType("Order")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -138,6 +141,7 @@ function Get-PSOrderById { } function Invoke-PSPlaceOrder { +    [OutputType("Order")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 index b147c45d205..ebb0b548f10 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 @@ -6,6 +6,7 @@ # function Invoke-PSCreateUser { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -58,6 +59,7 @@ function Invoke-PSCreateUser { } function Invoke-PSCreateUsersWithArrayInput { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -110,6 +112,7 @@ function Invoke-PSCreateUsersWithArrayInput { } function Invoke-PSCreateUsersWithListInput { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -162,6 +165,7 @@ function Invoke-PSCreateUsersWithListInput { } function Invoke-PSDeleteUser { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -209,6 +213,7 @@ function Invoke-PSDeleteUser { } function Get-PSUserByName { +    [OutputType("User")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -255,6 +260,7 @@ function Get-PSUserByName { } function Invoke-PSLoginUser { +    [OutputType("String")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -310,6 +316,7 @@ function Invoke-PSLoginUser { } function Invoke-PSLogoutUser { +    [OutputType([System.Void])] [CmdletBinding()] Param ( ) @@ -350,6 +357,7 @@ function Invoke-PSLogoutUser { } function Update-PSUser { +    [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Private/PSApiClient.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Private/PSApiClient.ps1 index 9a3d0445945..b8195939d31 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Private/PSApiClient.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Private/PSApiClient.ps1 @@ -6,7 +6,7 @@ # function Invoke-PSApiClient { - + [OutputType('System.Collections.Hashtable')] [CmdletBinding()] Param( [Parameter(Mandatory)] @@ -38,7 +38,7 @@ function Invoke-PSApiClient { 'Calling method: Invoke-PSApiClient' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration $RequestUri = $Configuration["BaseUrl"] + $Uri # cookie parameters diff --git a/samples/client/petstore/powershell-experimental/tests/PSPetApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Api/PSPetApi.Tests.ps1 similarity index 100% rename from samples/client/petstore/powershell-experimental/tests/PSPetApi.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Api/PSPetApi.Tests.ps1 diff --git a/samples/client/petstore/powershell-experimental/tests/PSStoreApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 similarity index 100% rename from samples/client/petstore/powershell-experimental/tests/PSStoreApi.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 diff --git a/samples/client/petstore/powershell-experimental/tests/PSUserApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 similarity index 100% rename from samples/client/petstore/powershell-experimental/tests/PSUserApi.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 diff --git a/samples/client/petstore/powershell-experimental/tests/Configuration.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Configuration.Tests.ps1 deleted file mode 100644 index 4c955ba3efe..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/Configuration.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/ApiResponse.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/ApiResponse.Tests.ps1 similarity index 75% rename from samples/client/petstore/powershell-experimental/tests/ApiResponse.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/ApiResponse.Tests.ps1 index 4e133f13c02..dffda9d628e 100644 --- a/samples/client/petstore/powershell-experimental/tests/ApiResponse.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/ApiResponse.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -name 'ApiResponse' { Context '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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/Category.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/Category.Tests.ps1 similarity index 78% rename from samples/client/petstore/powershell-experimental/tests/Category.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/Category.Tests.ps1 index e006d90972e..dfbf366296f 100644 --- a/samples/client/petstore/powershell-experimental/tests/Category.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/Category.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -name 'Category' { Context '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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/InlineObject.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/InlineObject.Tests.ps1 similarity index 78% rename from samples/client/petstore/powershell-experimental/tests/InlineObject.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/InlineObject.Tests.ps1 index bc1b159199d..aad481ec902 100644 --- a/samples/client/petstore/powershell-experimental/tests/InlineObject.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/InlineObject.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -name 'InlineObject' { Context '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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/InlineObject1.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/InlineObject1.Tests.ps1 similarity index 87% rename from samples/client/petstore/powershell-experimental/tests/InlineObject1.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/InlineObject1.Tests.ps1 index c6616209fbf..4659487bdce 100644 --- a/samples/client/petstore/powershell-experimental/tests/InlineObject1.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/InlineObject1.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -name 'InlineObject1' { Context '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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/Order.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/Order.Tests.ps1 similarity index 67% rename from samples/client/petstore/powershell-experimental/tests/Order.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/Order.Tests.ps1 index 67020d9df46..ea9abe00588 100644 --- a/samples/client/petstore/powershell-experimental/tests/Order.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/Order.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -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 + # 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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/Pet.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/Pet.Tests.ps1 similarity index 67% rename from samples/client/petstore/powershell-experimental/tests/Pet.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/Pet.Tests.ps1 index 4c1be004e4e..61e5532be81 100644 --- a/samples/client/petstore/powershell-experimental/tests/Pet.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/Pet.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -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 + # 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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/Tag.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/Tag.Tests.ps1 similarity index 78% rename from samples/client/petstore/powershell-experimental/tests/Tag.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/Tag.Tests.ps1 index 2ad6b2cf859..23b5636b0ae 100644 --- a/samples/client/petstore/powershell-experimental/tests/Tag.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/Tag.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -name 'Tag' { Context '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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/User.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Model/User.Tests.ps1 similarity index 62% rename from samples/client/petstore/powershell-experimental/tests/User.Tests.ps1 rename to samples/client/petstore/powershell-experimental/tests/Model/User.Tests.ps1 index a440f20e772..06e309f140f 100644 --- a/samples/client/petstore/powershell-experimental/tests/User.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Model/User.Tests.ps1 @@ -8,7 +8,8 @@ Describe -tag 'PSPetstore' -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 + # 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.property | Should Be 0 } diff --git a/samples/client/petstore/powershell-experimental/tests/New-ApiResponse.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-ApiResponse.Tests.ps1 deleted file mode 100644 index 455ed6f3cb6..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-ApiResponse.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-Category.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-Category.Tests.ps1 deleted file mode 100644 index 205979e0c6a..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-Category.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-InlineObject.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-InlineObject.Tests.ps1 deleted file mode 100644 index bc1b159199d..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-InlineObject.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-InlineObject1.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-InlineObject1.Tests.ps1 deleted file mode 100644 index c6616209fbf..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-InlineObject1.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-Order.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-Order.Tests.ps1 deleted file mode 100644 index 76ca2394e41..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-Order.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-Pet.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-Pet.Tests.ps1 deleted file mode 100644 index 1c700b4d9e3..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-Pet.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-Tag.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-Tag.Tests.ps1 deleted file mode 100644 index 75f9f59576a..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-Tag.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/New-User.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/New-User.Tests.ps1 deleted file mode 100644 index 8edb23943c0..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/New-User.Tests.ps1 +++ /dev/null @@ -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 - } - } -} diff --git a/samples/client/petstore/powershell-experimental/tests/PetApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/PetApi.Tests.ps1 deleted file mode 100644 index 05128619bd2..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/PetApi.Tests.ps1 +++ /dev/null @@ -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 - } - } - -} diff --git a/samples/client/petstore/powershell-experimental/tests/StoreApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/StoreApi.Tests.ps1 deleted file mode 100644 index d24f5a8d872..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/StoreApi.Tests.ps1 +++ /dev/null @@ -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 - } - } - -} diff --git a/samples/client/petstore/powershell-experimental/tests/UserApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/UserApi.Tests.ps1 deleted file mode 100644 index 53ecd0c71fa..00000000000 --- a/samples/client/petstore/powershell-experimental/tests/UserApi.Tests.ps1 +++ /dev/null @@ -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 - } - } - -}