-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Change gen_openapi.sh to generate schema with generic mount paths #18934
Conversation
@@ -36,7 +36,7 @@ while read -r line; do | |||
codeLinesStarted=true | |||
elif [[ $line == *"databasePlugins:"* ]] ; then | |||
break | |||
elif [ $codeLinesStarted = true ] && [[ $line == *"consts.Deprecated"* || $line == *"consts.PendingRemoval"* ]] ; then | |||
elif [ $codeLinesStarted = true ] && [[ $line == *"consts.Deprecated"* || $line == *"consts.PendingRemoval"* || $line == *"consts.Removed"* ]] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this based off the comments in the registry like we previously had it? Or is this something new?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity b/c I don't remember anything that had said PendingRemoval
or Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are no longer comments but actual struct values:
vault/helper/builtinplugins/registry.go
Lines 100 to 103 in fd9cadb
"app-id": { | |
Factory: removedFactory, | |
DeprecationStatus: consts.Removed, | |
}, |
What we are doing here (parsing Go code in shell) is kind of gross. I'm just fixing the script while we are still using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh okay! gotcha. At least the deprecation status is codified in here though.
gen_openapi.sh
is a script used to generateOpenAPI
schema for all built-in plugins. The resultantopenapi.json
schema is then used for client library generation.This pull request fixes a couple issues:
generic_mount_paths
set to true, inserting/{thing_mount_path}/
elements into the paths for certain plugins. This was the default behavior before Revert "Add mount path into the default generated openapi.json spec (#17926)" #18617. We are now re-enabling the behavior but specifically for the schemas generated using this script.