Skip to content

Commit 3be0fc2

Browse files
committed
Change order of openapi merging
Both specs define HTTPValidationError, but the partitioning one has been modified. The merge command uses the last file in the list to merge duplicates.
1 parent 26fd604 commit 3be0fc2

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ download-openapi-specs:
7171
## client-merge-serverless-platform: Merge the Serverless and Platform APIs specs into a single schema
7272
.PHONY: client-merge-serverless-platform
7373
client-merge-serverless-platform:
74-
speakeasy merge -s ./openapi_serverless.json -s ./openapi_platform_api.json -o ./openapi_merged.yaml
74+
speakeasy merge -s ./openapi_platform_api.json -s ./openapi_serverless.json -o ./openapi_merged.yaml
7575

7676
## client-generate-unified-sdk-local: Generate the SDK using merged schemas
7777
.PHONY: client-generate-unified-sdk-local

docs/models/errors/httpvalidationerror.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
8-
| `detail` | List[[shared.ValidationError](../../models/shared/validationerror.md)] | :heavy_minus_sign: | N/A |
6+
| Field | Type | Required | Description |
7+
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
8+
| `detail` | [Optional[errors.Detail]](../../models/errors/detail.md) | :heavy_minus_sign: | N/A |

src/unstructured_client/models/errors/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

3-
from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
3+
from .httpvalidationerror import Detail, HTTPValidationError, HTTPValidationErrorData
44
from .sdkerror import SDKError
55
from .servererror import ServerError, ServerErrorData
66

77

88
__all__ = [
9+
"Detail",
910
"HTTPValidationError",
1011
"HTTPValidationErrorData",
1112
"SDKError",

src/unstructured_client/models/errors/httpvalidationerror.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

33
from __future__ import annotations
4-
from typing import List, Optional
4+
from typing import List, Optional, Union
5+
from typing_extensions import TypeAliasType
56
from unstructured_client import utils
67
from unstructured_client.models.shared import validationerror as shared_validationerror
78
from unstructured_client.types import BaseModel
89

910

11+
DetailTypedDict = TypeAliasType(
12+
"DetailTypedDict", Union[List[shared_validationerror.ValidationErrorTypedDict], str]
13+
)
14+
15+
16+
Detail = TypeAliasType(
17+
"Detail", Union[List[shared_validationerror.ValidationError], str]
18+
)
19+
20+
1021
class HTTPValidationErrorData(BaseModel):
11-
detail: Optional[List[shared_validationerror.ValidationError]] = None
22+
detail: Optional[Detail] = None
1223

1324

1425
class HTTPValidationError(Exception):

0 commit comments

Comments
 (0)