From ebc98ec848fb53ca28e07a20d83b7cad72d8aea6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 21 Apr 2021 10:01:41 +0800 Subject: [PATCH] [PowerShell] improve return type documentation (#9295) * revise return type doc * revise return type doc --- .../resources/powershell/api_doc.mustache | 4 +-- .../petstore/powershell/docs/PSPetApi.md | 28 +++++++++---------- .../petstore/powershell/docs/PSStoreApi.md | 12 ++++---- .../petstore/powershell/docs/PSUserApi.md | 18 ++++++------ 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache b/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache index c892573091e..7903ec98afe 100644 --- a/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache @@ -78,8 +78,8 @@ Name | Type | Description | Notes {{/allParams}} ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md) (PSCustomObject){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} ### Authorization diff --git a/samples/client/petstore/powershell/docs/PSPetApi.md b/samples/client/petstore/powershell/docs/PSPetApi.md index 3cebe2ba268..5b8c2a0f2e3 100644 --- a/samples/client/petstore/powershell/docs/PSPetApi.md +++ b/samples/client/petstore/powershell/docs/PSPetApi.md @@ -46,8 +46,8 @@ Name | Type | Description | Notes **Pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Pet**](Pet.md) + +[**Pet**](Pet.md) (PSCustomObject) ### Authorization @@ -95,7 +95,7 @@ Name | Type | Description | Notes **ApiKey** | **String**| | [optional] ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -143,8 +143,8 @@ Name | Type | Description | Notes **Status** | [**String[]**](String.md)| Status values that need to be considered for filter | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Pet[]**](Pet.md) + +[**Pet[]**](Pet.md) (PSCustomObject) ### Authorization @@ -191,8 +191,8 @@ Name | Type | Description | Notes **Tags** | [**String[]**](String.md)| Tags to filter by | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Pet[]**](Pet.md) + +[**Pet[]**](Pet.md) (PSCustomObject) ### Authorization @@ -241,8 +241,8 @@ Name | Type | Description | Notes **PetId** | **Int64**| ID of pet to return | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Pet**](Pet.md) + +[**Pet**](Pet.md) (PSCustomObject) ### Authorization @@ -287,8 +287,8 @@ Name | Type | Description | Notes **Pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Pet**](Pet.md) + +[**Pet**](Pet.md) (PSCustomObject) ### Authorization @@ -339,7 +339,7 @@ Name | Type | Description | Notes **Status** | **String**| Updated status of the pet | [optional] ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -391,8 +391,8 @@ Name | Type | Description | Notes **File** | **System.IO.FileInfo****System.IO.FileInfo**| file to upload | [optional] ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**ApiResponse**](ApiResponse.md) + +[**ApiResponse**](ApiResponse.md) (PSCustomObject) ### Authorization diff --git a/samples/client/petstore/powershell/docs/PSStoreApi.md b/samples/client/petstore/powershell/docs/PSStoreApi.md index 65d14db7eb4..33b3541ced6 100644 --- a/samples/client/petstore/powershell/docs/PSStoreApi.md +++ b/samples/client/petstore/powershell/docs/PSStoreApi.md @@ -39,7 +39,7 @@ Name | Type | Description | Notes **OrderId** | **String**| ID of the order that needs to be deleted | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -84,7 +84,7 @@ try { This endpoint does not need any parameter. ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + **System.Collections.Hashtable** ### Authorization @@ -127,8 +127,8 @@ Name | Type | Description | Notes **OrderId** | **Int64**| ID of pet that needs to be fetched | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Order**](Order.md) + +[**Order**](Order.md) (PSCustomObject) ### Authorization @@ -168,8 +168,8 @@ Name | Type | Description | Notes **Order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**Order**](Order.md) + +[**Order**](Order.md) (PSCustomObject) ### Authorization diff --git a/samples/client/petstore/powershell/docs/PSUserApi.md b/samples/client/petstore/powershell/docs/PSUserApi.md index be51a6c6f43..f008e292f2c 100644 --- a/samples/client/petstore/powershell/docs/PSUserApi.md +++ b/samples/client/petstore/powershell/docs/PSUserApi.md @@ -50,7 +50,7 @@ Name | Type | Description | Notes **User** | [**User**](User.md)| Created user object | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -98,7 +98,7 @@ Name | Type | Description | Notes **User** | [**User[]**](User.md)| List of user object | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -146,7 +146,7 @@ Name | Type | Description | Notes **User** | [**User[]**](User.md)| List of user object | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -196,7 +196,7 @@ Name | Type | Description | Notes **Username** | **String**| The name that needs to be deleted | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -237,8 +237,8 @@ Name | Type | Description | Notes **Username** | **String**| The name that needs to be fetched. Use user1 for testing. | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type -[**User**](User.md) + +[**User**](User.md) (PSCustomObject) ### Authorization @@ -281,7 +281,7 @@ Name | Type | Description | Notes **Password** | **String**| The password for login in clear text | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + **String** ### Authorization @@ -324,7 +324,7 @@ try { This endpoint does not need any parameter. ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization @@ -377,7 +377,7 @@ Name | Type | Description | Notes **User** | [**User**](User.md)| Updated user object | ### Return type -# cmdlet returns PSCustomObject, the return object contains the properties of below type + void (empty response body) ### Authorization