forked from loafle/openapi-generator-original
Replace powershell generator with powershell-experimental generator (#6213)
* replace powershell generator with powershell-experimental generator * add back samples * add back scripts * remove outdated script * update doc
This commit is contained in:
25
samples/client/petstore/powershell/docs/ApiResponse.md
Normal file
25
samples/client/petstore/powershell/docs/ApiResponse.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# ApiResponse
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | **Int32** | | [optional] [default to null]
|
||||
**Type** | **String** | | [optional] [default to null]
|
||||
**Message** | **String** | | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreApiResponse -Code null `
|
||||
-Type null `
|
||||
-Message null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
23
samples/client/petstore/powershell/docs/Category.md
Normal file
23
samples/client/petstore/powershell/docs/Category.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Category
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **Int64** | | [optional] [default to null]
|
||||
**Name** | **String** | | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreCategory -Id null `
|
||||
-Name null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
23
samples/client/petstore/powershell/docs/InlineObject.md
Normal file
23
samples/client/petstore/powershell/docs/InlineObject.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# InlineObject
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **String** | Updated name of the pet | [optional] [default to null]
|
||||
**Status** | **String** | Updated status of the pet | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreInlineObject -Name null `
|
||||
-Status null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
23
samples/client/petstore/powershell/docs/InlineObject1.md
Normal file
23
samples/client/petstore/powershell/docs/InlineObject1.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# InlineObject1
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **String** | Additional data to pass to server | [optional] [default to null]
|
||||
**File** | **System.IO.FileInfo** | file to upload | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreInlineObject1 -AdditionalMetadata null `
|
||||
-File null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
31
samples/client/petstore/powershell/docs/Order.md
Normal file
31
samples/client/petstore/powershell/docs/Order.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Order
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **Int64** | | [optional] [default to null]
|
||||
**PetId** | **Int64** | | [optional] [default to null]
|
||||
**Quantity** | **Int32** | | [optional] [default to null]
|
||||
**ShipDate** | **System.DateTime** | | [optional] [default to null]
|
||||
**Status** | **String** | Order Status | [optional] [default to null]
|
||||
**Complete** | **Boolean** | | [optional] [default to false]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreOrder -Id null `
|
||||
-PetId null `
|
||||
-Quantity null `
|
||||
-ShipDate null `
|
||||
-Status null `
|
||||
-Complete null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
415
samples/client/petstore/powershell/docs/PSPetApi.md
Normal file
415
samples/client/petstore/powershell/docs/PSPetApi.md
Normal file
@@ -0,0 +1,415 @@
|
||||
# PSPetstore.PSPetstore/Api.PSPetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**Add-PSPet**](PSPetApi.md#Add-PSPet) | **POST** /pet | Add a new pet to the store
|
||||
[**Remove-Pet**](PSPetApi.md#remove-pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**Find-PSPetsByStatus**](PSPetApi.md#Find-PSPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**Find-PSPetsByTags**](PSPetApi.md#Find-PSPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**Get-PSPetById**](PSPetApi.md#Get-PSPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**Update-PSPet**](PSPetApi.md#Update-PSPet) | **PUT** /pet | Update an existing pet
|
||||
[**Update-PSPetWithForm**](PSPetApi.md#Update-PSPetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**Invoke-PSUploadFile**](PSPetApi.md#Invoke-PSUploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
<a name="Add-PSPet"></a>
|
||||
# **Add-PSPet**
|
||||
> Pet Add-PSPet<br>
|
||||
> [-Pet] <PSCustomObject><br>
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$Pet = (Initialize-Pet-Id 123 -Category (Initialize-Category-Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((Initialize-Tag-Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Add a new pet to the store
|
||||
try {
|
||||
Pet $Result = Add-PSPet -Pet $Pet
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Add-PSPet: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="remove-pet"></a>
|
||||
# **Remove-Pet**
|
||||
> void Remove-Pet<br>
|
||||
> [-PetId] <Int64><br>
|
||||
> [-ApiKey] <String><br>
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$PetId = 987 # Int64 | Pet id to delete (default to null)
|
||||
$ApiKey = "ApiKey_example" # String | (optional) (default to null)
|
||||
|
||||
# Deletes a pet
|
||||
try {
|
||||
Remove-Pet -PetId $PetId -ApiKey $ApiKey
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Remove-Pet: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**PetId** | **Int64**| Pet id to delete | [default to null]
|
||||
**ApiKey** | **String**| | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Find-PSPetsByStatus"></a>
|
||||
# **Find-PSPetsByStatus**
|
||||
> Pet[] Find-PSPetsByStatus<br>
|
||||
> [-Status] <String[]><br>
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$Status = @("Status_example") # String[] | Status values that need to be considered for filter (default to null)
|
||||
|
||||
# Finds Pets by status
|
||||
try {
|
||||
Pet[] $Result = Find-PSPetsByStatus -Status $Status
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Find-PSPetsByStatus: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Status** | [**String[]**](String.md)| Status values that need to be considered for filter | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet[]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Find-PSPetsByTags"></a>
|
||||
# **Find-PSPetsByTags**
|
||||
> Pet[] Find-PSPetsByTags<br>
|
||||
> [-Tags] <String[]><br>
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$Tags = @("Inner_example") # String[] | Tags to filter by (default to null)
|
||||
|
||||
# Finds Pets by tags
|
||||
try {
|
||||
Pet[] $Result = Find-PSPetsByTags -Tags $Tags
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Find-PSPetsByTags: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Tags** | [**String[]**](String.md)| Tags to filter by | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet[]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Get-PSPetById"></a>
|
||||
# **Get-PSPetById**
|
||||
> Pet Get-PSPetById<br>
|
||||
> [-PetId] <Int64><br>
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: api_key
|
||||
$Configuration["ApiKey"]["api_key"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["api_key"] = "Bearer"
|
||||
|
||||
$PetId = 987 # Int64 | ID of pet to return (default to null)
|
||||
|
||||
# Find pet by ID
|
||||
try {
|
||||
Pet $Result = Get-PSPetById -PetId $PetId
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Get-PSPetById: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**PetId** | **Int64**| ID of pet to return | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Update-PSPet"></a>
|
||||
# **Update-PSPet**
|
||||
> Pet Update-PSPet<br>
|
||||
> [-Pet] <PSCustomObject><br>
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$Pet = (Initialize-Pet-Id 123 -Category (Initialize-Category-Id 123 -Name "Name_example") -Name "Name_example" -PhotoUrls @("PhotoUrls_example") -Tags @((Initialize-Tag-Id 123 -Name "Name_example")) -Status "Status_example") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Update an existing pet
|
||||
try {
|
||||
Pet $Result = Update-PSPet -Pet $Pet
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Update-PSPet: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Update-PSPetWithForm"></a>
|
||||
# **Update-PSPetWithForm**
|
||||
> void Update-PSPetWithForm<br>
|
||||
> [-PetId] <Int64><br>
|
||||
> [-Name] <String><br>
|
||||
> [-Status] <String><br>
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$PetId = 987 # Int64 | ID of pet that needs to be updated (default to null)
|
||||
$Name = "Name_example" # String | Updated name of the pet (optional) (default to null)
|
||||
$Status = "Status_example" # String | Updated status of the pet (optional) (default to null)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
try {
|
||||
Update-PSPetWithForm -PetId $PetId -Name $Name -Status $Status
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Update-PSPetWithForm: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**PetId** | **Int64**| ID of pet that needs to be updated | [default to null]
|
||||
**Name** | **String**| Updated name of the pet | [optional] [default to null]
|
||||
**Status** | **String**| Updated status of the pet | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Invoke-PSUploadFile"></a>
|
||||
# **Invoke-PSUploadFile**
|
||||
> ApiResponse Invoke-PSUploadFile<br>
|
||||
> [-PetId] <Int64><br>
|
||||
> [-AdditionalMetadata] <String><br>
|
||||
> [-File] <System.IO.FileInfo><br>
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
$Configuration["AccessToken"] = "YOUR_ACCESS_TOKEN";
|
||||
|
||||
$PetId = 987 # Int64 | ID of pet to update (default to null)
|
||||
$AdditionalMetadata = "AdditionalMetadata_example" # String | Additional data to pass to server (optional) (default to null)
|
||||
$File = 987 # System.IO.FileInfo | file to upload (optional) (default to null)
|
||||
|
||||
# uploads an image
|
||||
try {
|
||||
ApiResponse $Result = Invoke-PSUploadFile -PetId $PetId -AdditionalMetadata $AdditionalMetadata -File $File
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Invoke-PSUploadFile: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**PetId** | **Int64**| ID of pet to update | [default to null]
|
||||
**AdditionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
**File** | **System.IO.FileInfo****System.IO.FileInfo**| file to upload | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
191
samples/client/petstore/powershell/docs/PSStoreApi.md
Normal file
191
samples/client/petstore/powershell/docs/PSStoreApi.md
Normal file
@@ -0,0 +1,191 @@
|
||||
# PSPetstore.PSPetstore/Api.PSStoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**Remove-PSOrder**](PSStoreApi.md#Remove-PSOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**Get-PSInventory**](PSStoreApi.md#Get-PSInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**Get-PSOrderById**](PSStoreApi.md#Get-PSOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**Invoke-PSPlaceOrder**](PSStoreApi.md#Invoke-PSPlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
<a name="Remove-PSOrder"></a>
|
||||
# **Remove-PSOrder**
|
||||
> void Remove-PSOrder<br>
|
||||
> [-OrderId] <String><br>
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$OrderId = "OrderId_example" # String | ID of the order that needs to be deleted (default to null)
|
||||
|
||||
# Delete purchase order by ID
|
||||
try {
|
||||
Remove-PSOrder -OrderId $OrderId
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Remove-PSOrder: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**OrderId** | **String**| ID of the order that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Get-PSInventory"></a>
|
||||
# **Get-PSInventory**
|
||||
> System.Collections.Hashtable Get-PSInventory<br>
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: api_key
|
||||
$Configuration["ApiKey"]["api_key"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["api_key"] = "Bearer"
|
||||
|
||||
|
||||
# Returns pet inventories by status
|
||||
try {
|
||||
System.Collections.Hashtable $Result = Get-PSInventory
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Get-PSInventory: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**System.Collections.Hashtable**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Get-PSOrderById"></a>
|
||||
# **Get-PSOrderById**
|
||||
> Order Get-PSOrderById<br>
|
||||
> [-OrderId] <Int64><br>
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$OrderId = 987 # Int64 | ID of pet that needs to be fetched (default to null)
|
||||
|
||||
# Find purchase order by ID
|
||||
try {
|
||||
Order $Result = Get-PSOrderById -OrderId $OrderId
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Get-PSOrderById: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**OrderId** | **Int64**| ID of pet that needs to be fetched | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Invoke-PSPlaceOrder"></a>
|
||||
# **Invoke-PSPlaceOrder**
|
||||
> Order Invoke-PSPlaceOrder<br>
|
||||
> [-Order] <PSCustomObject><br>
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Order = (Initialize-Order-Id 123 -PetId 123 -Quantity 123 -ShipDate Get-Date -Status "Status_example" -Complete $false) # Order | order placed for purchasing the pet
|
||||
|
||||
# Place an order for a pet
|
||||
try {
|
||||
Order $Result = Invoke-PSPlaceOrder -Order $Order
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Invoke-PSPlaceOrder: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
403
samples/client/petstore/powershell/docs/PSUserApi.md
Normal file
403
samples/client/petstore/powershell/docs/PSUserApi.md
Normal file
@@ -0,0 +1,403 @@
|
||||
# PSPetstore.PSPetstore/Api.PSUserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**New-PSUser**](PSUserApi.md#New-PSUser) | **POST** /user | Create user
|
||||
[**New-PSUsersWithArrayInput**](PSUserApi.md#New-PSUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**New-PSUsersWithListInput**](PSUserApi.md#New-PSUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**Remove-PSUser**](PSUserApi.md#Remove-PSUser) | **DELETE** /user/{username} | Delete user
|
||||
[**Get-PSUserByName**](PSUserApi.md#Get-PSUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**Invoke-PSLoginUser**](PSUserApi.md#Invoke-PSLoginUser) | **GET** /user/login | Logs user into the system
|
||||
[**Invoke-PSLogoutUser**](PSUserApi.md#Invoke-PSLogoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**Update-PSUser**](PSUserApi.md#Update-PSUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
<a name="New-PSUser"></a>
|
||||
# **New-PSUser**
|
||||
> void New-PSUser<br>
|
||||
> [-User] <PSCustomObject><br>
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
$User = (Initialize-User-Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123) # User | Created user object
|
||||
|
||||
# Create user
|
||||
try {
|
||||
New-PSUser -User $User
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling New-PSUser: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**User** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="New-PSUsersWithArrayInput"></a>
|
||||
# **New-PSUsersWithArrayInput**
|
||||
> void New-PSUsersWithArrayInput<br>
|
||||
> [-User] <PSCustomObject[]><br>
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
$User = @((Initialize-User-Id 123 -Username "Username_example" -FirstName "FirstName_example" -LastName "LastName_example" -Email "Email_example" -Password "Password_example" -Phone "Phone_example" -UserStatus 123)) # User[] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
try {
|
||||
New-PSUsersWithArrayInput -User $User
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling New-PSUsersWithArrayInput: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**User** | [**User[]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="New-PSUsersWithListInput"></a>
|
||||
# **New-PSUsersWithListInput**
|
||||
> void New-PSUsersWithListInput<br>
|
||||
> [-User] <PSCustomObject[]><br>
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
$User = @() # User[] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
try {
|
||||
New-PSUsersWithListInput -User $User
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling New-PSUsersWithListInput: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**User** | [**User[]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Remove-PSUser"></a>
|
||||
# **Remove-PSUser**
|
||||
> void Remove-PSUser<br>
|
||||
> [-Username] <String><br>
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
$Username = "Username_example" # String | The name that needs to be deleted (default to null)
|
||||
|
||||
# Delete user
|
||||
try {
|
||||
Remove-PSUser -Username $Username
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Remove-PSUser: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Username** | **String**| The name that needs to be deleted | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Get-PSUserByName"></a>
|
||||
# **Get-PSUserByName**
|
||||
> User Get-PSUserByName<br>
|
||||
> [-Username] <String><br>
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Username = "Username_example" # String | The name that needs to be fetched. Use user1 for testing. (default to null)
|
||||
|
||||
# Get user by user name
|
||||
try {
|
||||
User $Result = Get-PSUserByName -Username $Username
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Get-PSUserByName: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Invoke-PSLoginUser"></a>
|
||||
# **Invoke-PSLoginUser**
|
||||
> String Invoke-PSLoginUser<br>
|
||||
> [-Username] <String><br>
|
||||
> [-Password] <String><br>
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Username = "Username_example" # String | The user name for login (default to null)
|
||||
$Password = "Password_example" # String | The password for login in clear text (default to null)
|
||||
|
||||
# Logs user into the system
|
||||
try {
|
||||
String $Result = Invoke-PSLoginUser -Username $Username -Password $Password
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Invoke-PSLoginUser: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Username** | **String**| The user name for login | [default to null]
|
||||
**Password** | **String**| The password for login in clear text | [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Invoke-PSLogoutUser"></a>
|
||||
# **Invoke-PSLogoutUser**
|
||||
> void Invoke-PSLogoutUser<br>
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
|
||||
# Logs out current logged in user session
|
||||
try {
|
||||
Invoke-PSLogoutUser
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Invoke-PSLogoutUser: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
<a name="Update-PSUser"></a>
|
||||
# **Update-PSUser**
|
||||
> void Update-PSUser<br>
|
||||
> [-Username] <String><br>
|
||||
> [-User] <PSCustomObject><br>
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
Import-Module -Name PSPetstore
|
||||
|
||||
$Configuration = Get-PSPetstoreConfiguration
|
||||
# Configure API key authorization: auth_cookie
|
||||
$Configuration["ApiKey"]["AUTH_KEY"] = "YOUR_API_KEY"
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
#$Configuration["ApiKeyPrefix"]["AUTH_KEY"] = "Bearer"
|
||||
|
||||
$Username = "Username_example" # String | name that need to be deleted (default to null)
|
||||
$User = # User | Updated user object
|
||||
|
||||
# Updated user
|
||||
try {
|
||||
Update-PSUser -Username $Username -User $User
|
||||
} catch {
|
||||
Write-Host ("Exception occured when calling Update-PSUser: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
|
||||
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**Username** | **String**| name that need to be deleted | [default to null]
|
||||
**User** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[auth_cookie](../README.md#auth_cookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
31
samples/client/petstore/powershell/docs/Pet.md
Normal file
31
samples/client/petstore/powershell/docs/Pet.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Pet
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **Int64** | | [optional] [default to null]
|
||||
**Category** | [**Category**](Category.md) | | [optional] [default to null]
|
||||
**Name** | **String** | | [default to null]
|
||||
**PhotoUrls** | **String[]** | | [default to null]
|
||||
**Tags** | [**Tag[]**](Tag.md) | | [optional] [default to null]
|
||||
**Status** | **String** | pet status in the store | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstorePet -Id null `
|
||||
-Category null `
|
||||
-Name doggie `
|
||||
-PhotoUrls null `
|
||||
-Tags null `
|
||||
-Status null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
23
samples/client/petstore/powershell/docs/Tag.md
Normal file
23
samples/client/petstore/powershell/docs/Tag.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Tag
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **Int64** | | [optional] [default to null]
|
||||
**Name** | **String** | | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreTag -Id null `
|
||||
-Name null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
35
samples/client/petstore/powershell/docs/User.md
Normal file
35
samples/client/petstore/powershell/docs/User.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# User
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **Int64** | | [optional] [default to null]
|
||||
**Username** | **String** | | [optional] [default to null]
|
||||
**FirstName** | **String** | | [optional] [default to null]
|
||||
**LastName** | **String** | | [optional] [default to null]
|
||||
**Email** | **String** | | [optional] [default to null]
|
||||
**Password** | **String** | | [optional] [default to null]
|
||||
**Phone** | **String** | | [optional] [default to null]
|
||||
**UserStatus** | **Int32** | User Status | [optional] [default to null]
|
||||
|
||||
## Examples
|
||||
|
||||
- Prepare the resource
|
||||
```powershell
|
||||
Initialize-PSPetstoreUser -Id null `
|
||||
-Username null `
|
||||
-FirstName null `
|
||||
-LastName null `
|
||||
-Email null `
|
||||
-Password null `
|
||||
-Phone null `
|
||||
-UserStatus null
|
||||
```
|
||||
|
||||
- Convert the resource to JSON
|
||||
```powershell
|
||||
$ | Convert-ToJSON
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
Reference in New Issue
Block a user