Skip to content

Commit 35c81d0

Browse files
authored
chore: regenerate OpenAPI client from production API (#451)
1 parent 801479a commit 35c81d0

File tree

131 files changed

+8489
-1059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+8489
-1059
lines changed

openapi.yaml

Lines changed: 1835 additions & 355 deletions
Large diffs are not rendered by default.

scripts/import-openapi-yaml.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,17 @@ curl -s "${HOST_URL}/openapi.json" | poetry run python -c 'import sys, json, yam
3636
# - galileo_core__schemas__shared__scorers__scorer_name__ScorerName.enum |= unique
3737
# - /llm_integrations/projects/{project_id}/runs/{run_id}.get.responses[200].schema.title = "GetRunIntegrationsResponse" (Windows filename length fix)
3838
# - Document.properties.page_content -> Document.properties.content (Fix field name mismatch with API)
39+
# - Rename long schema titles to shorter ones (Windows filename length fix - prevents "Filename too long" errors):
40+
# - AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____.title = "AndNodeLogRecordsFilter"
41+
# - FilterExpression_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____.title = "FilterExpressionLogRecordsFilter"
42+
# - FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____.title = "FilterLeafLogRecordsFilter"
43+
# - NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____.title = "NotNodeLogRecordsFilter"
44+
# - OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____.title = "OrNodeLogRecordsFilter"
3945
#
4046
# If you run into related issues with the auto-generate-api-client.sh script, add the openapi.yaml patches here.
41-
poetry run python -m yq --in-place -Y '.components.schemas.api__schemas__project_v2__GetProjectsPaginatedResponse.title = "GetProjectsPaginatedResponseV2" | .components.schemas.galileo_core__schemas__shared__message__Message.title = "MessagesListItem" | .components.schemas.galileo_core__schemas__shared__message_role__MessageRole.title = "MessagesListItemRole" | .components.schemas.ListDatasetParams.properties.sort.default = "None" | .components.schemas.ListPromptTemplateParams.properties.sort.default = "None" | .components.schemas.ProjectCollectionParams.properties.sort.default = "None" | .components.schemas.galileo_core__schemas__shared__scorers__scorer_name__ScorerName.title = "CoreScorerName" | .components.schemas.galileo_core__schemas__shared__scorers__scorer_name__ScorerName.enum |= unique | .paths["/llm_integrations/projects/{project_id}/runs/{run_id}"].get.responses["200"].content["application/json"].schema.title = "GetRunIntegrationsResponse" | .components.schemas.Document.properties.content = .components.schemas.Document.properties.page_content | del(.components.schemas.Document.properties.page_content) | .components.schemas.Document.properties.content.title = "Content" | .components.schemas.Document.required = ["content"]' "$HOME_DIR/openapi.yaml"
47+
48+
# Apply all patches using yq in a single command
49+
poetry run python -m yq --in-place -Y '.components.schemas.api__schemas__project_v2__GetProjectsPaginatedResponse.title = "GetProjectsPaginatedResponseV2" | .components.schemas.galileo_core__schemas__shared__message__Message.title = "MessagesListItem" | .components.schemas.galileo_core__schemas__shared__message_role__MessageRole.title = "MessagesListItemRole" | .components.schemas.ListDatasetParams.properties.sort.default = "None" | .components.schemas.ListPromptTemplateParams.properties.sort.default = "None" | .components.schemas.ProjectCollectionParams.properties.sort.default = "None" | .components.schemas.galileo_core__schemas__shared__scorers__scorer_name__ScorerName.title = "CoreScorerName" | .components.schemas.galileo_core__schemas__shared__scorers__scorer_name__ScorerName.enum |= unique | .paths["/llm_integrations/projects/{project_id}/runs/{run_id}"].get.responses["200"].content["application/json"].schema.title = "GetRunIntegrationsResponse" | .components.schemas.Document.properties.content = .components.schemas.Document.properties.page_content | del(.components.schemas.Document.properties.page_content) | .components.schemas.Document.properties.content.title = "Content" | .components.schemas.Document.required = ["content"] | .components.schemas["AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____"].title = "AndNodeLogRecordsFilter" | .components.schemas["FilterExpression_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____"].title = "FilterExpressionLogRecordsFilter" | .components.schemas["FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____"].title = "FilterLeafLogRecordsFilter" | .components.schemas["NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____"].title = "NotNodeLogRecordsFilter" | .components.schemas["OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____"].title = "OrNodeLogRecordsFilter"' "$HOME_DIR/openapi.yaml"
4250

4351
# Check if the command was successful
4452
if [ $? -eq 0 ]; then

src/galileo/resources/api/integrations/create_group_integration_collaborators_integrations_integration_id_groups_post.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def sync_detailed(
7373
) -> Response[Union[HTTPValidationError, list["GroupCollaborator"]]]:
7474
"""Create Group Integration Collaborators.
7575
76-
Share a integration with groups.
76+
Share an integration with groups.
7777
7878
Args:
7979
integration_id (str):
@@ -100,7 +100,7 @@ def sync(
100100
) -> Optional[Union[HTTPValidationError, list["GroupCollaborator"]]]:
101101
"""Create Group Integration Collaborators.
102102
103-
Share a integration with groups.
103+
Share an integration with groups.
104104
105105
Args:
106106
integration_id (str):
@@ -123,7 +123,7 @@ async def asyncio_detailed(
123123
) -> Response[Union[HTTPValidationError, list["GroupCollaborator"]]]:
124124
"""Create Group Integration Collaborators.
125125
126-
Share a integration with groups.
126+
Share an integration with groups.
127127
128128
Args:
129129
integration_id (str):
@@ -150,7 +150,7 @@ async def asyncio(
150150
) -> Optional[Union[HTTPValidationError, list["GroupCollaborator"]]]:
151151
"""Create Group Integration Collaborators.
152152
153-
Share a integration with groups.
153+
Share an integration with groups.
154154
155155
Args:
156156
integration_id (str):

src/galileo/resources/api/integrations/create_or_update_integration_integrations_nvidia_put.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def sync_detailed(
5959
) -> Response[Union[HTTPValidationError, IntegrationDB]]:
6060
"""Create Or Update Integration.
6161
62-
Create or update an Nvidia integration for this user from Galileo.
62+
Create or update an NVIDIA integration for this user from Galileo.
6363
6464
Args:
6565
body (NvidiaIntegrationCreate):
@@ -83,7 +83,7 @@ def sync_detailed(
8383
def sync(*, client: ApiClient, body: NvidiaIntegrationCreate) -> Optional[Union[HTTPValidationError, IntegrationDB]]:
8484
"""Create Or Update Integration.
8585
86-
Create or update an Nvidia integration for this user from Galileo.
86+
Create or update an NVIDIA integration for this user from Galileo.
8787
8888
Args:
8989
body (NvidiaIntegrationCreate):
@@ -105,7 +105,7 @@ async def asyncio_detailed(
105105
) -> Response[Union[HTTPValidationError, IntegrationDB]]:
106106
"""Create Or Update Integration.
107107
108-
Create or update an Nvidia integration for this user from Galileo.
108+
Create or update an NVIDIA integration for this user from Galileo.
109109
110110
Args:
111111
body (NvidiaIntegrationCreate):
@@ -131,7 +131,7 @@ async def asyncio(
131131
) -> Optional[Union[HTTPValidationError, IntegrationDB]]:
132132
"""Create Or Update Integration.
133133
134-
Create or update an Nvidia integration for this user from Galileo.
134+
Create or update an NVIDIA integration for this user from Galileo.
135135
136136
Args:
137137
body (NvidiaIntegrationCreate):

src/galileo/resources/api/integrations/delete_group_integration_collaborator_integrations_integration_id_groups_group_id_delete.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def sync_detailed(
5353
) -> Response[Union[Any, HTTPValidationError]]:
5454
"""Delete Group Integration Collaborator.
5555
56-
Remove a group's access to a integration.
56+
Remove a group's access to an integration.
5757
5858
Args:
5959
integration_id (str):
@@ -78,7 +78,7 @@ def sync_detailed(
7878
def sync(integration_id: str, group_id: str, *, client: ApiClient) -> Optional[Union[Any, HTTPValidationError]]:
7979
"""Delete Group Integration Collaborator.
8080
81-
Remove a group's access to a integration.
81+
Remove a group's access to an integration.
8282
8383
Args:
8484
integration_id (str):
@@ -101,7 +101,7 @@ async def asyncio_detailed(
101101
) -> Response[Union[Any, HTTPValidationError]]:
102102
"""Delete Group Integration Collaborator.
103103
104-
Remove a group's access to a integration.
104+
Remove a group's access to an integration.
105105
106106
Args:
107107
integration_id (str):
@@ -128,7 +128,7 @@ async def asyncio(
128128
) -> Optional[Union[Any, HTTPValidationError]]:
129129
"""Delete Group Integration Collaborator.
130130
131-
Remove a group's access to a integration.
131+
Remove a group's access to an integration.
132132
133133
Args:
134134
integration_id (str):

src/galileo/resources/api/integrations/delete_user_integration_collaborator_integrations_integration_id_users_user_id_delete.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _build_response(*, client: ApiClient, response: httpx.Response) -> Response[
5151
def sync_detailed(integration_id: str, user_id: str, *, client: ApiClient) -> Response[Union[Any, HTTPValidationError]]:
5252
"""Delete User Integration Collaborator.
5353
54-
Remove a user's access to a integration.
54+
Remove a user's access to an integration.
5555
5656
Args:
5757
integration_id (str):
@@ -76,7 +76,7 @@ def sync_detailed(integration_id: str, user_id: str, *, client: ApiClient) -> Re
7676
def sync(integration_id: str, user_id: str, *, client: ApiClient) -> Optional[Union[Any, HTTPValidationError]]:
7777
"""Delete User Integration Collaborator.
7878
79-
Remove a user's access to a integration.
79+
Remove a user's access to an integration.
8080
8181
Args:
8282
integration_id (str):
@@ -99,7 +99,7 @@ async def asyncio_detailed(
9999
) -> Response[Union[Any, HTTPValidationError]]:
100100
"""Delete User Integration Collaborator.
101101
102-
Remove a user's access to a integration.
102+
Remove a user's access to an integration.
103103
104104
Args:
105105
integration_id (str):
@@ -124,7 +124,7 @@ async def asyncio_detailed(
124124
async def asyncio(integration_id: str, user_id: str, *, client: ApiClient) -> Optional[Union[Any, HTTPValidationError]]:
125125
"""Delete User Integration Collaborator.
126126
127-
Remove a user's access to a integration.
127+
Remove a user's access to an integration.
128128
129129
Args:
130130
integration_id (str):

src/galileo/resources/api/integrations/update_group_integration_collaborator_integrations_integration_id_groups_group_id_patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def sync_detailed(
6363
) -> Response[Union[GroupCollaborator, HTTPValidationError]]:
6464
"""Update Group Integration Collaborator.
6565
66-
Update the sharing permissions of a group on a integration.
66+
Update the sharing permissions of a group on an integration.
6767
6868
Args:
6969
integration_id (str):
@@ -91,7 +91,7 @@ def sync(
9191
) -> Optional[Union[GroupCollaborator, HTTPValidationError]]:
9292
"""Update Group Integration Collaborator.
9393
94-
Update the sharing permissions of a group on a integration.
94+
Update the sharing permissions of a group on an integration.
9595
9696
Args:
9797
integration_id (str):
@@ -115,7 +115,7 @@ async def asyncio_detailed(
115115
) -> Response[Union[GroupCollaborator, HTTPValidationError]]:
116116
"""Update Group Integration Collaborator.
117117
118-
Update the sharing permissions of a group on a integration.
118+
Update the sharing permissions of a group on an integration.
119119
120120
Args:
121121
integration_id (str):
@@ -143,7 +143,7 @@ async def asyncio(
143143
) -> Optional[Union[GroupCollaborator, HTTPValidationError]]:
144144
"""Update Group Integration Collaborator.
145145
146-
Update the sharing permissions of a group on a integration.
146+
Update the sharing permissions of a group on an integration.
147147
148148
Args:
149149
integration_id (str):

src/galileo/resources/api/integrations/update_user_integration_collaborator_integrations_integration_id_users_user_id_patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def sync_detailed(
6363
) -> Response[Union[HTTPValidationError, UserCollaborator]]:
6464
"""Update User Integration Collaborator.
6565
66-
Update the sharing permissions of a user on a integration.
66+
Update the sharing permissions of a user on an integration.
6767
6868
Args:
6969
integration_id (str):
@@ -91,7 +91,7 @@ def sync(
9191
) -> Optional[Union[HTTPValidationError, UserCollaborator]]:
9292
"""Update User Integration Collaborator.
9393
94-
Update the sharing permissions of a user on a integration.
94+
Update the sharing permissions of a user on an integration.
9595
9696
Args:
9797
integration_id (str):
@@ -115,7 +115,7 @@ async def asyncio_detailed(
115115
) -> Response[Union[HTTPValidationError, UserCollaborator]]:
116116
"""Update User Integration Collaborator.
117117
118-
Update the sharing permissions of a user on a integration.
118+
Update the sharing permissions of a user on an integration.
119119
120120
Args:
121121
integration_id (str):
@@ -143,7 +143,7 @@ async def asyncio(
143143
) -> Optional[Union[HTTPValidationError, UserCollaborator]]:
144144
"""Update User Integration Collaborator.
145145
146-
Update the sharing permissions of a user on a integration.
146+
Update the sharing permissions of a user on an integration.
147147
148148
Args:
149149
integration_id (str):

src/galileo/resources/api/trace/export_records_projects_project_id_export_records_post.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from collections.abc import Iterator
12
from http import HTTPStatus
2-
from typing import Any, Iterator, Optional, Union
3+
from typing import Any, Optional, Union
34

45
import httpx
56

0 commit comments

Comments
 (0)