[PS] better code format, vendor extension naming (#6778)

* better code format, extension

* show php version

* set php version to 7.2.15
This commit is contained in:
William Cheng 2020-06-25 18:09:44 +08:00 committed by GitHub
parent 13fe079901
commit 36930fe5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 31 additions and 30 deletions

View File

@ -89,7 +89,8 @@ before_install:
#- sudo apt-get update
#- sudo apt-get install dart
# switch to php7
- phpenv global 7.3
- phpenv versions
- phpenv global 7.2.15
- php -v
# install perl module
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)

View File

@ -932,7 +932,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
// Mark the last readonly false property
if(this.discardReadOnly && lastWritableProperty != null) {
lastWritableProperty.vendorExtensions.put("x-lastWritable", true);
lastWritableProperty.vendorExtensions.put("x-powershell-last-writable", true);
model.allVars.set(model.allVars.indexOf(lastWritableProperty), lastWritableProperty);
}

View File

@ -41,7 +41,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
{{/isEnum}}
[{{vendorExtensions.x-powershell-data-type}}]
{{=<% %>=}}
${<%name%>}<%^vendorExtensions.x-lastWritable%>,<%/vendorExtensions.x-lastWritable%>
${<%name%>}<%^vendorExtensions.x-powershell-last-writable%>,<%/vendorExtensions.x-powershell-last-writable%>
<%={{ }}=%>
{{/isReadOnly}}
{{/allVars}}
@ -119,7 +119,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
{{/hasValidation}}
{{/vars}}
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
{{=<< >>=}}
<<#allVars>>
"<<baseName>>" = ${<<name>>}

View File

@ -44,7 +44,7 @@ function Initialize-PSApiResponse {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"code" = ${Code}
"type" = ${Type}
"message" = ${Message}

View File

@ -40,7 +40,7 @@ function Initialize-PSCategory {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"name" = ${Name}
}

View File

@ -39,7 +39,7 @@ function Initialize-PSInlineObject {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"name" = ${Name}
"status" = ${Status}
}

View File

@ -39,7 +39,7 @@ function Initialize-PSInlineObject1 {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"additionalMetadata" = ${AdditionalMetadata}
"file" = ${File}
}

View File

@ -60,7 +60,7 @@ function Initialize-PSOrder {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"petId" = ${PetId}
"quantity" = ${Quantity}

View File

@ -68,7 +68,7 @@ function Initialize-PSPet {
}
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"category" = ${Category}
"name" = ${Name}

View File

@ -39,7 +39,7 @@ function Initialize-PSTag {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"name" = ${Name}
}

View File

@ -70,7 +70,7 @@ function Initialize-PSUser {
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
$PSO = [PSCustomObject]@{
"id" = ${Id}
"username" = ${Username}
"firstName" = ${FirstName}