Skip to content

[cpp-rest] Fixing Incorrect Header Name Used - #22298

Merged
wing328 merged 1 commit into
OpenAPITools:masterfrom
winrid:fix-security-scheme-name
Nov 8, 2025
Merged

[cpp-rest] Fixing Incorrect Header Name Used#22298
wing328 merged 1 commit into
OpenAPITools:masterfrom
winrid:fix-security-scheme-name

Conversation

@winrid

@winrid winrid commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

Fixes #22297

@aminya

If I have a security scheme defined as api_key which uses the header name x-api-key, suddenly neither work with the cpp-restsdk generator. It works with other generators - they fetch the correct header name from the security scheme name.

I ran the generation of the test snapshot but there are no changes since in the test the security scheme and key name are the same.

If desired I can add a test for this specific scenario. I verified it by using the built generator on our SDK.

@aminya aminya 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.

Thank you!

@winrid

winrid commented Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

@aminya looks like I still need a approval from someone with write access?

@winrid

winrid commented Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

@wing328 could you merge this?

@aminya

aminya commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

It usually takes a few days before the maintainers get to all the PRs

@wing328 wing328 added this to the 7.18.0 milestone Nov 8, 2025
@wing328
wing328 merged commit 7beb8a6 into OpenAPITools:master Nov 8, 2025
14 checks passed
@wing328

wing328 commented Nov 8, 2025

Copy link
Copy Markdown
Member

FYI. Merged #22306 to add a test to the existing client.

rajvesh pushed a commit to rajvesh/openapi-generator that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [cpp-restsdk]

3 participants