Skip to content

Commit bf115ee

Browse files
committed
fixed versioning and generation
1 parent 3a8b61b commit bf115ee

File tree

7 files changed

+23
-16
lines changed

7 files changed

+23
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ The full OpenAPI spec, which can be imported into Postman, can be found here: [/
227227
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
228228

229229
- API version: v2
230-
- Package version: 1.0.0
230+
- Package version: 0.6.0
231231
- Generator version: 7.13.0
232232
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
233233

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "t3api"
3-
version = "1.0.0"
3+
version = "0.6.0"
44
description = "T3 API"
55
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
66
license = "NoLicense"

scripts/generate.sh

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,34 @@ set -euo pipefail
33

44
SPEC_URL="https://api.trackandtrace.tools/v2/spec/openapi.json"
55
PACKAGE_NAME="t3api"
6+
TMP_DIR="_tmp_generated_client"
7+
PACKAGE_VERSION="0.6.0"
68

79
# Ensure openapi-generator is installed
810
if ! command -v openapi-generator &> /dev/null; then
911
echo "❌ openapi-generator is not installed. Please install it first."
1012
exit 1
1113
fi
1214

13-
# Clean up previous output
14-
echo "🔄 Removing old generated client..."
15-
rm -rf "$PACKAGE_NAME"
16-
rm -rf test/
17-
rm -rf docs/
18-
rm -rf .openapi-generator
15+
# Clean up temp directory if it exists
16+
rm -rf "$TMP_DIR"
1917

20-
# Generate new client in current directory
21-
echo "⚙️ Generating new client into current directory..."
18+
# Generate new client into temp directory
19+
echo "⚙️ Generating new client into $TMP_DIR..."
2220
openapi-generator generate \
2321
-g python \
2422
-i "$SPEC_URL" \
25-
-o . \
26-
--package-name "$PACKAGE_NAME"
23+
-o "$TMP_DIR" \
24+
--package-name "$PACKAGE_NAME" \
25+
--additional-properties=packageVersion="$PACKAGE_VERSION"
26+
27+
# Copy contents from temp directory into current directory
28+
echo "📁 Copying generated files to current directory..."
29+
cp -a "$TMP_DIR"/. .
30+
31+
# Remove temp directory
32+
echo "🧹 Cleaning up temp directory..."
33+
rm -rf "$TMP_DIR"
2734

2835
echo "✅ Done regenerating client."
2936
echo ""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "t3api"
24-
VERSION = "1.0.0"
24+
VERSION = "0.6.0"
2525
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
2727
"urllib3 >= 2.1.0, < 3.0.0",

t3api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "1.0.0"
17+
__version__ = "0.6.0"
1818

1919
# import apis into sdk package
2020
from t3api.api.authentication_api import AuthenticationApi

t3api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
93+
self.user_agent = 'OpenAPI-Generator/0.6.0/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

t3api/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def to_debug_report(self) -> str:
511511
"OS: {env}\n"\
512512
"Python Version: {pyversion}\n"\
513513
"Version of the API: v2\n"\
514-
"SDK Package Version: 1.0.0".\
514+
"SDK Package Version: 0.6.0".\
515515
format(env=sys.platform, pyversion=sys.version)
516516

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

0 commit comments

Comments
 (0)