[PowerShell] discard readonly properties in Initialize cmdlets (#6754)

* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

* [powershell-experimental] : http signature auth

* fix the tab issue

* merge cnflict fix for powershell experimental

* Htpp signing : added support for ecdsa

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* HttpSigningHeader accepts any header available in request to calculate the signature.

* Update modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Incorporated the review comments

* addressed the merge conflict

* discard readonly property in initialize cmdlets

* update doc

* update powershell sample

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Ghufz
2020-06-25 14:04:38 +05:30
committed by GitHub
parent 6b877efe1f
commit 13fe079901
11 changed files with 148 additions and 42 deletions

View File

@@ -16,13 +16,10 @@ Describes the result of uploading an image resource
.PARAMETER Code
No description available.
.PARAMETER Type
No description available.
.PARAMETER Message
No description available.
.OUTPUTS
ApiResponse<PSCustomObject>
@@ -46,11 +43,13 @@ function Initialize-PSApiResponse {
'Creating PSCustomObject: PSPetstore => PSApiResponse' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"code" = ${Code}
"type" = ${Type}
"message" = ${Message}
}
return $PSO
}

View File

@@ -16,10 +16,8 @@ A category for a pet
.PARAMETER Id
No description available.
.PARAMETER Name
No description available.
.OUTPUTS
Category<PSCustomObject>
@@ -41,10 +39,12 @@ function Initialize-PSCategory {
'Creating PSCustomObject: PSPetstore => PSCategory' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"name" = ${Name}
}
return $PSO
}

View File

@@ -16,10 +16,8 @@ No description available.
.PARAMETER Name
Updated name of the pet
.PARAMETER Status
Updated status of the pet
.OUTPUTS
InlineObject<PSCustomObject>
@@ -40,10 +38,12 @@ function Initialize-PSInlineObject {
'Creating PSCustomObject: PSPetstore => PSInlineObject' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"name" = ${Name}
"status" = ${Status}
}
return $PSO
}

View File

@@ -16,10 +16,8 @@ No description available.
.PARAMETER AdditionalMetadata
Additional data to pass to server
.PARAMETER File
file to upload
.OUTPUTS
InlineObject1<PSCustomObject>
@@ -40,10 +38,12 @@ function Initialize-PSInlineObject1 {
'Creating PSCustomObject: PSPetstore => PSInlineObject1' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"additionalMetadata" = ${AdditionalMetadata}
"file" = ${File}
}
return $PSO
}

View File

@@ -16,22 +16,16 @@ An order for a pets from the pet store
.PARAMETER Id
No description available.
.PARAMETER PetId
No description available.
.PARAMETER Quantity
No description available.
.PARAMETER ShipDate
No description available.
.PARAMETER Status
Order Status
.PARAMETER Complete
No description available.
.OUTPUTS
Order<PSCustomObject>
@@ -65,7 +59,8 @@ function Initialize-PSOrder {
'Creating PSCustomObject: PSPetstore => PSOrder' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"petId" = ${PetId}
"quantity" = ${Quantity}
@@ -73,6 +68,7 @@ function Initialize-PSOrder {
"status" = ${Status}
"complete" = ${Complete}
}
return $PSO
}

View File

@@ -16,22 +16,16 @@ A pet for sale in the pet store
.PARAMETER Id
No description available.
.PARAMETER Category
No description available.
.PARAMETER Name
No description available.
.PARAMETER PhotoUrls
No description available.
.PARAMETER Tags
No description available.
.PARAMETER Status
pet status in the store
.OUTPUTS
Pet<PSCustomObject>
@@ -73,7 +67,8 @@ function Initialize-PSPet {
throw "invalid value for 'PhotoUrls', 'PhotoUrls' cannot be null."
}
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"category" = ${Category}
"name" = ${Name}
@@ -81,6 +76,7 @@ function Initialize-PSPet {
"tags" = ${Tags}
"status" = ${Status}
}
return $PSO
}

View File

@@ -16,10 +16,8 @@ A tag for a pet
.PARAMETER Id
No description available.
.PARAMETER Name
No description available.
.OUTPUTS
Tag<PSCustomObject>
@@ -40,10 +38,12 @@ function Initialize-PSTag {
'Creating PSCustomObject: PSPetstore => PSTag' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"name" = ${Name}
}
return $PSO
}

View File

@@ -16,28 +16,20 @@ A User who is purchasing from the pet store
.PARAMETER Id
No description available.
.PARAMETER Username
No description available.
.PARAMETER FirstName
No description available.
.PARAMETER LastName
No description available.
.PARAMETER Email
No description available.
.PARAMETER Password
No description available.
.PARAMETER Phone
No description available.
.PARAMETER UserStatus
User Status
.OUTPUTS
User<PSCustomObject>
@@ -77,7 +69,8 @@ function Initialize-PSUser {
'Creating PSCustomObject: PSPetstore => PSUser' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"username" = ${Username}
"firstName" = ${FirstName}
@@ -87,6 +80,7 @@ function Initialize-PSUser {
"phone" = ${Phone}
"userStatus" = ${UserStatus}
}
return $PSO
}