Skip to content

openapi: fix missing request schema for custom plugins #30715

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

berkitamas
Copy link

Description

This pull request resolves #30714.

If a custom plugin is added to Vault, OpenAPI Explorer does not show properly the Request body for the plugin's POST endpoints. It shows a "string" instead of filling out the parameters based on the path fields.

github.com/mitchellh/mapstructure does a strings.EqualFold check between a struct key and a map key. This does not work for $ref key, a custom name match is needed to cover this edge case.

github.com/mitchellh/mapstructure does a strings.EqualFold check between a struct key and a map key.
This does not work for $ref key, a custom name match is needed to cover this edge case.

Resolves: hashicorp#30714
Signed-off-by: Tamas Berki <[email protected]>
@berkitamas berkitamas requested a review from a team as a code owner May 21, 2025 23:13
@berkitamas berkitamas requested a review from harinimhc May 21, 2025 23:13
Copy link

hashicorp-cla-app bot commented May 21, 2025

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Tamas Berki <[email protected]>
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.

openapi: Post request body does not show the request schema in custom plugins
1 participant