Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[powershell] fix use of isBasic condition #15525

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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