Skip to content

Commit 08fe8ac

Browse files
committed
ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.121.1
1 parent 49d037d commit 08fe8ac

File tree

14 files changed

+92
-20
lines changed

14 files changed

+92
-20
lines changed

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,14 @@ Based on:
264264
### Generated
265265
- [python v0.14.1] .
266266
### Releases
267-
- [PyPI v0.14.1] https://pypi.org/project/unstructured-client/0.14.1 - .
267+
- [PyPI v0.14.1] https://pypi.org/project/unstructured-client/0.14.1 - .
268+
269+
## 2023-11-18 00:18:40
270+
### Changes
271+
Based on:
272+
- OpenAPI Doc 0.0.1
273+
- Speakeasy CLI 1.121.1 (2.194.1) https://github.com/speakeasy-api/speakeasy
274+
### Generated
275+
- [python v0.14.2] .
276+
### Releases
277+
- [PyPI v0.14.2] https://pypi.org/project/unstructured-client/0.14.2 - .

docs/models/errors/httpvalidationerror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
| Field | Type | Required | Description |
77
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
8-
| `detail` | List[[errors.ValidationError](../../models/errors/validationerror.md)] | :heavy_minus_sign: | N/A |
8+
| `detail` | List[[shared.ValidationError](../../models/shared/validationerror.md)] | :heavy_minus_sign: | N/A |
File renamed without changes.

docs/models/errors/validationerror.md renamed to docs/models/shared/validationerror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
| Field | Type | Required | Description |
77
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
8-
| `loc` | List[[Union[str, int]](../../models/errors/loc.md)] | :heavy_check_mark: | N/A |
8+
| `loc` | List[[Union[str, int]](../../models/shared/loc.md)] | :heavy_check_mark: | N/A |
99
| `msg` | *str* | :heavy_check_mark: | N/A |
1010
| `type` | *str* | :heavy_check_mark: | N/A |

files.gen

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ src/unstructured_client/utils/__init__.py
88
src/unstructured_client/utils/retries.py
99
src/unstructured_client/utils/utils.py
1010
src/unstructured_client/models/errors/sdkerror.py
11+
tests/helpers.py
1112
src/unstructured_client/models/operations/partition.py
1213
src/unstructured_client/models/errors/httpvalidationerror.py
13-
src/unstructured_client/models/errors/validationerror.py
14+
src/unstructured_client/models/shared/validationerror.py
1415
src/unstructured_client/models/shared/partition_parameters.py
1516
src/unstructured_client/models/shared/security.py
1617
src/unstructured_client/models/__init__.py
@@ -20,8 +21,8 @@ src/unstructured_client/models/shared/__init__.py
2021
USAGE.md
2122
docs/models/operations/partitionresponse.md
2223
docs/models/errors/httpvalidationerror.md
23-
docs/models/errors/loc.md
24-
docs/models/errors/validationerror.md
24+
docs/models/shared/loc.md
25+
docs/models/shared/validationerror.md
2526
docs/models/shared/files.md
2627
docs/models/shared/partitionparameters.md
2728
docs/models/shared/security.md

gen.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bf57420eebd40f2b1d166092f01e3927
44
docVersion: 0.0.1
5-
speakeasyVersion: 1.120.3
6-
generationVersion: 2.192.1
5+
speakeasyVersion: 1.121.1
6+
generationVersion: 2.194.1
77
generation:
88
comments: {}
99
sdkClassName: unstructured_client
@@ -15,12 +15,12 @@ features:
1515
core: 4.1.4
1616
examples: 2.81.3
1717
globalSecurity: 2.83.0
18-
globalServerURLs: 2.82.0
18+
globalServerURLs: 2.82.1
1919
nameOverrides: 2.81.1
2020
retries: 2.82.0
2121
serverIDs: 2.81.1
2222
python:
23-
version: 0.14.1
23+
version: 0.14.2
2424
author: Unstructured
2525
clientServerStatusCodesAsErrors: true
2626
description: Python Client SDK for Unstructured API

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="unstructured-client",
13-
version="0.14.1",
13+
version="0.14.2",
1414
author="Unstructured",
1515
description="Python Client SDK for Unstructured API",
1616
long_description=long_description,

src/unstructured_client/models/errors/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33
from .httpvalidationerror import *
44
from .sdkerror import *
5-
from .validationerror import *
65

7-
__all__ = ["HTTPValidationError","SDKError","ValidationError"]
6+
__all__ = ["HTTPValidationError","SDKError"]

src/unstructured_client/models/errors/httpvalidationerror.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44
import dataclasses
5-
from .validationerror import ValidationError
5+
from ...models.shared import validationerror as shared_validationerror
66
from dataclasses_json import Undefined, dataclass_json
77
from typing import List, Optional
88
from unstructured_client import utils
@@ -12,7 +12,7 @@
1212

1313
@dataclasses.dataclass
1414
class HTTPValidationError(Exception):
15-
detail: Optional[List[ValidationError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detail'), 'exclude': lambda f: f is None }})
15+
detail: Optional[List[shared_validationerror.ValidationError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detail'), 'exclude': lambda f: f is None }})
1616

1717

1818
def __str__(self) -> str:

src/unstructured_client/models/shared/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
from .partition_parameters import *
44
from .security import *
5+
from .validationerror import *
56

6-
__all__ = ["Files","PartitionParameters","Security"]
7+
__all__ = ["Files","PartitionParameters","Security","ValidationError"]

src/unstructured_client/sdkconfiguration.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class SDKConfiguration:
2727
server: str = ''
2828
language: str = 'python'
2929
openapi_doc_version: str = '0.0.1'
30-
sdk_version: str = '0.14.1'
31-
gen_version: str = '2.192.1'
32-
user_agent: str = 'speakeasy-sdk/python 0.14.1 2.192.1 0.0.1 unstructured-client'
30+
sdk_version: str = '0.14.2'
31+
gen_version: str = '2.194.1'
32+
user_agent: str = 'speakeasy-sdk/python 0.14.2 2.194.1 0.0.1 unstructured-client'
3333
retry_config: RetryConfig = None
3434

3535
def get_server_details(self) -> Tuple[str, Dict[str, str]]:

src/unstructured_client/utils/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def marshal_json(val, encoder=None):
705705

706706
val = json_dict["res"] if encoder is None else encoder(json_dict["res"])
707707

708-
return json.dumps(val)
708+
return json.dumps(val, separators=(',', ':'), sort_keys=True)
709709

710710

711711
def match_content_type(content_type: str, pattern: str) -> boolean:

tests/helpers.py

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2+
3+
import re
4+
5+
6+
def sort_query_parameters(url):
7+
parts = url.split("?")
8+
9+
if len(parts) == 1:
10+
return url
11+
12+
query = parts[1]
13+
params = query.split("&")
14+
15+
params.sort(key=lambda x: x.split('=')[0])
16+
17+
return parts[0] + "?" + "&".join(params)
18+
19+
20+
def sort_serialized_maps(inp: any, regex: str, delim: str):
21+
22+
def sort_map(m):
23+
entire_match = m.group(0)
24+
25+
groups = m.groups()
26+
27+
for group in groups:
28+
pairs = []
29+
if '=' in group:
30+
pairs = group.split(delim)
31+
32+
pairs.sort(key=lambda x: x.split('=')[0])
33+
else:
34+
values = group.split(delim)
35+
36+
if len(values) == 1:
37+
pairs = values
38+
else:
39+
pairs = [''] * int(len(values)/2)
40+
# loop though every 2nd item
41+
for i in range(0, len(values), 2):
42+
pairs[int(i/2)] = values[i] + delim + values[i+1]
43+
44+
pairs.sort(key=lambda x: x.split(delim)[0])
45+
46+
entire_match = entire_match.replace(group, delim.join(pairs))
47+
48+
return entire_match
49+
50+
if isinstance(inp, str):
51+
return re.sub(regex, sort_map, inp)
52+
elif isinstance(inp, list):
53+
for i, v in enumerate(inp):
54+
inp[i] = sort_serialized_maps(v, regex, delim)
55+
return inp
56+
elif isinstance(inp, dict):
57+
for k, v in inp.items():
58+
inp[k] = sort_serialized_maps(v, regex, delim)
59+
return inp
60+
else:
61+
raise Exception("Unsupported type")

0 commit comments

Comments
 (0)