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

[Vault-4628] OpenAPI endpoint not expanding root alternations #13487

Merged
merged 7 commits into from
Dec 22, 2021

Conversation

VinnyHC
Copy link
Contributor

@VinnyHC VinnyHC commented Dec 21, 2021

Improve OpenAPI endpoint /sys/internal/specs/openapi to generate proper specs for path patterns that use an alternation as the root.
Example:

(creds|sts)/(?P<name>\w(([\w-.@]+)?\w)?)

should generate two paths in OpenAPI

creds/{name}
sts/{name}

@vercel vercel bot temporarily deployed to Preview – vault-storybook December 21, 2021 16:51 Inactive
@vercel vercel bot temporarily deployed to Preview – vault December 21, 2021 16:51 Inactive
@VinnyHC
Copy link
Contributor Author

VinnyHC commented Dec 21, 2021

This was tested comparing the output from scripts/gen_openapi.sh -p when run against main and vinnyhc/VAULT-4628-OpenAPI. The only difference was the proper spec for the aws/creds/{name} entry.

@VinnyHC VinnyHC requested a review from a team December 21, 2021 16:55
@vercel vercel bot temporarily deployed to Preview – vault December 21, 2021 17:31 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 21, 2021 17:31 Inactive
sdk/framework/openapi.go Outdated Show resolved Hide resolved
sdk/framework/openapi.go Outdated Show resolved Hide resolved
sdk/framework/openapi.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault December 22, 2021 21:06 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 22, 2021 21:06 Inactive
@vercel vercel bot temporarily deployed to Preview – vault December 22, 2021 21:13 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 22, 2021 21:13 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 22, 2021 22:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault December 22, 2021 22:42 Inactive
Copy link
Contributor

@averche averche left a comment

Choose a reason for hiding this comment

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

LGTM 👍

sdk/framework/openapi.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault December 22, 2021 22:59 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 22, 2021 22:59 Inactive
@VinnyHC VinnyHC merged commit d41f8cf into main Dec 22, 2021
@VinnyHC VinnyHC deleted the vinnyhc/VAULT-4628-OpenAPI branch December 22, 2021 23:37
@peaceofthepai peaceofthepai linked an issue Jan 3, 2022 that may be closed by this pull request
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.

Auto-generated OpenAPI is *incorrect* for /aws/creds
3 participants