openapi-generator-cli 7.8.0__tar.gz → 7.10.0__tar.gz
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.
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/PKG-INFO +3 -16
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/README.md +1 -12
- openapi_generator_cli-7.10.0/openapi_generator_cli/__init__.py +35 -0
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/openapi_generator_cli/openapi-generator.jar +0 -0
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/pyproject.toml +4 -19
- openapi_generator_cli-7.8.0/openapi_generator_cli/__init__.py +0 -66
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/LICENSE +0 -0
- {openapi_generator_cli-7.8.0 → openapi_generator_cli-7.10.0}/openapi_generator_cli/py.typed +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: openapi-generator-cli
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.10.0
|
|
4
4
|
Summary: CLI for openapi generator
|
|
5
5
|
Home-page: https://openapi-generator.tech
|
|
6
6
|
License: APACHE 2.0
|
|
7
|
-
Keywords:
|
|
7
|
+
Keywords: opeapi,generator,cli
|
|
8
8
|
Author: OpenAPI Generator community
|
|
9
9
|
Author-email: team@openapitools.org
|
|
10
10
|
Requires-Python: >=3.9,<4
|
|
@@ -20,22 +20,16 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
21
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
22
22
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
23
|
-
Provides-Extra: jdk4py
|
|
24
|
-
Requires-Dist: jdk4py (>=21.0.4.1,<22.0.0.0) ; (python_version >= "3.10") and (extra == "jdk4py")
|
|
25
23
|
Project-URL: Documentation, https://github.com/OpenAPITools/openapi-generator#3---usage
|
|
26
24
|
Project-URL: Repository, https://github.com/OpenAPITools/openapi-generator
|
|
27
25
|
Description-Content-Type: text/markdown
|
|
28
26
|
|
|
29
|
-
#
|
|
27
|
+
# OpenApi Generator PIP Package Generator
|
|
30
28
|
|
|
31
29
|
[](
|
|
34
32
|
<https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g>
|
|
35
|
-
) [](
|
|
38
|
-
<https://badge.fury.io/py/openapi-generator-cli>
|
|
39
33
|
) [](
|
|
@@ -66,12 +60,6 @@ pip install openapi-generator-cli
|
|
|
66
60
|
pip install openapi-generator-cli==4.3.1
|
|
67
61
|
```
|
|
68
62
|
|
|
69
|
-
You can also install with [`jdk4py`] instead of `java` binary. (`python>=3.10` is required)
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
pip install openapi-generator-cli[jdk4py]
|
|
73
|
-
```
|
|
74
|
-
|
|
75
63
|
After installation `openapi-generator-cli` command will be available in your virtual environment or globally depending on your installation.
|
|
76
64
|
|
|
77
65
|
To check the version, for example. Type the following command
|
|
@@ -95,6 +83,5 @@ Please raise an issue, happy to hear from you :)
|
|
|
95
83
|
|
|
96
84
|
[OpenAPITools/openapi-generator]: <https://github.com/OpenAPITools/openapi-generator>
|
|
97
85
|
[maven repository]: <https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli>
|
|
98
|
-
[`jdk4py`]: <https://github.com/activeviam/jdk4py>
|
|
99
86
|
[official openapi-generator docs]: <https://github.com/OpenAPITools/openapi-generator#3---usage>
|
|
100
87
|
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OpenApi Generator PIP Package Generator
|
|
2
2
|
|
|
3
3
|
[](
|
|
6
6
|
<https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g>
|
|
7
|
-
) [](
|
|
10
|
-
<https://badge.fury.io/py/openapi-generator-cli>
|
|
11
7
|
) [](
|
|
@@ -38,12 +34,6 @@ pip install openapi-generator-cli
|
|
|
38
34
|
pip install openapi-generator-cli==4.3.1
|
|
39
35
|
```
|
|
40
36
|
|
|
41
|
-
You can also install with [`jdk4py`] instead of `java` binary. (`python>=3.10` is required)
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
pip install openapi-generator-cli[jdk4py]
|
|
45
|
-
```
|
|
46
|
-
|
|
47
37
|
After installation `openapi-generator-cli` command will be available in your virtual environment or globally depending on your installation.
|
|
48
38
|
|
|
49
39
|
To check the version, for example. Type the following command
|
|
@@ -67,5 +57,4 @@ Please raise an issue, happy to hear from you :)
|
|
|
67
57
|
|
|
68
58
|
[OpenAPITools/openapi-generator]: <https://github.com/OpenAPITools/openapi-generator>
|
|
69
59
|
[maven repository]: <https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli>
|
|
70
|
-
[`jdk4py`]: <https://github.com/activeviam/jdk4py>
|
|
71
60
|
[official openapi-generator docs]: <https://github.com/OpenAPITools/openapi-generator#3---usage>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import importlib.resources
|
|
4
|
+
import os
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def run(args: list[str] | None = None) -> None:
|
|
10
|
+
arguments = ["java"]
|
|
11
|
+
|
|
12
|
+
java_opts = os.getenv("JAVA_OPTS")
|
|
13
|
+
if java_opts:
|
|
14
|
+
arguments.append(java_opts)
|
|
15
|
+
|
|
16
|
+
arguments.append("-jar")
|
|
17
|
+
|
|
18
|
+
jar_path = importlib.resources.files("openapi_generator_cli") / "openapi-generator.jar"
|
|
19
|
+
arguments.append(str(jar_path))
|
|
20
|
+
|
|
21
|
+
if args and type(args) == list:
|
|
22
|
+
arguments.extend(args)
|
|
23
|
+
|
|
24
|
+
subprocess.call(arguments) # noqa: S603
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def cli() -> None:
|
|
28
|
+
args = []
|
|
29
|
+
if len(sys.argv) > 1:
|
|
30
|
+
args = sys.argv[1:]
|
|
31
|
+
run(args)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
cli()
|
|
Binary file
|
|
@@ -7,7 +7,7 @@ requires = [
|
|
|
7
7
|
]
|
|
8
8
|
|
|
9
9
|
[tool.poetry]
|
|
10
|
-
version = "7.
|
|
10
|
+
version = "7.10.0"
|
|
11
11
|
authors = [
|
|
12
12
|
"OpenAPI Generator community <team@openapitools.org>",
|
|
13
13
|
]
|
|
@@ -21,7 +21,7 @@ classifiers = [
|
|
|
21
21
|
]
|
|
22
22
|
description = "CLI for openapi generator"
|
|
23
23
|
keywords = [
|
|
24
|
-
"
|
|
24
|
+
"opeapi",
|
|
25
25
|
"generator",
|
|
26
26
|
"cli",
|
|
27
27
|
]
|
|
@@ -38,17 +38,12 @@ documentation = "https://github.com/OpenAPITools/openapi-generator#3---usage"
|
|
|
38
38
|
|
|
39
39
|
[tool.poetry.dependencies]
|
|
40
40
|
python = ">=3.9,<4"
|
|
41
|
-
jdk4py = { version = "^21.0.4.1", optional = true, python = ">=3.10" }
|
|
42
41
|
|
|
43
42
|
[tool.poetry.group.dev.dependencies]
|
|
44
43
|
mypy = ">=0.991,<1.14"
|
|
45
|
-
pre-commit = ">=2.20,<
|
|
44
|
+
pre-commit = ">=2.20,<4.0"
|
|
46
45
|
taskipy = "^1.10.3"
|
|
47
46
|
pytest = ">=7.2.2,<9.0.0"
|
|
48
|
-
natsort = "^8.4.0"
|
|
49
|
-
|
|
50
|
-
[tool.poetry.extras]
|
|
51
|
-
jdk4py = [ "jdk4py" ]
|
|
52
47
|
|
|
53
48
|
[tool.poetry.scripts]
|
|
54
49
|
openapi-generator-cli = "openapi_generator_cli:cli"
|
|
@@ -66,18 +61,11 @@ lint.select = [
|
|
|
66
61
|
"ALL",
|
|
67
62
|
]
|
|
68
63
|
lint.ignore = [
|
|
69
|
-
"
|
|
70
|
-
"D213", # Multi-line docstring summary should start at the second line
|
|
64
|
+
"D",
|
|
71
65
|
]
|
|
72
66
|
lint.per-file-ignores."publish.py" = [
|
|
73
|
-
"D",
|
|
74
|
-
"S603", # `subprocess` call: check for execution of untrusted input
|
|
75
67
|
"T201", # `print` found
|
|
76
68
|
]
|
|
77
|
-
lint.per-file-ignores."tests/*" = [
|
|
78
|
-
"D",
|
|
79
|
-
"S101", # Use of `assert` detected
|
|
80
|
-
]
|
|
81
69
|
|
|
82
70
|
[tool.mypy]
|
|
83
71
|
pretty = true
|
|
@@ -86,9 +74,6 @@ show_error_codes = true
|
|
|
86
74
|
strict = true
|
|
87
75
|
|
|
88
76
|
[tool.taskipy.tasks]
|
|
89
|
-
download-latest-jar = "DOWNLOAD_LATEST_ONLY=1 task publish"
|
|
90
77
|
test = "pytest"
|
|
91
|
-
test-unpublished-versions = "DRYRUN=1 task publish"
|
|
92
78
|
lint = "pre-commit run -a"
|
|
93
|
-
publish = "python publish.py"
|
|
94
79
|
profile = "python -m cProfile"
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"""A Python wrapper for the OpenAPI Generator CLI."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import importlib.resources
|
|
6
|
-
import os
|
|
7
|
-
import shutil
|
|
8
|
-
import subprocess
|
|
9
|
-
import sys
|
|
10
|
-
from typing import TYPE_CHECKING
|
|
11
|
-
|
|
12
|
-
if TYPE_CHECKING:
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def run(args: list[str] | None = None) -> subprocess.CompletedProcess[bytes]:
|
|
17
|
-
"""Run the OpenAPI Generator CLI with the given arguments.
|
|
18
|
-
|
|
19
|
-
Args:
|
|
20
|
-
args (list[str], optional):
|
|
21
|
-
The list of arguments to pass to the Open
|
|
22
|
-
API Generator CLI. If not provided, the CLI will
|
|
23
|
-
be run without any arguments.
|
|
24
|
-
|
|
25
|
-
Returns:
|
|
26
|
-
subprocess.CompletedProcess[bytes]: The result of running the OpenAPI Generator CLI.
|
|
27
|
-
|
|
28
|
-
"""
|
|
29
|
-
java_path: Path | str | None
|
|
30
|
-
try:
|
|
31
|
-
from jdk4py import JAVA
|
|
32
|
-
|
|
33
|
-
java_path = JAVA
|
|
34
|
-
except ImportError:
|
|
35
|
-
java_path = shutil.which("java")
|
|
36
|
-
if not java_path:
|
|
37
|
-
msg = "java runtime is not found in PATH"
|
|
38
|
-
raise RuntimeError(msg)
|
|
39
|
-
|
|
40
|
-
arguments = [java_path]
|
|
41
|
-
|
|
42
|
-
java_opts = os.getenv("JAVA_OPTS")
|
|
43
|
-
if java_opts:
|
|
44
|
-
arguments.append(java_opts)
|
|
45
|
-
|
|
46
|
-
arguments.append("-jar")
|
|
47
|
-
|
|
48
|
-
jar_path = importlib.resources.files("openapi_generator_cli") / "openapi-generator.jar"
|
|
49
|
-
arguments.append(str(jar_path))
|
|
50
|
-
|
|
51
|
-
if args and isinstance(args, list):
|
|
52
|
-
arguments.extend(args)
|
|
53
|
-
|
|
54
|
-
return subprocess.run(arguments, check=False) # noqa: S603
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def cli() -> None:
|
|
58
|
-
"""Run the OpenAPI Generator CLI with the arguments provided on the command line."""
|
|
59
|
-
args = []
|
|
60
|
-
if len(sys.argv) > 1:
|
|
61
|
-
args = sys.argv[1:]
|
|
62
|
-
run(args)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if __name__ == "__main__":
|
|
66
|
-
cli()
|
|
File without changes
|
|
File without changes
|