Skip to content

Commit

Permalink
openapi: A few fixes for display attributes (hashicorp#20549)
Browse files Browse the repository at this point in the history
  • Loading branch information
averche authored May 11, 2023
1 parent dae5cf1 commit 02742a7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions builtin/credential/approle/path_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,6 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Pattern: "role/" + framework.GenericNameRegex("role_name") + "/secret-id/destroy/?$",
DisplayAttrs: &framework.DisplayAttributes{
OperationPrefix: operationPrefixAppRole,
OperationSuffix: "secret-id",
OperationVerb: "destroy",
},
Fields: map[string]*framework.FieldSchema{
Expand All @@ -1094,6 +1093,9 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
logical.UpdateOperation: &framework.PathOperation{
Callback: b.pathRoleSecretIDDestroyUpdateDelete,
Responses: responseNoContent,
DisplayAttrs: &framework.DisplayAttributes{
OperationSuffix: "secret-id",
},
},
logical.DeleteOperation: &framework.PathOperation{
Callback: b.pathRoleSecretIDDestroyUpdateDelete,
Expand Down Expand Up @@ -1183,7 +1185,6 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Pattern: "role/" + framework.GenericNameRegex("role_name") + "/secret-id-accessor/destroy/?$",
DisplayAttrs: &framework.DisplayAttributes{
OperationPrefix: operationPrefixAppRole,
OperationSuffix: "secret-id-by-accessor",
OperationVerb: "destroy",
},
Fields: map[string]*framework.FieldSchema{
Expand All @@ -1200,6 +1201,9 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
logical.UpdateOperation: &framework.PathOperation{
Callback: b.pathRoleSecretIDAccessorDestroyUpdateDelete,
Responses: responseNoContent,
DisplayAttrs: &framework.DisplayAttributes{
OperationSuffix: "secret-id-by-accessor",
},
},
logical.DeleteOperation: &framework.PathOperation{
Callback: b.pathRoleSecretIDAccessorDestroyUpdateDelete,
Expand Down
2 changes: 1 addition & 1 deletion builtin/credential/aws/path_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (b *backend) pathListRoles() *framework.Path {

DisplayAttrs: &framework.DisplayAttributes{
OperationPrefix: operationPrefixAWS,
OperationSuffix: "roles2",
OperationSuffix: "auth-roles2",
},

Operations: map[logical.Operation]framework.OperationHandler{
Expand Down
2 changes: 1 addition & 1 deletion builtin/logical/aws/path_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func pathUser(b *backend) *framework.Path {
logical.UpdateOperation: &framework.PathOperation{
Callback: b.pathCredsRead,
DisplayAttrs: &framework.DisplayAttributes{
OperationSuffix: "credentials2|sts-credentials2",
OperationSuffix: "credentials-with-parameters|sts-credentials-with-parameters",
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion vault/identity_store_oidc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ func oidcProviderPaths(i *IdentityStore) []*framework.Path {
logical.UpdateOperation: &framework.PathOperation{
Callback: i.pathOIDCAuthorize,
DisplayAttrs: &framework.DisplayAttributes{
OperationVerb: "authorize2",
OperationVerb: "authorize",
OperationSuffix: "with-parameters",
},
ForwardPerformanceStandby: true,
ForwardPerformanceSecondary: false,
Expand Down
2 changes: 1 addition & 1 deletion vault/logical_system_paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path {
logical.UpdateOperation: &framework.PathOperation{
Callback: b.pathInternalOpenAPI,
DisplayAttrs: &framework.DisplayAttributes{
OperationSuffix: "open-api-document2",
OperationSuffix: "open-api-document-with-parameters",
},
},
},
Expand Down

0 comments on commit 02742a7

Please sign in to comment.