From ab7da95fa03639b481d2f5ba5ddbfe6c998fc691 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Fri, 20 Mar 2020 00:56:05 +0800 Subject: [PATCH 1/6] fix map type --- .../languages/PowerShellExperimentalClientCodegen.java | 4 +--- .../petstore/powershell-experimental/docs/PSStoreApi.md | 6 +++--- .../src/PSPetstore/API/PSStoreApi.ps1 | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) 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 60e51162262..c692b392b42 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 @@ -548,9 +548,7 @@ public class PowerShellExperimentalClientCodegen extends DefaultCodegen implemen Schema inner = ap.getItems(); return getTypeDeclaration(inner) + "[]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); - // TODO not sure if the following map/hash declaration is correct - return "{String, " + getTypeDeclaration(inner) + "}"; + return "Hashtable"; } else if (!languageSpecificPrimitives.contains(getSchemaType(p))) { return super.getTypeDeclaration(p); } diff --git a/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md b/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md index a392f8f7553..b9610344c8d 100644 --- a/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md +++ b/samples/client/petstore/powershell-experimental/docs/PSStoreApi.md @@ -57,7 +57,7 @@ No authorization required <a name="Get-PSInventory"></a> # **Get-PSInventory** -> {String, Int32} Get-PSInventory<br> +> Hashtable Get-PSInventory<br> Returns pet inventories by status @@ -76,7 +76,7 @@ $Configuration["ApiKey"]["api_key"] = "YOUR_API_KEY" # Returns pet inventories by status try { - {String, Int32} $Result = Get-PSInventory + Hashtable $Result = Get-PSInventory } catch { Write-Host ($_.ErrorDetails | ConvertFrom-Json) Write-Host ($_.Exception.Response.Headers | ConvertTo-Json) @@ -88,7 +88,7 @@ This endpoint does not need any parameter. ### Return type -**{String, Int32}** +**Hashtable** ### Authorization 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 0b1404b377b..58248c1e035 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 @@ -50,7 +50,7 @@ function Invoke-PSDeleteOrder { } function Get-PSInventory { -Â Â Â [OutputType("{String, Int32}")] +Â Â Â [OutputType("Hashtable")] [CmdletBinding()] Param ( ) @@ -87,7 +87,7 @@ function Get-PSInventory { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "{String, Int32}" + -ReturnType "Hashtable" return $LocalVarResult["Response"] } -- GitLab From 8a64c8aaf88a5be67566b7df25c07a999ffa8afb Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Fri, 20 Mar 2020 12:58:28 +0800 Subject: [PATCH 2/6] remove output type, fix appveyor --- .../main/resources/powershell-experimental/api.mustache | 1 - .../resources/powershell-experimental/appveyor.mustache | 1 + .../client/petstore/powershell-experimental/appveyor.yml | 1 + .../src/PSPetstore/API/PSPetApi.ps1 | 8 -------- .../src/PSPetstore/API/PSStoreApi.ps1 | 4 ---- .../src/PSPetstore/API/PSUserApi.ps1 | 8 -------- 6 files changed, 2 insertions(+), 21 deletions(-) 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 5d49e5ef522..c6cb6a24d59 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache @@ -2,7 +2,6 @@ {{#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/appveyor.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache index f808ee4a9cf..bf8b632738c 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache @@ -4,6 +4,7 @@ image: - Visual Studio 2017 - Ubuntu install: + - ps: $PSVersionTable.PSVersion - ps: Install-Module Pester -Force -Scope CurrentUser build: off test_script: diff --git a/samples/client/petstore/powershell-experimental/appveyor.yml b/samples/client/petstore/powershell-experimental/appveyor.yml index 7652f202b97..3e5a3bafc92 100644 --- a/samples/client/petstore/powershell-experimental/appveyor.yml +++ b/samples/client/petstore/powershell-experimental/appveyor.yml @@ -10,6 +10,7 @@ image: - Visual Studio 2017 - Ubuntu install: + - ps: $PSVersionTable.PSVersion - ps: Install-Module Pester -Force -Scope CurrentUser build: off test_script: 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 360cb48e0cb..cb1fad7a9cf 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 @@ -6,7 +6,6 @@ # function Add-PSPet { -Â Â Â [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -59,7 +58,6 @@ function Add-PSPet { } function Remove-Pet { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -111,7 +109,6 @@ function Remove-Pet { } function Find-PSPetsByStatus { -Â Â Â [OutputType("Pet[]")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -160,7 +157,6 @@ function Find-PSPetsByStatus { } function Find-PSPetsByTags { -Â Â Â [OutputType("Pet[]")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -209,7 +205,6 @@ function Find-PSPetsByTags { } function Get-PSPetById { -Â Â Â [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -260,7 +255,6 @@ function Get-PSPetById { } function Update-PSPet { -Â Â Â [OutputType("Pet")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -313,7 +307,6 @@ function Update-PSPet { } function Update-PSPetWithForm { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -375,7 +368,6 @@ 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 58248c1e035..dec93fd7e7d 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 @@ -6,7 +6,6 @@ # function Invoke-PSDeleteOrder { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -50,7 +49,6 @@ function Invoke-PSDeleteOrder { } function Get-PSInventory { -Â Â Â [OutputType("Hashtable")] [CmdletBinding()] Param ( ) @@ -94,7 +92,6 @@ function Get-PSInventory { } function Get-PSOrderById { -Â Â Â [OutputType("Order")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -141,7 +138,6 @@ 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 ebb0b548f10..b147c45d205 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 @@ -6,7 +6,6 @@ # function Invoke-PSCreateUser { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -59,7 +58,6 @@ function Invoke-PSCreateUser { } function Invoke-PSCreateUsersWithArrayInput { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -112,7 +110,6 @@ function Invoke-PSCreateUsersWithArrayInput { } function Invoke-PSCreateUsersWithListInput { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -165,7 +162,6 @@ function Invoke-PSCreateUsersWithListInput { } function Invoke-PSDeleteUser { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -213,7 +209,6 @@ function Invoke-PSDeleteUser { } function Get-PSUserByName { -Â Â Â [OutputType("User")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -260,7 +255,6 @@ function Get-PSUserByName { } function Invoke-PSLoginUser { -Â Â Â [OutputType("String")] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] @@ -316,7 +310,6 @@ function Invoke-PSLoginUser { } function Invoke-PSLogoutUser { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( ) @@ -357,7 +350,6 @@ function Invoke-PSLogoutUser { } function Update-PSUser { -Â Â Â [OutputType([System.Void])] [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] -- GitLab From 04ec6aed95c8c216fd3d8f66ed796cbe7f04e330 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Fri, 20 Mar 2020 14:49:56 +0800 Subject: [PATCH 3/6] test macos --- .../main/resources/powershell-experimental/appveyor.mustache | 5 +++-- samples/client/petstore/powershell-experimental/appveyor.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache index bf8b632738c..eb11fbdc189 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/appveyor.mustache @@ -1,8 +1,9 @@ {{> partial_header}} version: 1.0.{build} image: - - Visual Studio 2017 - - Ubuntu + - Visual Studio 2017 # PS 5.x + - Ubuntu # PS 6.x + - macOS # PS 6.x install: - ps: $PSVersionTable.PSVersion - ps: Install-Module Pester -Force -Scope CurrentUser diff --git a/samples/client/petstore/powershell-experimental/appveyor.yml b/samples/client/petstore/powershell-experimental/appveyor.yml index 3e5a3bafc92..683e42df384 100644 --- a/samples/client/petstore/powershell-experimental/appveyor.yml +++ b/samples/client/petstore/powershell-experimental/appveyor.yml @@ -7,8 +7,9 @@ version: 1.0.{build} image: - - Visual Studio 2017 - - Ubuntu + - Visual Studio 2017 # PS 5.x + - Ubuntu # PS 6.x + - macOS # PS 6.x install: - ps: $PSVersionTable.PSVersion - ps: Install-Module Pester -Force -Scope CurrentUser -- GitLab From 1dcf84ffcbb7ab520938ae7c75d60a8329f71478 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Fri, 20 Mar 2020 16:29:35 +0800 Subject: [PATCH 4/6] comment out failing scala test --- .../scala-httpclient/src/test/scala/UserApiTest.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala b/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala index a7942a788d9..66fef2d651a 100644 --- a/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala +++ b/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala @@ -1,7 +1,7 @@ import org.openapitools.client._ import org.openapitools.client.api._ import org.openapitools.client.model._ - + import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest._ @@ -52,6 +52,7 @@ class UserApiTest extends FlatSpec with Matchers with BeforeAndAfterAll { } } +/* 2020/03/20 - comment out the following test as it's failing itself without any changes in the scala client it should "authenticate a user" in { api.loginUser("scala-test-username", "SCALATEST") match { case Some(status) => status.startsWith("logged in user session") match { @@ -61,6 +62,7 @@ class UserApiTest extends FlatSpec with Matchers with BeforeAndAfterAll { case None => fail("not able to login") } } +*/ it should "log out a user" in { api.logoutUser -- GitLab From 635147ccc5bba19e28984e56410cc1a7fc3f8850 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Sat, 21 Mar 2020 21:25:39 +0800 Subject: [PATCH 5/6] fix typo: configuration --- .../powershell-experimental/api.mustache | 2 +- .../src/PSPetstore/API/PSPetApi.ps1 | 16 ++++++++-------- .../src/PSPetstore/API/PSStoreApi.ps1 | 8 ++++---- .../src/PSPetstore/API/PSUserApi.ps1 | 16 ++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) 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..60955ee8661 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/api.mustache @@ -26,7 +26,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-{{{apiNamePrefix}}}Configuration + $Configuration = Get-{{{apiNamePrefix}}}Configuration {{#hasProduces}} # HTTP header 'Accept' (if needed) $LocalVarAccepts = @({{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}) 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..7bbc0128145 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSPetApi.ps1 @@ -26,7 +26,7 @@ function Add-PSPet { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -81,7 +81,7 @@ function Remove-Pet { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration $LocalVarUri = '/pet/{petId}' if (!$PetId) { throw "Error! The required parameter `PetId` missing when calling deletePet." @@ -129,7 +129,7 @@ function Find-PSPetsByStatus { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -177,7 +177,7 @@ function Find-PSPetsByTags { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -225,7 +225,7 @@ function Get-PSPetById { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -275,7 +275,7 @@ function Update-PSPet { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -333,7 +333,7 @@ function Update-PSPetWithForm { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/x-www-form-urlencoded') @@ -394,7 +394,7 @@ function Invoke-PSUploadFile { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') 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 dec93fd7e7d..3dfb8c00d6b 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSStoreApi.ps1 @@ -26,7 +26,7 @@ function Invoke-PSDeleteOrder { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration $LocalVarUri = '/store/order/{orderId}' if (!$OrderId) { throw "Error! The required parameter `OrderId` missing when calling deleteOrder." @@ -66,7 +66,7 @@ function Get-PSInventory { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') @@ -112,7 +112,7 @@ function Get-PSOrderById { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -158,7 +158,7 @@ function Invoke-PSPlaceOrder { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') 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..f6b2d3ae67a 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/API/PSUserApi.ps1 @@ -26,7 +26,7 @@ function Invoke-PSCreateUser { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') @@ -78,7 +78,7 @@ function Invoke-PSCreateUsersWithArrayInput { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') @@ -130,7 +130,7 @@ function Invoke-PSCreateUsersWithListInput { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') @@ -182,7 +182,7 @@ function Invoke-PSDeleteUser { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration $LocalVarUri = '/user/{username}' if (!$Username) { throw "Error! The required parameter `Username` missing when calling deleteUser." @@ -229,7 +229,7 @@ function Get-PSUserByName { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -278,7 +278,7 @@ function Invoke-PSLoginUser { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/xml', 'application/json') @@ -327,7 +327,7 @@ function Invoke-PSLogoutUser { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration $LocalVarUri = '/user/logout' if ($Configuration["Cookie"]) { @@ -373,7 +373,7 @@ function Update-PSUser { $LocalVarCookieParameters = @{} $LocalVarBodyParameter - $Configuraiton = Get-PSConfiguration + $Configuration = Get-PSConfiguration # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') -- GitLab From 0167ef72a7f20c394af2b2716b826ac1364e8e65 Mon Sep 17 00:00:00 2001 From: William Cheng <wing328hk@gmail.com> Date: Mon, 23 Mar 2020 14:56:21 +0800 Subject: [PATCH 6/6] Revert "comment out failing scala test" This reverts commit 1dcf84ffcbb7ab520938ae7c75d60a8329f71478. --- .../scala-httpclient/src/test/scala/UserApiTest.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala b/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala index 66fef2d651a..a7942a788d9 100644 --- a/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala +++ b/samples/client/petstore/scala-httpclient/src/test/scala/UserApiTest.scala @@ -1,7 +1,7 @@ import org.openapitools.client._ import org.openapitools.client.api._ import org.openapitools.client.model._ - + import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest._ @@ -52,7 +52,6 @@ class UserApiTest extends FlatSpec with Matchers with BeforeAndAfterAll { } } -/* 2020/03/20 - comment out the following test as it's failing itself without any changes in the scala client it should "authenticate a user" in { api.loginUser("scala-test-username", "SCALATEST") match { case Some(status) => status.startsWith("logged in user session") match { @@ -62,7 +61,6 @@ class UserApiTest extends FlatSpec with Matchers with BeforeAndAfterAll { case None => fail("not able to login") } } -*/ it should "log out a user" in { api.logoutUser -- GitLab