From faab38c3ea19b3b8c879938e46c8af28343f3c0c Mon Sep 17 00:00:00 2001 From: Ivan Kamkin <234-Ivan.Kamkin@users.noreply.git.saltov.dynabic.com> Date: Fri, 14 Mar 2025 18:15:04 +0500 Subject: [PATCH 1/3] Version updated Node templates updated --- .gitignore | 1 + codegen/Templates/nodejs/package.mustache | 35 ++++-- codegen/config-android.json | 2 +- codegen/config-dart.json | 2 +- codegen/config-go.json | 2 +- codegen/config-java.json | 2 +- codegen/config-php.json | 2 +- codegen/config-python.json | 2 +- codegen/config.json | 4 +- spec/aspose-barcode-cloud.json | 135 ++++++++++++++++++++++ submodules/android | 2 +- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- 18 files changed, 176 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index b6179a2..f250bb1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ codegen/.generated/ codegen/debug*.json .idea/ .vscode/ +.qodo diff --git a/codegen/Templates/nodejs/package.mustache b/codegen/Templates/nodejs/package.mustache index 1bf8f5c..4cf1744 100644 --- a/codegen/Templates/nodejs/package.mustache +++ b/codegen/Templates/nodejs/package.mustache @@ -132,11 +132,11 @@ "node": ">=16" }, "scripts": { - "test": "dts test", - "cover": "dts test --coverage", - "lint": "dts lint src test", - "format": "dts lint src test --fix", - "prepare": "dts build --target node", + "test": "npx jest", + "cover": "npx jest --coverage", + "lint": "npx eslint src test snippets", + "format": "npx eslint src test snippets --fix", + "prepare": "npx tsup", "check-updates": "ncu -u --enginesNode" }, "prettier": { @@ -146,16 +146,29 @@ "trailingComma": "es5", "tabWidth": 4 }, + "tsup": { + "entry": ["src/index.ts"], + "format": ["cjs", "esm"], + "dts": true, + "splitting": false, + "sourcemap": true, + "clean": true, + "minify": true + }, "devDependencies": { + "@types/jest": "^29.5.14", "@types/uuid": "^10.0.0", - "dts-cli": "^2.0.5", - "eslint-config-prettier": "^10.0.1", + "@typescript-eslint/eslint-plugin": "^8.26.1", + "@typescript-eslint/parser": "^8.26.1", + "eslint": "^9.22.0", + "eslint-config-prettier": "^10.1.1", "eslint-plugin-prettier": "^5.2.3", - "npm-check-updates": "^16.14.20", - "prettier": "^3.4.2", - "ts-jest": "^29.1.3", + "npm-check-updates": "^17.1.15", + "prettier": "^3.5.3", + "ts-jest": "^29.2.6", "tslib": "^2.8.1", - "uuid": "^11.0.5" + "tsup": "^8.4.0", + "uuid": "^11.1.0" }, "bugs": { "url": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-node/issues" diff --git a/codegen/config-android.json b/codegen/config-android.json index 1640f80..b9d2a47 100644 --- a/codegen/config-android.json +++ b/codegen/config-android.json @@ -4,7 +4,7 @@ "androidSdkVersion": "33", "apiPackage": "com.aspose.barcode.cloud.demo_app", "artifactId": "Android Application for Barcode Processing in the Cloud via REST API", - "artifactVersion": "25.2.0", + "artifactVersion": "25.3.0", "groupId": "com.aspose", "invokerPackage": "com.aspose.barcode.cloud.demo_app", "modelPackage": "com.aspose.barcode.cloud.demo_app.model" diff --git a/codegen/config-dart.json b/codegen/config-dart.json index ce08300..76e71b7 100644 --- a/codegen/config-dart.json +++ b/codegen/config-dart.json @@ -3,6 +3,6 @@ "browserClient": false, "pubDescription": "This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily", "pubName": "aspose_barcode_cloud", - "pubVersion": "4.25.2", + "pubVersion": "4.25.3", "useEnumExtension": true } \ No newline at end of file diff --git a/codegen/config-go.json b/codegen/config-go.json index dad39a6..0bdfed1 100644 --- a/codegen/config-go.json +++ b/codegen/config-go.json @@ -1,4 +1,4 @@ { "packageName": "barcode", - "packageVersion": "4.2502.0" + "packageVersion": "4.2503.0" } \ No newline at end of file diff --git a/codegen/config-java.json b/codegen/config-java.json index 0b47bc3..cc6b213 100644 --- a/codegen/config-java.json +++ b/codegen/config-java.json @@ -3,7 +3,7 @@ "artifactDescription": "Aspose.BarCode Cloud SDK for Java", "artifactId": "aspose-barcode-cloud", "artifactUrl": "https://www.aspose.cloud", - "artifactVersion": "25.2.0", + "artifactVersion": "25.3.0", "developerEmail": "denis.averin@aspose.com", "developerName": "Denis Averin", "developerOrganization": "Aspose", diff --git a/codegen/config-php.json b/codegen/config-php.json index 050cbeb..17899cd 100644 --- a/codegen/config-php.json +++ b/codegen/config-php.json @@ -1,4 +1,4 @@ { - "artifactVersion": "25.2.0", + "artifactVersion": "25.3.0", "invokerPackage": "Aspose\\BarCode" } \ No newline at end of file diff --git a/codegen/config-python.json b/codegen/config-python.json index a238fcc..6af1759 100644 --- a/codegen/config-python.json +++ b/codegen/config-python.json @@ -1,6 +1,6 @@ { "packageName": "aspose_barcode_cloud", "packageUrl": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python", - "packageVersion": "25.2.0", + "packageVersion": "25.3.0", "projectName": "aspose-barcode-cloud" } \ No newline at end of file diff --git a/codegen/config.json b/codegen/config.json index a43733e..aae1bee 100644 --- a/codegen/config.json +++ b/codegen/config.json @@ -1,9 +1,9 @@ { "artifactVersion": "23.7.0", "npmName": "aspose-barcode-cloud-node", - "npmVersion": "25.2.0", + "npmVersion": "25.3.0", "packageName": "Aspose.BarCode.Cloud.Sdk", - "packageVersion": "25.2.0", + "packageVersion": "25.3.0", "supportsES6": true, "targetFramework": "netstandard2.0" } \ No newline at end of file diff --git a/spec/aspose-barcode-cloud.json b/spec/aspose-barcode-cloud.json index 5d9c941..f99533d 100644 --- a/spec/aspose-barcode-cloud.json +++ b/spec/aspose-barcode-cloud.json @@ -186,6 +186,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -379,6 +394,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -481,6 +511,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -578,6 +623,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -653,6 +713,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -755,6 +830,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -826,6 +916,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -901,6 +1006,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -984,6 +1104,21 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { diff --git a/submodules/android b/submodules/android index d3b58d7..ded6a41 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit d3b58d7635935e99972d162d6abdcde29de04764 +Subproject commit ded6a411e2a5821e601839215fdaa30dcd1d17a5 diff --git a/submodules/dart b/submodules/dart index efd4b50..d55b075 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit efd4b508877084d9734e4a11c9995205cf3b45ba +Subproject commit d55b0753582e846d3fda626409839eccd81aa249 diff --git a/submodules/dotnet b/submodules/dotnet index 8c672e2..0b42d92 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit 8c672e25edf5276655d84c5c5f7ad8862dd17172 +Subproject commit 0b42d92fd2074f61f6c69dad256a0e5d3b4ed255 diff --git a/submodules/go b/submodules/go index 9555c80..f7fe004 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit 9555c80dd58629b2a3b415abf782fdbcb4e8f8b8 +Subproject commit f7fe004ee8abe9e5a25c145f44e925e605a1371e diff --git a/submodules/java b/submodules/java index 726b075..96d7caa 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 726b07553b5f022ccc584d7e721fb74c8ed2263e +Subproject commit 96d7caa9a0f7c453e368182fef1cbf42ad8ecbd6 diff --git a/submodules/node b/submodules/node index 781c413..45bb9dc 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 781c4131e4a3655b64413b8ca532039539da273f +Subproject commit 45bb9dcf76281c597bba144055de41514a65ed4e diff --git a/submodules/php b/submodules/php index 519e007..faa60fc 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 519e007445632ba267a9405f2d067a8cd6f3a97e +Subproject commit faa60fc72e5840a13085b0fd2d2131f540d01d50 diff --git a/submodules/python b/submodules/python index 8fcc15d..eac0f73 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit 8fcc15dce0c2163d212804efe3a0ac80f2a544fc +Subproject commit eac0f7355b0ceeae6e23b4588555283af98793e1 From 927565265af0598671793b8e6bd43d2b45e47a1e Mon Sep 17 00:00:00 2001 From: Ivan Kamkin <234-Ivan.Kamkin@users.noreply.git.saltov.dynabic.com> Date: Tue, 18 Mar 2025 13:41:28 +0500 Subject: [PATCH 2/3] Updated templates for go and php Switch all submodules to main --- codegen/Templates/go/api.mustache | 11 +++++------ codegen/Templates/php/README.mustache | 2 +- codegen/Templates/php/api.mustache | 15 +++++---------- codegen/Templates/php/model.mustache | 2 +- submodules/android | 2 +- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- 12 files changed, 20 insertions(+), 26 deletions(-) diff --git a/codegen/Templates/go/api.mustache b/codegen/Templates/go/api.mustache index d9a92a9..b8cac25 100644 --- a/codegen/Templates/go/api.mustache +++ b/codegen/Templates/go/api.mustache @@ -277,18 +277,17 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} text: string(responseBody), StatusCode: httpResponse.StatusCode, } - {{#responses}}{{#dataType}} - if httpResponse.StatusCode == {{{code}}} { - var v {{{dataType}}} + if httpResponse.StatusCode >= 400 && httpResponse.StatusCode < 500 { + var v ApiErrorResponse err = a.client.decode(&v, responseBody, httpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr + return returnValue, httpResponse, newErr } newErr.model = v - return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr + return returnValue, httpResponse, newErr } - {{/dataType}}{{/responses}} + return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr } diff --git a/codegen/Templates/php/README.mustache b/codegen/Templates/php/README.mustache index 99ebcfd..8455d0e 100644 --- a/codegen/Templates/php/README.mustache +++ b/codegen/Templates/php/README.mustache @@ -9,7 +9,7 @@ {{#artifactVersion}} - Package version: {{artifactVersion}} {{/artifactVersion}} -- Supported PHP versions: ">=7.4 || >=8.0" +- Supported PHP versions: ">=8.0" ## SDK and API Version Compatibility: diff --git a/codegen/Templates/php/api.mustache b/codegen/Templates/php/api.mustache index 32713b7..8e102fa 100644 --- a/codegen/Templates/php/api.mustache +++ b/codegen/Templates/php/api.mustache @@ -44,7 +44,7 @@ use RuntimeException; * @param Configuration|null $config configuration info * @param HeaderSelector|null $selector class for header selection */ - public function __construct(ClientInterface $client = null, Configuration $config = null, HeaderSelector $selector = null) + public function __construct(?ClientInterface $client = null, ?Configuration $config = null, ?HeaderSelector $selector = null) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -155,15 +155,10 @@ use RuntimeException; return [null, $statusCode, $response->getHeaders()]; {{/returnType}} } catch (ApiException $e) { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - {{/dataType}} - {{/responses}} + $code = $e->getCode(); + if ($code >= 400 && $code < 500) { + $data = ObjectSerializer::deserialize($e->getResponseBody(), '\Aspose\BarCode\Model\ApiErrorResponse', $e->getResponseHeaders()); + $e->setResponseObject($data); } throw $e; } diff --git a/codegen/Templates/php/model.mustache b/codegen/Templates/php/model.mustache index 9ef3136..c3b8aa1 100644 --- a/codegen/Templates/php/model.mustache +++ b/codegen/Templates/php/model.mustache @@ -186,7 +186,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { {{#parentSchema}} parent::__construct($data); diff --git a/submodules/android b/submodules/android index ded6a41..ff35a5a 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit ded6a411e2a5821e601839215fdaa30dcd1d17a5 +Subproject commit ff35a5a273b4e716723af12d37b2f0066ab4f9a1 diff --git a/submodules/dart b/submodules/dart index d55b075..c1f0642 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit d55b0753582e846d3fda626409839eccd81aa249 +Subproject commit c1f064270ee5df55092a52f7acc4788f2dd09711 diff --git a/submodules/dotnet b/submodules/dotnet index 0b42d92..2ca02d0 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit 0b42d92fd2074f61f6c69dad256a0e5d3b4ed255 +Subproject commit 2ca02d08883eb2f788e690db138fbb9a630653a7 diff --git a/submodules/go b/submodules/go index f7fe004..e2a3506 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit f7fe004ee8abe9e5a25c145f44e925e605a1371e +Subproject commit e2a3506bf651958a5a9b18a1490fc1ddd8976109 diff --git a/submodules/java b/submodules/java index 96d7caa..07f655e 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 96d7caa9a0f7c453e368182fef1cbf42ad8ecbd6 +Subproject commit 07f655ef7465277120ecafb4e689f4ee57924bd5 diff --git a/submodules/node b/submodules/node index 45bb9dc..17cd2ba 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 45bb9dcf76281c597bba144055de41514a65ed4e +Subproject commit 17cd2bae6f6cfc43040409794c578995dd19f717 diff --git a/submodules/php b/submodules/php index faa60fc..69a8011 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit faa60fc72e5840a13085b0fd2d2131f540d01d50 +Subproject commit 69a801192a718d9be62095d59f4a7edc3615e5b6 diff --git a/submodules/python b/submodules/python index eac0f73..099ac07 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit eac0f7355b0ceeae6e23b4588555283af98793e1 +Subproject commit 099ac071eef455a8fe02e01e08efa42cedc9654a From dbeb5adb3ee4892663a394fc295a61da1ab51326 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin <234-Ivan.Kamkin@users.noreply.git.saltov.dynabic.com> Date: Tue, 18 Mar 2025 13:48:08 +0500 Subject: [PATCH 3/3] Updated check urls --- scripts/check-urls.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check-urls.py b/scripts/check-urls.py index 74169ca..66ce3dc 100644 --- a/scripts/check-urls.py +++ b/scripts/check-urls.py @@ -45,6 +45,7 @@ class Curl: [ "https://api.aspose.cloud", "https://www.aspose.cloud/404", + "https://www.aspose.cloud/404/", ] )