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

Add display attributes for OpenAPI OperationID's #28

Merged
merged 5 commits into from
Apr 18, 2023
Merged

Conversation

averche
Copy link
Contributor

@averche averche commented Apr 8, 2023

Overview

The display attributes added in this PR will be translated into OperationID's in vault-generated OpenAPI documents (when calling /sys/internal/specs/openapi with this plugin enabled). The OperationID's will, in turn, be translated into function / method names in generated OpenAPI-based libraries (e.g. hashicorp/vault-client-go & hashicorp/vault-client-dotnet).


This PR will introduce the following OperationIDs:

Path Method OperationID
"/{gcpkms_mount_path}/config" "get" "google-cloud-kms-read-configuration"
"/{gcpkms_mount_path}/config" "post" "google-cloud-kms-configure"
"/{gcpkms_mount_path}/config" "delete" "google-cloud-kms-delete-configuration"
"/{gcpkms_mount_path}/decrypt/{key}" "post" "google-cloud-kms-decrypt"
"/{gcpkms_mount_path}/encrypt/{key}" "post" "google-cloud-kms-encrypt"
"/{gcpkms_mount_path}/keys" "get" "google-cloud-kms-list-keys"
"/{gcpkms_mount_path}/keys/config/{key}" "get" "google-cloud-kms-read-key-configuration"
"/{gcpkms_mount_path}/keys/config/{key}" "post" "google-cloud-kms-configure-key"
"/{gcpkms_mount_path}/keys/deregister/{key}" "post" "google-cloud-kms-deregister-key"
"/{gcpkms_mount_path}/keys/deregister/{key}" "delete" "google-cloud-kms-deregister-key2"
"/{gcpkms_mount_path}/keys/register/{key}" "post" "google-cloud-kms-register-key"
"/{gcpkms_mount_path}/keys/rotate/{key}" "post" "google-cloud-kms-rotate-key"
"/{gcpkms_mount_path}/keys/trim/{key}" "post" "google-cloud-kms-trim-key-versions"
"/{gcpkms_mount_path}/keys/trim/{key}" "delete" "google-cloud-kms-trim-key-versions2"
"/{gcpkms_mount_path}/keys/{key}" "get" "google-cloud-kms-read-key"
"/{gcpkms_mount_path}/keys/{key}" "post" "google-cloud-kms-write-key"
"/{gcpkms_mount_path}/keys/{key}" "delete" "google-cloud-kms-delete-key"
"/{gcpkms_mount_path}/pubkey/{key}" "get" "google-cloud-kms-retrieve-public-key"
"/{gcpkms_mount_path}/reencrypt/{key}" "post" "google-cloud-kms-reencrypt"
"/{gcpkms_mount_path}/sign/{key}" "post" "google-cloud-kms-sign"
"/{gcpkms_mount_path}/verify/{key}" "post" "google-cloud-kms-verify"

Related Issues/Pull Requests

@averche averche changed the title Display attributes Add display attributes for OpenAPI OperationID's Apr 8, 2023
@averche averche requested review from a team April 8, 2023 19:31
logical.DeleteOperation: &framework.PathOperation{
Callback: withFieldValidator(b.pathKeysTrimWrite),
DisplayAttrs: &framework.DisplayAttributes{
OperationSuffix: "key-versions2",
Copy link

Choose a reason for hiding this comment

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

Does this need to have 2 appended? I don't see the duplicate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two are colliding:

Path Method OperationID
"/{gcpkms_mount_path}/keys/trim/{key}" "post" "google-cloud-kms-trim-key-versions"
"/{gcpkms_mount_path}/keys/trim/{key}" "delete" "google-cloud-kms-trim-key-versions2"

@averche averche merged commit ab6494b into main Apr 18, 2023
@averche averche deleted the display-attributes branch April 18, 2023 22:47
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.

2 participants