Skip to content

Commit 8669c05

Browse files
committed
fix(openapi): prevent TS codegen collisions from duplicate schema titles
1 parent c99bd65 commit 8669c05

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

components/renku_data_services/search/api.spec.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ components:
230230
type: integer
231231
format: int32
232232
SearchProject:
233-
title: Project
233+
title: SearchProject
234234
examples:
235235
- type: Project
236236
id: 01HRA7AZ2Q234CDQWGA052F8MK
@@ -306,7 +306,7 @@ components:
306306
type: string
307307
const: Project
308308
SearchDataConnector:
309-
title: DataConnector
309+
title: SearchDataConnector
310310
examples:
311311
- type: DataConnector
312312
id: 01HRA7AZ2Q234CDQWGA052F8MK
@@ -443,15 +443,13 @@ components:
443443
type: string
444444
const: User
445445
SearchUser:
446-
title: User
446+
title: SearchUser
447447
type: object
448448
required:
449449
- id
450450
- type
451451
- path
452452
- slug
453-
- firstName
454-
- lastName
455453
properties:
456454
id:
457455
type: string
@@ -478,7 +476,7 @@ components:
478476
type: string
479477
const: User
480478
SearchGroup:
481-
title: Group
479+
title: SearchGroup
482480
type: object
483481
required:
484482
- id

components/renku_data_services/search/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: 2026-02-02T20:07:22+00:00
3+
# timestamp: 2026-02-03T12:51:43+00:00
44

55
from __future__ import annotations
66

@@ -63,8 +63,8 @@ class SearchUser(BaseAPISpec):
6363
id: str
6464
path: str
6565
slug: str
66-
firstName: str
67-
lastName: str
66+
firstName: Optional[str] = None
67+
lastName: Optional[str] = None
6868
score: Optional[float] = None
6969
project_count: Optional[int] = Field(
7070
None, description="Number of projects with this user namespace."

0 commit comments

Comments
 (0)