Skip to content

Commit dab2f8e

Browse files
committed
fix ulid regex
1 parent a4ee522 commit dab2f8e

File tree

18 files changed

+25
-25
lines changed

18 files changed

+25
-25
lines changed

bases/renku_data_services/data_api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def register_all_handlers(app: Sanic, config: Config) -> Sanic:
2828
"""Register all handlers on the application."""
29-
app.router.register_pattern("ulid", ULID.from_str, r"^[0-9A-HJKMNP-TV-Z]{26}$")
29+
app.router.register_pattern("ulid", ULID.from_str, r"^[0-7][0-9A-HJKMNP-TV-Z]{25}$")
3030
app.router.register_pattern("renku_slug", str, r"^[a-zA-Z0-9][a-zA-Z0-9\-_.]*$")
3131

3232
url_prefix = "/api/data"

components/renku_data_services/connected_services/api.spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ components:
309309
type: string
310310
minLength: 26
311311
maxLength: 26
312-
pattern: "^[A-Z0-9]{26}$" # This is case-insensitive
312+
pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" # This is case-insensitive
313313
ProviderId:
314314
description: ID of a OAuth2 provider, e.g. "gitlab.com".
315315
type: string

components/renku_data_services/connected_services/apispec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-06T05:55:35+00:00
3+
# timestamp: 2024-08-13T13:29:50+00:00
44

55
from __future__ import annotations
66

@@ -153,7 +153,7 @@ class Connection(BaseAPISpec):
153153
description="ULID identifier",
154154
max_length=26,
155155
min_length=26,
156-
pattern="^[A-Z0-9]{26}$",
156+
pattern="^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
157157
)
158158
provider_id: str = Field(
159159
...,

components/renku_data_services/crc/apispec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-07T07:12:13+00:00
3+
# timestamp: 2024-08-13T13:29:45+00:00
44

55
from __future__ import annotations
66

components/renku_data_services/namespace/api.spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ components:
365365
type: string
366366
minLength: 26
367367
maxLength: 26
368-
pattern: "^[A-Z0-9]{26}$" # This is case-insensitive
368+
pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" # This is case-insensitive
369369
NamespaceName:
370370
description: Renku group or namespace name
371371
type: string

components/renku_data_services/namespace/apispec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-06T08:46:00+00:00
3+
# timestamp: 2024-08-13T13:29:48+00:00
44

55
from __future__ import annotations
66

@@ -29,7 +29,7 @@ class NamespaceResponse(BaseAPISpec):
2929
description="ULID identifier",
3030
max_length=26,
3131
min_length=26,
32-
pattern="^[A-Z0-9]{26}$",
32+
pattern="^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
3333
)
3434
name: Optional[str] = Field(
3535
None,
@@ -93,7 +93,7 @@ class GroupResponse(BaseAPISpec):
9393
description="ULID identifier",
9494
max_length=26,
9595
min_length=26,
96-
pattern="^[A-Z0-9]{26}$",
96+
pattern="^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
9797
)
9898
name: str = Field(
9999
...,

components/renku_data_services/notebooks/apispec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-06T05:55:38+00:00
3+
# timestamp: 2024-08-13T13:29:51+00:00
44

55
from __future__ import annotations
66

components/renku_data_services/platform/apispec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-06T05:55:39+00:00
3+
# timestamp: 2024-08-13T13:29:52+00:00
44

55
from __future__ import annotations
66

components/renku_data_services/project/api.spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ components:
360360
type: string
361361
minLength: 26
362362
maxLength: 26
363-
pattern: "^[A-Z0-9]{26}$" # This is case-insensitive
363+
pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" # This is case-insensitive
364364
ProjectName:
365365
description: Renku project name
366366
type: string

components/renku_data_services/project/apispec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.spec.yaml
3-
# timestamp: 2024-08-06T05:55:31+00:00
3+
# timestamp: 2024-08-13T13:29:47+00:00
44

55
from __future__ import annotations
66

@@ -112,7 +112,7 @@ class Project(BaseAPISpec):
112112
description="ULID identifier",
113113
max_length=26,
114114
min_length=26,
115-
pattern="^[A-Z0-9]{26}$",
115+
pattern="^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
116116
)
117117
name: str = Field(
118118
...,

0 commit comments

Comments
 (0)