Skip to content

Commit b3e0139

Browse files
committed
fix: update endpoint names to use framework.GenericNameRegex
1 parent 2747f87 commit b3e0139

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ any of the paths below, use the help command with any route matching
5959
the path pattern. Note that depending on the policy of your auth token,
6060
you may or may not be able to access certain paths.
6161

62-
^config/(?P<config_name>\w(([\w-.@]+)?\w)?)$
62+
^config/(?P<config_name>\w(([\w-.]+)?\w)?)$
6363
Configure the Gitlab Access Tokens Backend.
6464
6565
^config/(?P<config_name>\w(([\w-.]+)?\w)?)/rotate$
@@ -68,13 +68,13 @@ you may or may not be able to access certain paths.
6868
^config?/?$
6969
Lists existing configs
7070
71-
^roles/(?P<role_name>\w(([\w-.@]+)?\w)?)$
71+
^roles/(?P<role_name>\w(([\w-.]+)?\w)?)$
7272
Create a role with parameters that are used to generate a various access tokens.
7373
7474
^roles?/?$
7575
Lists existing roles
7676
77-
^token/(?P<role_name>\w(([\w-.@]+)?\w)?)$
77+
^token/(?P<role_name>\w(([\w-.]+)?\w)?)$
7878
Generate an access token based on the specified role
7979
```
8080

path_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func pathConfig(b *Backend) *framework.Path {
219219
return &framework.Path{
220220
HelpSynopsis: strings.TrimSpace(pathConfigHelpSynopsis),
221221
HelpDescription: strings.TrimSpace(pathConfigHelpDescription),
222-
Pattern: fmt.Sprintf("%s/%s", PathConfigStorage, framework.GenericNameWithAtRegex("config_name")),
222+
Pattern: fmt.Sprintf("%s/%s", PathConfigStorage, framework.GenericNameRegex("config_name")),
223223
Fields: FieldSchemaConfig,
224224
DisplayAttrs: &framework.DisplayAttributes{
225225
OperationPrefix: operationPrefixGitlabAccessTokens,

path_role.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func pathRoles(b *Backend) *framework.Path {
376376
return &framework.Path{
377377
HelpSynopsis: strings.TrimSpace(pathRolesHelpSyn),
378378
HelpDescription: strings.TrimSpace(pathRolesHelpDesc),
379-
Pattern: fmt.Sprintf("%s/%s", PathRoleStorage, framework.GenericNameWithAtRegex("role_name")),
379+
Pattern: fmt.Sprintf("%s/%s", PathRoleStorage, framework.GenericNameRegex("role_name")),
380380
Fields: FieldSchemaRoles,
381381
DisplayAttrs: &framework.DisplayAttributes{
382382
OperationPrefix: operationPrefixGitlabAccessTokens,

path_token_role.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func pathTokenRoles(b *Backend) *framework.Path {
156156
return &framework.Path{
157157
HelpSynopsis: strings.TrimSpace(pathTokenRolesHelpSyn),
158158
HelpDescription: strings.TrimSpace(pathTokenRolesHelpDesc),
159-
Pattern: fmt.Sprintf("%s/%s", PathTokenRoleStorage, framework.GenericNameWithAtRegex("role_name")),
159+
Pattern: fmt.Sprintf("%s/%s", PathTokenRoleStorage, framework.GenericNameRegex("role_name")),
160160
Fields: FieldSchemaTokenRole,
161161
DisplayAttrs: &framework.DisplayAttributes{
162162
OperationPrefix: operationPrefixGitlabAccessTokens,

0 commit comments

Comments
 (0)