Skip to content

Commit

Permalink
[powershell] fix use of isBasic condition (#15525)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffmaelite authored May 20, 2023
1 parent 9d6f80a commit b7a9373
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/powershell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 0 additions & 3 deletions samples/client/petstore/powershell/docs/PSFakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions samples/client/petstore/powershell/docs/PSPetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit b7a9373

Please sign in to comment.