Skip to content

[python] honor API key prefix aliases#24307

Open
tamird wants to merge 1 commit into
OpenAPITools:masterfrom
tamird:upstream/python-api-key-prefix-alias
Open

[python] honor API key prefix aliases#24307
tamird wants to merge 1 commit into
OpenAPITools:masterfrom
tamird:upstream/python-api-key-prefix-alias

Conversation

@tamird

@tamird tamird commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

x-auth-id-alias lets a generated auth setting use one public key while
looking up configuration under an alternate identifier. The Python
generator already falls back to the alias for api_key, but not for
api_key_prefix. A caller that sets only the aliased prefix therefore
sends an unprefixed credential.

Make prefix lookup use the same identifier-first, alias-fallback order
as key lookup. Regenerate the checked-in Python clients so the existing
sample-golden checks cover the template output.

@tamird

tamird commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@wing328 @cbornet @tomplus @krjakbrjak @fa0311 Could you take a look? This is a small Python generator fix for x-auth-id-alias prefix lookup.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@tamird tamird force-pushed the upstream/python-api-key-prefix-alias branch from 46652ad to 55690d1 Compare July 14, 2026 21:27
x-auth-id-alias lets a generated auth setting use one public key
while looking up configuration under an alternate identifier. The Python
generator already falls back to the alias for api_key, but not for
api_key_prefix. A caller that sets only the aliased prefix therefore
sends an unprefixed credential.

Make prefix lookup use the same identifier-first alias fallback as key
lookup. Cover the existing x-auth-id-alias fixture so later template
changes preserve both lookups and the generated alias.
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.

1 participant