Skip to content

Commit 9818304

Browse files
committed
address comments
1 parent e8e4a72 commit 9818304

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

components/renku_data_services/storage/api.spec.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,7 @@ components:
515515
minLength: 1
516516
maxLength: 99
517517
value:
518-
oneOf:
519-
- $ref: "#/components/schemas/SecretValue"
520-
- type: 'null'
518+
$ref: "#/components/schemas/SecretValueNullable"
521519
required:
522520
- name
523521
- value
@@ -545,11 +543,12 @@ components:
545543
required:
546544
- name
547545
- secret_id
548-
SecretValue:
549-
description: Secret value that can be any text
550-
type: string
551-
minLength: 1
552-
maxLength: 5000
546+
SecretValueNullable:
547+
description: Secret value that can be any text
548+
type: string
549+
minLength: 1
550+
maxLength: 5000
551+
nullable: true
553552
RCloneSchema:
554553
description: List of RClone schemas for different storage types
555554
type: array

components/renku_data_services/storage/apispec.py

Lines changed: 7 additions & 11 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-09-19T13:28:18+00:00
3+
# timestamp: 2024-10-07T08:21:24+00:00
44

55
from __future__ import annotations
66

@@ -11,15 +11,6 @@
1111
from renku_data_services.storage.apispec_base import BaseAPISpec
1212

1313

14-
class SecretValue(RootModel[str]):
15-
root: str = Field(
16-
...,
17-
description="Secret value that can be any text",
18-
max_length=5000,
19-
min_length=1,
20-
)
21-
22-
2314
class Example(BaseAPISpec):
2415
value: Optional[str] = Field(
2516
None, description="a potential value for the option (think enum)"
@@ -251,7 +242,12 @@ class CloudStorageSecretPost(BaseAPISpec):
251242
max_length=99,
252243
min_length=1,
253244
)
254-
value: Optional[SecretValue] = None
245+
value: Optional[str] = Field(
246+
...,
247+
description="Secret value that can be any text",
248+
max_length=5000,
249+
min_length=1,
250+
)
255251

256252

257253
class CloudStorageSecretPostList(RootModel[List[CloudStorageSecretPost]]):

0 commit comments

Comments
 (0)