datamodel-code-generator 0.34.0__py3-none-any.whl → 0.35.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datamodel-code-generator might be problematic. Click here for more details.
- datamodel_code_generator/__main__.py +8 -2
- datamodel_code_generator/arguments.py +5 -4
- datamodel_code_generator/format.py +1 -0
- {datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/METADATA +3 -2
- {datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/RECORD +8 -8
- {datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/WHEEL +0 -0
- {datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/entry_points.txt +0 -0
- {datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -111,9 +111,15 @@ class Config(BaseModel):
|
|
|
111
111
|
|
|
112
112
|
@field_validator("aliases", "extra_template_data", "custom_formatters_kwargs", mode="before")
|
|
113
113
|
def validate_file(cls, value: Any) -> TextIOBase | None: # noqa: N805
|
|
114
|
-
if value is None
|
|
114
|
+
if value is None: # pragma: no cover
|
|
115
115
|
return value
|
|
116
|
-
|
|
116
|
+
|
|
117
|
+
path = Path(value)
|
|
118
|
+
if path.is_file():
|
|
119
|
+
return cast("TextIOBase", path.expanduser().resolve().open("rt"))
|
|
120
|
+
|
|
121
|
+
msg = f"A file was expected but {value} is not a file."
|
|
122
|
+
raise Error(msg) # pragma: no cover
|
|
117
123
|
|
|
118
124
|
@field_validator(
|
|
119
125
|
"input",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import locale
|
|
4
|
-
from argparse import ArgumentParser,
|
|
4
|
+
from argparse import ArgumentParser, HelpFormatter, Namespace
|
|
5
5
|
from operator import attrgetter
|
|
6
|
+
from pathlib import Path
|
|
6
7
|
from typing import TYPE_CHECKING
|
|
7
8
|
|
|
8
9
|
from datamodel_code_generator import DataModelType, InputFileType, OpenAPIScope
|
|
@@ -417,7 +418,7 @@ field_options.add_argument(
|
|
|
417
418
|
template_options.add_argument(
|
|
418
419
|
"--aliases",
|
|
419
420
|
help="Alias mapping file",
|
|
420
|
-
type=
|
|
421
|
+
type=Path,
|
|
421
422
|
)
|
|
422
423
|
template_options.add_argument(
|
|
423
424
|
"--custom-file-header",
|
|
@@ -448,7 +449,7 @@ template_options.add_argument(
|
|
|
448
449
|
"apply the template data to multiple objects with the same name. "
|
|
449
450
|
"If you are using another input file type (e.g. GraphQL), the key is the name of the object. "
|
|
450
451
|
"The value is a dictionary of the template data to add.",
|
|
451
|
-
type=
|
|
452
|
+
type=Path,
|
|
452
453
|
)
|
|
453
454
|
template_options.add_argument(
|
|
454
455
|
"--use-double-quotes",
|
|
@@ -485,7 +486,7 @@ base_options.add_argument(
|
|
|
485
486
|
template_options.add_argument(
|
|
486
487
|
"--custom-formatters-kwargs",
|
|
487
488
|
help="A file with kwargs for custom formatters.",
|
|
488
|
-
type=
|
|
489
|
+
type=Path,
|
|
489
490
|
)
|
|
490
491
|
|
|
491
492
|
# ======================================================================================
|
{datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datamodel-code-generator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.35.0
|
|
4
4
|
Summary: Datamodel Code Generator
|
|
5
5
|
Project-URL: Homepage, https://github.com/koxudaxi/datamodel-code-generator
|
|
6
6
|
Project-URL: Source, https://github.com/koxudaxi/datamodel-code-generator
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
20
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
21
|
Requires-Python: >=3.9
|
|
21
22
|
Requires-Dist: argcomplete<4,>=2.10.1
|
|
@@ -516,7 +517,7 @@ Model customization:
|
|
|
516
517
|
Set name of models defined inline from the parent model
|
|
517
518
|
--reuse-model Reuse models on the field when a module has the model with the same
|
|
518
519
|
content
|
|
519
|
-
--target-python-version {3.9,3.10,3.11,3.12,3.13}
|
|
520
|
+
--target-python-version {3.9,3.10,3.11,3.12,3.13,3.14}
|
|
520
521
|
target python version
|
|
521
522
|
--treat-dot-as-module
|
|
522
523
|
treat dotted module names as modules
|
{datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
datamodel_code_generator/__init__.py,sha256=fDwU8afS8W-Z8UQeV7-xvAYCpuzlrMgRDv-TXJ4Wowg,21330
|
|
2
|
-
datamodel_code_generator/__main__.py,sha256=
|
|
3
|
-
datamodel_code_generator/arguments.py,sha256=
|
|
4
|
-
datamodel_code_generator/format.py,sha256=
|
|
2
|
+
datamodel_code_generator/__main__.py,sha256=6zVWd1uiX5J25vZBIEU7KLYweWy5Amj7SpN2Q2lxrHI,25705
|
|
3
|
+
datamodel_code_generator/arguments.py,sha256=0dfqqv0UL7Jkhh26q03K1RKrqIgPjj_BtDvI0fPSF7g,17908
|
|
4
|
+
datamodel_code_generator/format.py,sha256=1VgZ3q-NJbBPJ98cQUhCBsLfFC2WnQbONKohKOWwvgs,8958
|
|
5
5
|
datamodel_code_generator/http.py,sha256=LE94GC7I9D8lWIg_YAGWedfy0XNxOXTmiYKuNMTwouo,887
|
|
6
6
|
datamodel_code_generator/imports.py,sha256=Nq83WbEGCegntg3WX4VbKfzAIs84alZ7IrYyNPrlUbc,5517
|
|
7
7
|
datamodel_code_generator/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -52,8 +52,8 @@ datamodel_code_generator/parser/base.py,sha256=lwmy7aCi-BH78DARDa657i5_wURHvmWcn
|
|
|
52
52
|
datamodel_code_generator/parser/graphql.py,sha256=x5Jge8xZiaup9jMhX6jVKncme_D5FmSoEWmXIKtguVo,23384
|
|
53
53
|
datamodel_code_generator/parser/jsonschema.py,sha256=TGxKrJRxPYEAP8uiFIKrkgH3Vj3HCTQ6csIDGvJorng,72513
|
|
54
54
|
datamodel_code_generator/parser/openapi.py,sha256=puBXUaq4zXDl7wj-VsZmmmt_D672RfS6qY9WID0VRPw,28603
|
|
55
|
-
datamodel_code_generator-0.
|
|
56
|
-
datamodel_code_generator-0.
|
|
57
|
-
datamodel_code_generator-0.
|
|
58
|
-
datamodel_code_generator-0.
|
|
59
|
-
datamodel_code_generator-0.
|
|
55
|
+
datamodel_code_generator-0.35.0.dist-info/METADATA,sha256=It_DP-qTVcSnx4BxNmrIbw2P3g3HV46SoWgmwnwf-wc,26147
|
|
56
|
+
datamodel_code_generator-0.35.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
57
|
+
datamodel_code_generator-0.35.0.dist-info/entry_points.txt,sha256=cJVcHiEViQMANaoM5C1xR5hzmyCqH6hHHMpV8W00in8,77
|
|
58
|
+
datamodel_code_generator-0.35.0.dist-info/licenses/LICENSE,sha256=K54Lwc6_jduycsy8oFFjQEeSSuEiqvVIjCGIXOMnuTQ,1068
|
|
59
|
+
datamodel_code_generator-0.35.0.dist-info/RECORD,,
|
{datamodel_code_generator-0.34.0.dist-info → datamodel_code_generator-0.35.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|