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 3ccfda49beb7..a66f57b37e4e 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 @@ -804,7 +804,7 @@ private String constructExampleCode(CodegenModel codegenModel, HashMap propertyExamples = new ArrayList<>(); for (CodegenProperty codegenProperty : codegenModel.vars) { propertyExamples.add(" -" + codegenProperty.name + " " + constructExampleCode(codegenProperty, modelMaps, processedModelMap)); diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/model.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/model.mustache index 10b8de2f1b19..c13346e061ae 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/model.mustache @@ -20,7 +20,7 @@ {{{classname}}} #> -function New-{{{apiNamePrefix}}}{{{classname}}} { +function Prepare-{{{apiNamePrefix}}}{{{classname}}} { [CmdletBinding()] Param ( {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/model_doc.mustache index 99154a129f1f..f76841b2660a 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/model_doc.mustache @@ -10,20 +10,19 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-{{{packageName}}}{{{classname}}} {{#vars}} -{{name}} {{example}}{{#hasMore}} ` +Prepare-{{{packageName}}}{{{classname}}} {{#vars}} -{{name}} {{example}}{{#hasMore}} ` {{/hasMore}} {{/vars}} ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell ${{className}} | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) {{/model}} diff --git a/samples/client/petstore/powershell-experimental/docs/ApiResponse.md b/samples/client/petstore/powershell-experimental/docs/ApiResponse.md index 7591fb3fc69c..87d631e3e487 100644 --- a/samples/client/petstore/powershell-experimental/docs/ApiResponse.md +++ b/samples/client/petstore/powershell-experimental/docs/ApiResponse.md @@ -9,18 +9,17 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreApiResponse -Code null ` +Prepare-PSPetstoreApiResponse -Code null ` -Type null ` -Message null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/Category.md b/samples/client/petstore/powershell-experimental/docs/Category.md index a2b26ab87edf..f5117bf59d81 100644 --- a/samples/client/petstore/powershell-experimental/docs/Category.md +++ b/samples/client/petstore/powershell-experimental/docs/Category.md @@ -8,17 +8,16 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreCategory -Id null ` +Prepare-PSPetstoreCategory -Id null ` -Name null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/InlineObject.md b/samples/client/petstore/powershell-experimental/docs/InlineObject.md index 06592d944127..e7041bdb14be 100644 --- a/samples/client/petstore/powershell-experimental/docs/InlineObject.md +++ b/samples/client/petstore/powershell-experimental/docs/InlineObject.md @@ -8,17 +8,16 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreInlineObject -Name null ` +Prepare-PSPetstoreInlineObject -Name null ` -Status null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/InlineObject1.md b/samples/client/petstore/powershell-experimental/docs/InlineObject1.md index baeae9c30153..ec4b3baf3f87 100644 --- a/samples/client/petstore/powershell-experimental/docs/InlineObject1.md +++ b/samples/client/petstore/powershell-experimental/docs/InlineObject1.md @@ -8,17 +8,16 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreInlineObject1 -AdditionalMetadata null ` +Prepare-PSPetstoreInlineObject1 -AdditionalMetadata null ` -File null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/Order.md b/samples/client/petstore/powershell-experimental/docs/Order.md index 17bbc66a5666..3a06f592d2e1 100644 --- a/samples/client/petstore/powershell-experimental/docs/Order.md +++ b/samples/client/petstore/powershell-experimental/docs/Order.md @@ -12,9 +12,9 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreOrder -Id null ` +Prepare-PSPetstoreOrder -Id null ` -PetId null ` -Quantity null ` -ShipDate null ` @@ -22,11 +22,10 @@ New-PSPetstoreOrder -Id null ` -Complete null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/PSPetApi.md b/samples/client/petstore/powershell-experimental/docs/PSPetApi.md index 0d6c2ae17a81..ee624064c110 100644 --- a/samples/client/petstore/powershell-experimental/docs/PSPetApi.md +++ b/samples/client/petstore/powershell-experimental/docs/PSPetApi.md @@ -29,7 +29,7 @@ $Configuration = Get-PSPetstoreConfiguration # Configure OAuth2 access token for authorization: petstore_auth $Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN"; -$Pet = (New-Pet -Id 123 -Category (New-Category -Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((New-Tag -Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store +$Pet = (Prepare-Pet -Id 123 -Category (Prepare-Category -Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((Prepare-Tag -Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store # Add a new pet to the store try { @@ -275,7 +275,7 @@ $Configuration = Get-PSPetstoreConfiguration # Configure OAuth2 access token for authorization: petstore_auth $Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN"; -$Pet = (New-Pet -Id 123 -Category (New-Category -Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((New-Tag -Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store +$Pet = (Prepare-Pet -Id 123 -Category (Prepare-Category -Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((Prepare-Tag -Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store # Update an existing pet try { diff --git a/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md b/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md index 22db0efa66cd..e9156eac609f 100644 --- a/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md +++ b/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md @@ -157,7 +157,7 @@ Place an order for a pet ```powershell Import-Module -Name PSPetstore -$Order = (New-Order -Id 123 -PetId 123 -Quantity 123 -ShipDate Get-Date -Status "Status_example" -Complete $false) # Order | order placed for purchasing the pet +$Order = (Prepare-Order -Id 123 -PetId 123 -Quantity 123 -ShipDate Get-Date -Status "Status_example" -Complete $false) # Order | order placed for purchasing the pet # Place an order for a pet try { diff --git a/samples/client/petstore/powershell-experimental/docs/PSUserApi.md b/samples/client/petstore/powershell-experimental/docs/PSUserApi.md index 3228ef86d7cc..a06635fa9a1a 100644 --- a/samples/client/petstore/powershell-experimental/docs/PSUserApi.md +++ b/samples/client/petstore/powershell-experimental/docs/PSUserApi.md @@ -33,7 +33,7 @@ $Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY" # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed #$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer" -$User = (New-User -Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123) # User | Created user object +$User = (Prepare-User -Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123) # User | Created user object # Create user try { @@ -82,7 +82,7 @@ $Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY" # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed #$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer" -$User = @((New-User -Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123)) # User[] | List of user object +$User = @((Prepare-User -Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123)) # User[] | List of user object # Creates list of users with given input array try { diff --git a/samples/client/petstore/powershell-experimental/docs/Pet.md b/samples/client/petstore/powershell-experimental/docs/Pet.md index 07dc692ed89a..d8a97fcc46d1 100644 --- a/samples/client/petstore/powershell-experimental/docs/Pet.md +++ b/samples/client/petstore/powershell-experimental/docs/Pet.md @@ -12,9 +12,9 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstorePet -Id null ` +Prepare-PSPetstorePet -Id null ` -Category null ` -Name doggie ` -PhotoUrls null ` @@ -22,11 +22,10 @@ New-PSPetstorePet -Id null ` -Status null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/Tag.md b/samples/client/petstore/powershell-experimental/docs/Tag.md index 9ac3a8be9112..ffce71eb4176 100644 --- a/samples/client/petstore/powershell-experimental/docs/Tag.md +++ b/samples/client/petstore/powershell-experimental/docs/Tag.md @@ -8,17 +8,16 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreTag -Id null ` +Prepare-PSPetstoreTag -Id null ` -Name null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/docs/User.md b/samples/client/petstore/powershell-experimental/docs/User.md index 8abce7b6140f..e5b6357ede21 100644 --- a/samples/client/petstore/powershell-experimental/docs/User.md +++ b/samples/client/petstore/powershell-experimental/docs/User.md @@ -14,9 +14,9 @@ Name | Type | Description | Notes ## Examples -- Create a new object +- Prepare the resource ```powershell -New-PSPetstoreUser -Id null ` +Prepare-PSPetstoreUser -Id null ` -Username null ` -FirstName null ` -LastName null ` @@ -26,11 +26,10 @@ New-PSPetstoreUser -Id null ` -UserStatus null ``` -- Convert the object to JSON +- Convert the resource to JSON ```powershell $ | Convert-ToJSON ``` - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/ApiResponse.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/ApiResponse.ps1 index cdc16c1061b6..3cefe89964e1 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/ApiResponse.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/ApiResponse.ps1 @@ -28,7 +28,7 @@ No description available. ApiResponse #> -function New-PSApiResponse { +function Prepare-PSApiResponse { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Category.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Category.ps1 index 97a5cb5727f8..3ce03a0f1831 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Category.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Category.ps1 @@ -25,7 +25,7 @@ No description available. Category #> -function New-PSCategory { +function Prepare-PSCategory { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject.ps1 index 2bfa65d959cc..f1d953ceebf6 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject.ps1 @@ -25,7 +25,7 @@ Updated status of the pet InlineObject #> -function New-PSInlineObject { +function Prepare-PSInlineObject { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject1.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject1.ps1 index 26f780896613..989cd24ce7b0 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject1.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/InlineObject1.ps1 @@ -25,7 +25,7 @@ file to upload InlineObject1 #> -function New-PSInlineObject1 { +function Prepare-PSInlineObject1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Order.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Order.ps1 index e094395a50a0..3f38a161b440 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Order.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Order.ps1 @@ -37,7 +37,7 @@ No description available. Order #> -function New-PSOrder { +function Prepare-PSOrder { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Pet.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Pet.ps1 index e3350562701e..4d42c4b120f5 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Pet.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Pet.ps1 @@ -37,7 +37,7 @@ pet status in the store Pet #> -function New-PSPet { +function Prepare-PSPet { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Tag.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Tag.ps1 index 1b425d8c476d..7f66f78ebd12 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Tag.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/Tag.ps1 @@ -25,7 +25,7 @@ No description available. Tag #> -function New-PSTag { +function Prepare-PSTag { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/User.ps1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/User.ps1 index 91f521c101bb..da7c598b0976 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/User.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/Model/User.ps1 @@ -43,7 +43,7 @@ User Status User #> -function New-PSUser { +function Prepare-PSUser { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 index ef15154b3144..c8dfc5fef0d1 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 @@ -3,7 +3,7 @@ # # Generated by: OpenAPI Generator Team # -# Generated on: 3/31/20 +# Generated on: 4/1/20 # @{ @@ -75,11 +75,12 @@ FunctionsToExport = 'Add-PSPet', 'Remove-Pet', 'Find-PSPetsByStatus', 'Find-PSPe 'Get-PSOrderById', 'Invoke-PSPlaceOrder', 'New-PSUser', 'New-PSUsersWithArrayInput', 'New-PSUsersWithListInput', 'Remove-PSUser', 'Get-PSUserByName', 'Invoke-PSLoginUser', - 'Invoke-PSLogoutUser', 'Update-PSUser', 'New-PSApiResponse', - 'New-PSCategory', 'New-PSInlineObject', 'New-PSInlineObject1', - 'New-PSOrder', 'New-PSPet', 'New-PSTag', 'New-PSUser', - 'Get-PSConfiguration', 'Set-PSConfiguration', - 'Set-PSConfigurationApiKey', 'Set-PSConfigurationApiKeyPrefix', + 'Invoke-PSLogoutUser', 'Update-PSUser', 'Prepare-PSApiResponse', + 'Prepare-PSCategory', 'Prepare-PSInlineObject', + 'Prepare-PSInlineObject1', 'Prepare-PSOrder', 'Prepare-PSPet', + 'Prepare-PSTag', 'Prepare-PSUser', 'Get-PSConfiguration', + 'Set-PSConfiguration', 'Set-PSConfigurationApiKey', + 'Set-PSConfigurationApiKeyPrefix', 'Set-PSConfigurationDefaultHeader', 'Get-PSHostSettings', 'Get-PSUrlFromHostSettings' diff --git a/samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 index c01ef2b17e1d..de3c4226f940 100644 --- a/samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Api/PSStoreApi.Tests.ps1 @@ -6,8 +6,8 @@ # Describe -tag 'PSPetstore' -name 'PSStoreApi' { - Context 'Invoke-PSDeleteOrder' { - It 'Test Invoke-PSDeleteOrder' { + Context 'Remove-PSOrder' { + It 'Test Remove-PSOrder' { #$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE" #$TestResult | Should BeOfType TODO #$TestResult.property | Should Be 0 diff --git a/samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 index e1619dfbaa30..757592bd9322 100644 --- a/samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Api/PSUserApi.Tests.ps1 @@ -6,32 +6,32 @@ # Describe -tag 'PSPetstore' -name 'PSUserApi' { - Context 'Invoke-PSCreateUser' { - It 'Test Invoke-PSCreateUser' { + Context 'New-PSUser' { + It 'Test New-PSUser' { #$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE" #$TestResult | Should BeOfType TODO #$TestResult.property | Should Be 0 } } - Context 'Invoke-PSCreateUsersWithArrayInput' { - It 'Test Invoke-PSCreateUsersWithArrayInput' { + Context 'New-PSUsersWithArrayInput' { + It 'Test New-PSUsersWithArrayInput' { #$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE" #$TestResult | Should BeOfType TODO #$TestResult.property | Should Be 0 } } - Context 'Invoke-PSCreateUsersWithListInput' { - It 'Test Invoke-PSCreateUsersWithListInput' { + Context 'New-PSUsersWithListInput' { + It 'Test New-PSUsersWithListInput' { #$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE" #$TestResult | Should BeOfType TODO #$TestResult.property | Should Be 0 } } - Context 'Invoke-PSDeleteUser' { - It 'Test Invoke-PSDeleteUser' { + Context 'Remove-PSUser' { + It 'Test Remove-PSUser' { #$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" #$TestResult | Should BeOfType TODO #$TestResult.property | Should Be 0 diff --git a/samples/client/petstore/powershell-experimental/tests/Petstore.Tests.ps1 b/samples/client/petstore/powershell-experimental/tests/Petstore.Tests.ps1 index c2f8f170c907..8ac2cd46f32b 100644 --- a/samples/client/petstore/powershell-experimental/tests/Petstore.Tests.ps1 +++ b/samples/client/petstore/powershell-experimental/tests/Petstore.Tests.ps1 @@ -11,13 +11,13 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' { $Id = 38369 # Add pet - $Pet = New-PSPet -Id $Id -Name 'PowerShell' -Category ( - New-PSCategory -Id $Id -Name 'PSCategory' + $Pet = Prepare-PSPet -Id $Id -Name 'PowerShell' -Category ( + Prepare-PSCategory -Id $Id -Name 'PSCategory' ) -PhotoUrls @( 'http://example.com/foo', 'http://example.com/bar' ) -Tags ( - New-PSTag -Id $Id -Name 'PSTag' + Prepare-PSTag -Id $Id -Name 'PSTag' ) -Status Available $Result = Add-PSPet -Pet $Pet @@ -36,13 +36,13 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' { $Result."status" | Should Be "Pending" # Update (put) - $NewPet = New-PSPet -Id $Id -Name 'PowerShell2' -Category ( - New-PSCategory -Id $Id -Name 'PSCategory2' + $NewPet = Prepare-PSPet -Id $Id -Name 'PowerShell2' -Category ( + Prepare-PSCategory -Id $Id -Name 'PSCategory2' ) -PhotoUrls @( 'http://example.com/foo2', 'http://example.com/bar2' ) -Tags ( - New-PSTag -Id $Id -Name 'PSTag2' + Prepare-PSTag -Id $Id -Name 'PSTag2' ) -Status Sold $Result = Update-PSPet -Pet $NewPet