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

add support of empty api_key #1594

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rusdevops
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Additional context & links

@rusdevops rusdevops requested a review from a team as a code owner August 3, 2024 12:23
Copy link
Collaborator

@rattrayalex rattrayalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! We are going to fix this in our codegen system, so chances are high we'll close this PR and fix in a separate one, but appreciate the contribution!

@@ -157,7 +157,8 @@ def qs(self) -> Querystring:
@override
def auth_headers(self) -> dict[str, str]:
api_key = self.api_key
return {"Authorization": f"Bearer {api_key}"}
headers = {} if api_key == "" else {"Authorization": f"Bearer {api_key}"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is we set api_key to None?
It should also handle situation in which API key is not set through argument of env variable.

@@ -371,7 +372,8 @@ def qs(self) -> Querystring:
@override
def auth_headers(self) -> dict[str, str]:
api_key = self.api_key
return {"Authorization": f"Bearer {api_key}"}
headers = {} if api_key == "" else {"Authorization": f"Bearer {api_key}"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants