[powershell] fix use of isBasic condition (#15525)

This commit is contained in:
Tiffany Marrel 2023-05-20 14:08:37 +02:00 committed by GitHub
parent 9d6f80a7cf
commit b7a9373233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 21 deletions

View File

@ -92,10 +92,18 @@ No model defined in this package
- **API key parameter name**: {{keyParamName}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}
{{#isBasicBasic}}
- **Type**: HTTP basic authentication
{{/isBasic}}
{{/isBasicBasic}}
{{#isBasicBearer}}
- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}
- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{#isOAuth}}
- **Type**: OAuth

View File

@ -27,11 +27,11 @@ Method | HTTP request | Description
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
{{#authMethods}}
{{#isBasic}}
{{#isBasicBasic}}
# Configure HTTP basic authorization: {{{name}}}
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
{{/isBasic}}
{{/isBasicBasic}}
{{#isApiKey}}
# Configure API key authorization: {{{name}}}
$Configuration.ApiKey.{{{keyParamName}}} = "YOUR_API_KEY"

View File

@ -216,11 +216,11 @@ Authentication schemes defined for the API:
### bearer_test
- **Type**: HTTP basic authentication
- **Type**: HTTP Bearer Token authentication (JWT)
<a id="http_signature_test"></a>
### http_signature_test
- **Type**: HTTP basic authentication
- **Type**: HTTP signature authentication

View File

@ -560,9 +560,6 @@ Fake endpoint to test group parameters (optional)
```powershell
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure HTTP basic authorization: bearer_test
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
$RequiredStringGroup = 56 # Int32 | Required String in group parameters
$RequiredBooleanGroup = $true # Boolean | Required Boolean in group parameters

View File

@ -31,9 +31,6 @@ $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"
# Configure HttpSignature for authorization :http_signature_test
$httpSigningParams = @{
KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8"
@ -144,9 +141,6 @@ $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"
# Configure HttpSignature for authorization :http_signature_test
$httpSigningParams = @{
KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8"
@ -204,9 +198,6 @@ $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"
# Configure HttpSignature for authorization :http_signature_test
$httpSigningParams = @{
KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8"
@ -314,9 +305,6 @@ $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"
# Configure HttpSignature for authorization :http_signature_test
$httpSigningParams = @{
KeyId = "xxxxxx1776876789ac747/xxxxxxx564612d31a62c01/xxxxxxxa1d7564612d31a66ee8"