Merge remote-tracking branch 'origin' into 7.0.x

This commit is contained in:
William Cheng
2023-03-03 21:52:50 +08:00
10595 changed files with 418520 additions and 73194 deletions

View File

@@ -177,6 +177,17 @@ Class | Method | HTTP request | Description
## Documentation for Authorization
### petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- write:pets: modify pets in your account
- read:pets: read your pets
### api_key
- **Type**: API key
@@ -193,13 +204,13 @@ Class | Method | HTTP request | Description
- **Location**: URL query string
### bearer_test
### http_basic_test
- **Type**: HTTP basic authentication
### http_basic_test
### bearer_test
- **Type**: HTTP basic authentication
@@ -210,14 +221,3 @@ Class | Method | HTTP request | Description
- **Type**: HTTP basic authentication
### petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- write:pets: modify pets in your account
- read:pets: read your pets

View File

@@ -36,7 +36,7 @@ $Id = 38369
#Write-Host $Result3["Headers"]["Content-Type"]
#Write-Host $Result3["Response"]
#} catch {
# Write-Host ("Exception occured when calling '': {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
# Write-Host ("Exception occurred when calling '': {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
# Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
#}

View File

@@ -28,6 +28,9 @@ Add a new pet to the store
```powershell
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
# Configure HTTP basic authorization: http_signature_test
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
@@ -40,9 +43,6 @@ $httpSigningParams = @{
}
Set-ConfigurationHttpSigning $httpSigningParams
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
$Category = Initialize-Category -Id 0 -Name "MyName"
$Tag = Initialize-Tag -Id 0 -Name "MyName"
$Pet = Initialize-Pet -Id 0 -Category $Category -Name "doggie" -PhotoUrls "MyPhotoUrls" -Tags $Tag -Status "available" # Pet | Pet object that needs to be added to the store
@@ -68,7 +68,7 @@ void (empty response body)
### Authorization
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
### HTTP request headers
@@ -141,6 +141,9 @@ Multiple status values can be provided with comma separated strings
```powershell
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
# Configure HTTP basic authorization: http_signature_test
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
@@ -153,9 +156,6 @@ $httpSigningParams = @{
}
Set-ConfigurationHttpSigning $httpSigningParams
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
$Status = "available" # String[] | Status values that need to be considered for filter
# Finds Pets by status
@@ -179,7 +179,7 @@ Name | Type | Description | Notes
### Authorization
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
### HTTP request headers
@@ -201,6 +201,9 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
```powershell
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
# Configure HTTP basic authorization: http_signature_test
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
@@ -213,9 +216,6 @@ $httpSigningParams = @{
}
Set-ConfigurationHttpSigning $httpSigningParams
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
$Tags = "MyTags" # String[] | Tags to filter by
# Finds Pets by tags
@@ -239,7 +239,7 @@ Name | Type | Description | Notes
### Authorization
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
### HTTP request headers
@@ -311,6 +311,9 @@ Update an existing pet
```powershell
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
# Configure HTTP basic authorization: http_signature_test
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
@@ -323,9 +326,6 @@ $httpSigningParams = @{
}
Set-ConfigurationHttpSigning $httpSigningParams
# Configure OAuth2 access token for authorization: petstore_auth
$Configuration.AccessToken = "YOUR_ACCESS_TOKEN"
$Category = Initialize-Category -Id 0 -Name "MyName"
$Tag = Initialize-Tag -Id 0 -Name "MyName"
$Pet = Initialize-Pet -Id 0 -Category $Category -Name "doggie" -PhotoUrls "MyPhotoUrls" -Tags $Tag -Status "available" # Pet | Pet object that needs to be added to the store
@@ -351,7 +351,7 @@ void (empty response body)
### Authorization
[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
### HTTP request headers

View File

@@ -105,7 +105,7 @@ This endpoint does not need any parameter.
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
### Example
```powershell

View File

@@ -55,6 +55,7 @@ function Initialize-PSEnumTest {
[System.Nullable[Double]]
${EnumNumber},
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
[ValidateSet("placed", "approved", "delivered")]
[PSCustomObject]
${OuterEnum}
)

View File

@@ -118,7 +118,7 @@ function Get-PSHttpSignedHeader {
-HashAlgorithmName $httpSigningConfiguration.HashAlgorithm `
-KeyPassPhrase $httpSigningConfiguration.KeyPassPhrase
}
#Depricated
#Deprecated
<#$cryptographicScheme = Get-PSCryptographicScheme -SigningAlgorithm $httpSigningConfiguration.SigningAlgorithm `
-HashAlgorithm $httpSigningConfiguration.HashAlgorithm
#>

View File

@@ -60,7 +60,7 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
$Result = Update-PSPet -Pet $NewPet
$Result = Get-PSPetById -petId $Id -WithHttpInfo
$Result.GetType().fullname | Should -Be "System.Collections.Hashtable"
#$Result["Response"].GetType().fullanme | Should -Be "System.Management.Automation.PSCustomObject"
#$Result["Response"].GetType().fullname | Should -Be "System.Management.Automation.PSCustomObject"
$Result["Response"]."id" | Should -Be 38369
$Result["Response"]."name" | Should -Be "PowerShell2"
$Result["Response"]."status" | Should -Be "Sold"