Skip to content

Commit 4701bd0

Browse files
committed
fix: update openapi generator
1 parent b2e6180 commit 4701bd0

File tree

12 files changed

+44
-15
lines changed

12 files changed

+44
-15
lines changed

.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.10.0
1+
7.12.0

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ List of endpoints and interfaces available to Codex API users
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 0.0.1
7-
- Package version: 0.1.0
8-
- Generator version: 7.10.0
7+
- Package version: 0.3.1
8+
- Generator version: 7.12.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.

codex_api_client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "0.1.0"
17+
__version__ = "0.3.1"
1818

1919
# import apis into sdk package
2020
from codex_api_client.api.data_api import DataApi

codex_api_client/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def parameters_to_url_query(self, params, collection_formats):
517517
if k in collection_formats:
518518
collection_format = collection_formats[k]
519519
if collection_format == 'multi':
520-
new_params.extend((k, str(value)) for value in v)
520+
new_params.extend((k, quote(str(value))) for value in v)
521521
else:
522522
if collection_format == 'ssv':
523523
delimiter = ' '

codex_api_client/configuration.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from logging import FileHandler
1919
import multiprocessing
2020
import sys
21-
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
21+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
2222
from typing_extensions import NotRequired, Self
2323

2424
import urllib3
@@ -160,6 +160,8 @@ class Configuration:
160160
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
161161
in PEM format.
162162
:param retries: Number of retries for API requests.
163+
:param ca_cert_data: verify the peer using concatenated CA certificate data
164+
in PEM (str) or DER (bytes) format.
163165
164166
"""
165167

@@ -173,13 +175,14 @@ def __init__(
173175
username: Optional[str]=None,
174176
password: Optional[str]=None,
175177
access_token: Optional[str]=None,
176-
server_index: Optional[int]=None,
178+
server_index: Optional[int]=None,
177179
server_variables: Optional[ServerVariablesT]=None,
178180
server_operation_index: Optional[Dict[int, int]]=None,
179181
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
180182
ignore_operation_servers: bool=False,
181183
ssl_ca_cert: Optional[str]=None,
182184
retries: Optional[int] = None,
185+
ca_cert_data: Optional[Union[str, bytes]] = None,
183186
*,
184187
debug: Optional[bool] = None,
185188
) -> None:
@@ -257,6 +260,10 @@ def __init__(
257260
self.ssl_ca_cert = ssl_ca_cert
258261
"""Set this to customize the certificate file to verify the peer.
259262
"""
263+
self.ca_cert_data = ca_cert_data
264+
"""Set this to verify the peer using PEM (str) or DER (bytes)
265+
certificate data.
266+
"""
260267
self.cert_file = None
261268
"""client certificate file
262269
"""
@@ -494,7 +501,7 @@ def to_debug_report(self) -> str:
494501
"OS: {env}\n"\
495502
"Python Version: {pyversion}\n"\
496503
"Version of the API: 0.0.1\n"\
497-
"SDK Package Version: 0.1.0".\
504+
"SDK Package Version: 0.3.1".\
498505
format(env=sys.platform, pyversion=sys.version)
499506

500507
def get_host_settings(self) -> List[HostSetting]:

codex_api_client/exceptions.py

+17
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ def from_response(
150150
if http_resp.status == 404:
151151
raise NotFoundException(http_resp=http_resp, body=body, data=data)
152152

153+
# Added new conditions for 409 and 422
154+
if http_resp.status == 409:
155+
raise ConflictException(http_resp=http_resp, body=body, data=data)
156+
157+
if http_resp.status == 422:
158+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
159+
153160
if 500 <= http_resp.status <= 599:
154161
raise ServiceException(http_resp=http_resp, body=body, data=data)
155162
raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -188,6 +195,16 @@ class ServiceException(ApiException):
188195
pass
189196

190197

198+
class ConflictException(ApiException):
199+
"""Exception for HTTP 409 Conflict."""
200+
pass
201+
202+
203+
class UnprocessableEntityException(ApiException):
204+
"""Exception for HTTP 422 Unprocessable Entity."""
205+
pass
206+
207+
191208
def render_path(path_to_item):
192209
"""Returns a string representation of a path"""
193210
result = ""

codex_api_client/rest.py

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def __init__(self, configuration) -> None:
7676
"ca_certs": configuration.ssl_ca_cert,
7777
"cert_file": configuration.cert_file,
7878
"key_file": configuration.key_file,
79+
"ca_cert_data": configuration.ca_cert_data,
7980
}
8081
if configuration.assert_hostname is not None:
8182
pool_args['assert_hostname'] = (

docs/MarketplaceApi.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,9 @@ No authorization required
561561
562562
Updates availability
563563

564-
The new parameters will be only considered for new requests. Existing Requests linked to this Availability will continue as is.
564+
The new parameters will be only considered for new requests.
565+
Existing Requests linked to this Availability will continue as is.
566+
565567

566568
### Example
567569

docs/NodeApi.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Method | HTTP request | Description
1414
1515
Connect to a peer
1616

17-
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
17+
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used
18+
to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
19+
1820

1921
### Example
2022

openapitools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "7.10.0"
5+
"version": "7.12.0"
66
}
77
}

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "codex_api_client"
3-
version = "0.1.0"
3+
version = "0.3.1"
44
description = "Codex API"
55
authors = ["OpenAPI Generator Community <[email protected]>"]
66
license = "NoLicense"
@@ -12,7 +12,7 @@ include = ["codex_api_client/py.typed"]
1212
[tool.poetry.dependencies]
1313
python = "^3.8"
1414

15-
urllib3 = ">= 1.25.3 < 3.0.0"
15+
urllib3 = ">= 1.25.3, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"
1717
pydantic = ">= 2"
1818
typing-extensions = ">= 4.7.1"

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "codex-api-client"
24-
VERSION = "0.1.0"
24+
VERSION = "0.3.1"
2525
PYTHON_REQUIRES = ">= 3.8"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 3.0.0",
@@ -46,4 +46,4 @@
4646
List of endpoints and interfaces available to Codex API users
4747
""", # noqa: E501
4848
package_data={"codex_api_client": ["py.typed"]},
49-
)
49+
)

0 commit comments

Comments
 (0)