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

Dynamic parameter for mountpaths #15835

Merged
merged 32 commits into from
Jun 30, 2022
Merged

Dynamic parameter for mountpaths #15835

merged 32 commits into from
Jun 30, 2022

Conversation

AnPucel
Copy link
Contributor

@AnPucel AnPucel commented Jun 6, 2022

This query parameter will be primarily for DevEx and code generation usage. The idea is to replace hard coded mount paths in the OpenApi spec with a dynamic parameter i.e. {mountPath}.

When the new call is made to /sys/internal/specs/openapi?generic_paths=true the resulting OpenApi spec will have

"paths": { "/auth/{mountPath}/login/": { "description": "", "parameters": [ { "name": "mountPath", "description": "Path that the backend was mounted at", "in": "path", "schema": { "type": "string" }, "required": true } ],

The resulting generated code will allow users of the client library to pass through a mount path that would've otherwise been hardcoded as e.g. approle

@AnPucel AnPucel changed the title Initial endpoint for a mount path endpoint [WIP] Initial endpoint for a mount path endpoint Jun 6, 2022
@AnPucel AnPucel requested a review from a team June 7, 2022 19:18
@AnPucel AnPucel marked this pull request as ready for review June 9, 2022 20:24
@AnPucel AnPucel changed the title [WIP] Initial endpoint for a mount path endpoint Initial endpoint for a mount path endpoint Jun 9, 2022
@AnPucel AnPucel changed the title Initial endpoint for a mount path endpoint Dynamic parameter for mountpaths Jun 14, 2022
vault/logical_system.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
vault/logical_system_paths.go Outdated Show resolved Hide resolved
vault/logical_system_test.go Outdated Show resolved Hide resolved
sdk/framework/openapi.go Outdated Show resolved Hide resolved
@AnPucel AnPucel requested a review from taoism4504 as a code owner June 14, 2022 23:57
sdk/framework/backend.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
vault/logical_system.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
vault/logical_system.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
sdk/framework/backend.go Outdated Show resolved Hide resolved
vault/logical_system.go Outdated Show resolved Hide resolved
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

@AnPucel AnPucel merged commit 3c1a1bf into main Jun 30, 2022
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.

4 participants