Skip to content

Commit afc8753

Browse files
luizhf42gustavosbarreto
authored andcommitted
fix(openapi): align tag name pattern with backend validation
The tag name pattern in path specs allowed hyphens and underscores (`^[a-zA-Z0-9-_]+$`) but the backend only accepts alphanumeric characters via the `alphanum` validator. Update all affected specs to use `^[a-zA-Z0-9]+$`. Fixes: #6215
1 parent 4da2793 commit afc8753

5 files changed

Lines changed: 12 additions & 12 deletions

openapi/spec/paths/api@devices@{uid}@tags@{name}.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ post:
1414
description: Tag name to associate
1515
schema:
1616
type: string
17-
pattern: ^[a-zA-Z0-9-_]+$
17+
pattern: ^[a-zA-Z0-9]+$
1818
example: prod
1919
required: true
2020
in: path
@@ -47,7 +47,7 @@ delete:
4747
description: Tag name to remove
4848
schema:
4949
type: string
50-
pattern: ^[a-zA-Z0-9-_]+$
50+
pattern: ^[a-zA-Z0-9]+$
5151
example: prod
5252
required: true
5353
in: path

openapi/spec/paths/api@namespaces@{tenant}@containers@{uid}@tags@{name}.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ post:
1414
description: Tag name to associate
1515
schema:
1616
type: string
17-
pattern: ^[a-zA-Z0-9-_]+$
17+
pattern: ^[a-zA-Z0-9]+$
1818
example: prod
1919
required: true
2020
in: path
@@ -47,7 +47,7 @@ delete:
4747
description: Tag name to remove
4848
schema:
4949
type: string
50-
pattern: ^[a-zA-Z0-9-_]+$
50+
pattern: ^[a-zA-Z0-9]+$
5151
example: prod
5252
required: true
5353
in: path

openapi/spec/paths/api@namespaces@{tenant}@devices@{uid}@tags@{name}.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ post:
1616
description: Tag name to associate
1717
schema:
1818
type: string
19-
pattern: ^[a-zA-Z0-9-_]+$
19+
pattern: ^[a-zA-Z0-9]+$
2020
example: prod
2121
required: true
2222
in: path
@@ -51,7 +51,7 @@ delete:
5151
description: Tag name to remove
5252
schema:
5353
type: string
54-
pattern: ^[a-zA-Z0-9-_]+$
54+
pattern: ^[a-zA-Z0-9]+$
5555
example: prod
5656
required: true
5757
in: path

openapi/spec/paths/api@namespaces@{tenant}@tags@{name}.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ patch:
1515
description: Current tag name
1616
schema:
1717
type: string
18-
pattern: ^[a-zA-Z0-9-_]+$
18+
pattern: ^[a-zA-Z0-9]+$
1919
example: prod
2020
required: true
2121
in: path
@@ -32,7 +32,7 @@ patch:
3232
type: string
3333
minLength: 3
3434
maxLength: 255
35-
pattern: ^[a-zA-Z0-9-_]+$
35+
pattern: ^[a-zA-Z0-9]+$
3636
example: dev
3737
description: New tag name
3838
responses:
@@ -71,7 +71,7 @@ delete:
7171
description: Tag name to delete
7272
schema:
7373
type: string
74-
pattern: ^[a-zA-Z0-9-_]+$
74+
pattern: ^[a-zA-Z0-9]+$
7575
example: prod
7676
required: true
7777
in: path

openapi/spec/paths/api@tags@{name}.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ patch:
1313
description: Current tag name
1414
schema:
1515
type: string
16-
pattern: ^[a-zA-Z0-9-_]+$
16+
pattern: ^[a-zA-Z0-9]+$
1717
example: prod
1818
required: true
1919
in: path
@@ -30,7 +30,7 @@ patch:
3030
type: string
3131
minLength: 3
3232
maxLength: 255
33-
pattern: ^[a-zA-Z0-9-_]+$
33+
pattern: ^[a-zA-Z0-9]+$
3434
example: dev
3535
description: New tag name
3636
responses:
@@ -67,7 +67,7 @@ delete:
6767
description: Tag name to delete
6868
schema:
6969
type: string
70-
pattern: ^[a-zA-Z0-9-_]+$
70+
pattern: ^[a-zA-Z0-9]+$
7171
example: prod
7272
required: true
7373
in: path

0 commit comments

Comments
 (0)