[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 update
#- sudo apt-get install dart #- sudo apt-get install dart
# switch to php7 # switch to php7
- phpenv global 7.3 - phpenv versions
- phpenv global 7.2.15
- php -v - php -v
# install perl module # install perl module
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) #- 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 // Mark the last readonly false property
if(this.discardReadOnly && lastWritableProperty != null) { 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); model.allVars.set(model.allVars.indexOf(lastWritableProperty), lastWritableProperty);
} }

View File

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