Skip to content

Commit 8770ee0

Browse files
committed
Refactor Pydantic model configurations and JSON serialization
- Updated model configurations across multiple Pydantic models to use `validate_by_name` and `validate_by_alias` instead of `populate_by_name`. - Replaced JSON serialization method in models to utilize `to_jsonable_python` for improved compatibility with Pydantic v2. - Added a new property `headers` in the `RESTResponse` class to provide access to response headers in a more intuitive way.
1 parent 259ee24 commit 8770ee0

57 files changed

Lines changed: 270 additions & 641 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ docs/_build/
6262
# PyBuilder
6363
target/
6464

65-
#Ipython Notebook
65+
# Ipython Notebook
6666
.ipynb_checkpoints

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=whmcs_client
1616

17-
pytest-3.9:
18-
extends: .pytest
19-
image: python:3.9-alpine
2017
pytest-3.10:
2118
extends: .pytest
2219
image: python:3.10-alpine
@@ -29,3 +26,6 @@ pytest-3.12:
2926
pytest-3.13:
3027
extends: .pytest
3128
image: python:3.13-alpine
29+
pytest-3.14:
30+
extends: .pytest
31+
image: python:3.14-alpine

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.13.0
1+
7.22.0

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.9"
54
- "3.10"
65
- "3.11"
76
- "3.12"
87
- "3.13"
8+
- "3.14"
99
# uncomment the following if needed
10-
#- "3.13-dev" # 3.13 development branch
10+
#- "3.14-dev" # 3.14 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
1010

1111
- API version: 1.0.0
1212
- Package version: 1.0.24
13-
- Generator version: 7.13.0
13+
- Generator version: 7.22.0
1414
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1515

1616
## Requirements.
1717

18-
Python 3.9+
18+
Python 3.10+
1919

2020
## Installation & Usage
2121
### pip install

openapi-generator-templates/pyproject.mustache

Lines changed: 0 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -109,183 +109,6 @@ types-python-dateutil = ">= 2.8.19.14"
109109
mypy = ">= 1.5"
110110

111111

112-
[build-system]
113-
{{#hatchling}}
114-
requires = ["hatchling"]
115-
build-backend = "hatchling.build"
116-
{{/hatchling}}
117-
{{^hatchling}}
118-
requires = ["setuptools"]
119-
build-backend = "setuptools.build_meta"
120-
{{/hatchling}}
121-
122-
[tool.pylint.'MESSAGES CONTROL']
123-
extension-pkg-whitelist = "pydantic"
124-
125-
[tool.mypy]
126-
files = [
127-
"{{{packageName}}}",
128-
#"test", # auto-generated tests
129-
"tests", # hand-written tests
130-
]
131-
# TODO: enable "strict" once all these individual checks are passing
132-
# strict = true
133-
134-
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
135-
warn_unused_configs = true
136-
warn_redundant_casts = true
137-
warn_unused_ignores = true
138-
139-
## Getting these passing should be easy
140-
strict_equality = true
141-
extra_checks = true
142-
143-
## Strongly recommend enabling this one as soon as you can
144-
check_untyped_defs = true
145-
146-
## These shouldn't be too much additional work, but may be tricky to
147-
## get passing if you use a lot of untyped libraries
148-
disallow_subclassing_any = true
149-
disallow_untyped_decorators = true
150-
disallow_any_generics = true
151-
152-
### These next few are various gradations of forcing use of type annotations
153-
#disallow_untyped_calls = true
154-
#disallow_incomplete_defs = true
155-
#disallow_untyped_defs = true
156-
#
157-
### This one isn't too hard to get passing, but return on investment is lower
158-
#no_implicit_reexport = true
159-
#
160-
### This one can be tricky to get passing if you use a lot of untyped libraries
161-
#warn_return_any = true
162-
163-
[[tool.mypy.overrides]]
164-
module = [
165-
"{{{packageName}}}.configuration",
166-
]
167-
warn_unused_ignores = true
168-
strict_equality = true
169-
extra_checks = true
170-
check_untyped_defs = true
171-
disallow_subclassing_any = true
172-
disallow_untyped_decorators = true
173-
disallow_any_generics = true
174-
disallow_untyped_calls = true
175-
disallow_incomplete_defs = true
176-
disallow_untyped_defs = true
177-
no_implicit_reexport = true
178-
warn_return_any = true{{#poetry1}}
179-
[tool.poetry]
180-
{{/poetry1}}
181-
{{^poetry1}}
182-
[project]
183-
{{/poetry1}}
184-
name = "{{{packageName}}}"
185-
version = "{{{packageVersion}}}"
186-
description = "{{{appName}}}"
187-
{{#poetry1}}
188-
authors = ["{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}} <{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}>"]
189-
{{/poetry1}}
190-
{{^poetry1}}
191-
authors = [
192-
{name = "{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}}",email = "{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}"},
193-
]
194-
{{/poetry1}}
195-
{{#licenseInfo}}
196-
{{#poetry1}}
197-
license = "{{{licenseInfo}}}"
198-
{{/poetry1}}
199-
{{^poetry1}}
200-
license = { text = "{{{licenseInfo}}}" }
201-
{{/poetry1}}
202-
{{/licenseInfo}}
203-
readme = "README.md"
204-
{{#poetry1}}
205-
repository = "https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}"
206-
{{/poetry1}}
207-
keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"]
208-
{{#poetry1}}
209-
include = ["{{packageName}}/py.typed"]
210-
211-
[tool.poetry.dependencies]
212-
python = "^3.10"
213-
{{^async}}
214-
urllib3 = ">= 2.1.0, < 3.0.0"
215-
{{/async}}
216-
python-dateutil = ">= 2.8.2"
217-
{{#asyncio}}
218-
aiohttp = ">= 3.8.4"
219-
aiohttp-retry = ">= 2.8.3"
220-
{{/asyncio}}
221-
{{#httpx}}
222-
httpx = ">= 0.28.1"
223-
{{/httpx}}
224-
{{#tornado}}
225-
tornado = ">=4.2, <5"
226-
{{/tornado}}
227-
{{#hasHttpSignatureMethods}}
228-
pem = ">= 19.3.0"
229-
pycryptodome = ">= 3.9.0"
230-
{{/hasHttpSignatureMethods}}
231-
pydantic = ">= 2.11"
232-
typing-extensions = ">= 4.7.1"
233-
{{#lazyImports}}
234-
lazy-imports = ">= 1, < 2"
235-
{{/lazyImports}}
236-
{{/poetry1}}
237-
{{^poetry1}}
238-
requires-python = ">=3.10"
239-
240-
dependencies = [
241-
{{^async}}
242-
"urllib3 (>=2.1.0,<3.0.0)",
243-
{{/async}}
244-
"python-dateutil (>=2.8.2)",
245-
{{#httpx}}
246-
"httpx (>=0.28.1)",
247-
{{/httpx}}
248-
{{#asyncio}}
249-
"aiohttp (>=3.8.4)",
250-
"aiohttp-retry (>=2.8.3)",
251-
{{/asyncio}}
252-
{{#tornado}}
253-
"tornado (>=4.2,<5)",
254-
{{/tornado}}
255-
{{#hasHttpSignatureMethods}}
256-
"pem (>=19.3.0)",
257-
"pycryptodome (>=3.9.0)",
258-
{{/hasHttpSignatureMethods}}
259-
"pydantic (>=2.11)",
260-
"typing-extensions (>=4.7.1)",
261-
{{#lazyImports}}
262-
"lazy-imports (>=1,<2)"
263-
{{/lazyImports}}
264-
]
265-
266-
[project.urls]
267-
Repository = "https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}"
268-
269-
{{/poetry1}}
270-
{{^poetry1}}
271-
[tool.poetry]
272-
requires-poetry = ">=2.0"
273-
{{/poetry1}}
274-
275-
{{#poetry1}}
276-
[tool.poetry.dev-dependencies]
277-
{{/poetry1}}
278-
{{^poetry1}}
279-
[tool.poetry.group.dev.dependencies]
280-
{{/poetry1}}
281-
pytest = ">= 7.2.1"
282-
pytest-cov = ">= 2.8.1"
283-
tox = ">= 3.9.0"
284-
flake8 = ">= 4.0.0"
285-
types-python-dateutil = ">= 2.8.19.14"
286-
mypy = ">= 1.5"
287-
288-
289112
[build-system]
290113
{{#hatchling}}
291114
requires = ["hatchling"]

0 commit comments

Comments
 (0)