Skip to content

Commit 4aa8cd1

Browse files
authored
Release 25.3 (#120)
* Version updated Node templates updated * Updated templates for go and php Switch all submodules to main * Updated check urls
1 parent 507c14b commit 4aa8cd1

23 files changed

+189
-45
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ codegen/.generated/
88
codegen/debug*.json
99
.idea/
1010
.vscode/
11+
.qodo

codegen/Templates/go/api.mustache

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,18 +277,17 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
277277
text: string(responseBody),
278278
StatusCode: httpResponse.StatusCode,
279279
}
280-
{{#responses}}{{#dataType}}
281-
if httpResponse.StatusCode == {{{code}}} {
282-
var v {{{dataType}}}
280+
if httpResponse.StatusCode >= 400 && httpResponse.StatusCode < 500 {
281+
var v ApiErrorResponse
283282
err = a.client.decode(&v, responseBody, httpResponse.Header.Get("Content-Type"))
284283
if err != nil {
285284
newErr.error = err.Error()
286-
return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr
285+
return returnValue, httpResponse, newErr
287286
}
288287
newErr.model = v
289-
return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr
288+
return returnValue, httpResponse, newErr
290289
}
291-
{{/dataType}}{{/responses}}
290+
292291
return {{#returnType}}returnValue, {{/returnType}}httpResponse, newErr
293292
}
294293

codegen/Templates/nodejs/package.mustache

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@
132132
"node": ">=16"
133133
},
134134
"scripts": {
135-
"test": "dts test",
136-
"cover": "dts test --coverage",
137-
"lint": "dts lint src test",
138-
"format": "dts lint src test --fix",
139-
"prepare": "dts build --target node",
135+
"test": "npx jest",
136+
"cover": "npx jest --coverage",
137+
"lint": "npx eslint src test snippets",
138+
"format": "npx eslint src test snippets --fix",
139+
"prepare": "npx tsup",
140140
"check-updates": "ncu -u --enginesNode"
141141
},
142142
"prettier": {
@@ -146,16 +146,29 @@
146146
"trailingComma": "es5",
147147
"tabWidth": 4
148148
},
149+
"tsup": {
150+
"entry": ["src/index.ts"],
151+
"format": ["cjs", "esm"],
152+
"dts": true,
153+
"splitting": false,
154+
"sourcemap": true,
155+
"clean": true,
156+
"minify": true
157+
},
149158
"devDependencies": {
159+
"@types/jest": "^29.5.14",
150160
"@types/uuid": "^10.0.0",
151-
"dts-cli": "^2.0.5",
152-
"eslint-config-prettier": "^10.0.1",
161+
"@typescript-eslint/eslint-plugin": "^8.26.1",
162+
"@typescript-eslint/parser": "^8.26.1",
163+
"eslint": "^9.22.0",
164+
"eslint-config-prettier": "^10.1.1",
153165
"eslint-plugin-prettier": "^5.2.3",
154-
"npm-check-updates": "^16.14.20",
155-
"prettier": "^3.4.2",
156-
"ts-jest": "^29.1.3",
166+
"npm-check-updates": "^17.1.15",
167+
"prettier": "^3.5.3",
168+
"ts-jest": "^29.2.6",
157169
"tslib": "^2.8.1",
158-
"uuid": "^11.0.5"
170+
"tsup": "^8.4.0",
171+
"uuid": "^11.1.0"
159172
},
160173
"bugs": {
161174
"url": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-node/issues"

codegen/Templates/php/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{#artifactVersion}}
1010
- Package version: {{artifactVersion}}
1111
{{/artifactVersion}}
12-
- Supported PHP versions: ">=7.4 || >=8.0"
12+
- Supported PHP versions: ">=8.0"
1313

1414
## SDK and API Version Compatibility:
1515

codegen/Templates/php/api.mustache

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use RuntimeException;
4444
* @param Configuration|null $config configuration info
4545
* @param HeaderSelector|null $selector class for header selection
4646
*/
47-
public function __construct(ClientInterface $client = null, Configuration $config = null, HeaderSelector $selector = null)
47+
public function __construct(?ClientInterface $client = null, ?Configuration $config = null, ?HeaderSelector $selector = null)
4848
{
4949
$this->client = $client ?: new Client();
5050
$this->config = $config ?: new Configuration();
@@ -155,15 +155,10 @@ use RuntimeException;
155155
return [null, $statusCode, $response->getHeaders()];
156156
{{/returnType}}
157157
} catch (ApiException $e) {
158-
switch ($e->getCode()) {
159-
{{#responses}}
160-
{{#dataType}}
161-
{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}}
162-
$data = ObjectSerializer::deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders());
163-
$e->setResponseObject($data);
164-
break;
165-
{{/dataType}}
166-
{{/responses}}
158+
$code = $e->getCode();
159+
if ($code >= 400 && $code < 500) {
160+
$data = ObjectSerializer::deserialize($e->getResponseBody(), '\Aspose\BarCode\Model\ApiErrorResponse', $e->getResponseHeaders());
161+
$e->setResponseObject($data);
167162
}
168163
throw $e;
169164
}

codegen/Templates/php/model.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
186186
* @param mixed[] $data Associated array of property values
187187
* initializing the model
188188
*/
189-
public function __construct(array $data = null)
189+
public function __construct(?array $data = null)
190190
{
191191
{{#parentSchema}}
192192
parent::__construct($data);

codegen/config-android.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"androidSdkVersion": "33",
55
"apiPackage": "com.aspose.barcode.cloud.demo_app",
66
"artifactId": "Android Application for Barcode Processing in the Cloud via REST API",
7-
"artifactVersion": "25.2.0",
7+
"artifactVersion": "25.3.0",
88
"groupId": "com.aspose",
99
"invokerPackage": "com.aspose.barcode.cloud.demo_app",
1010
"modelPackage": "com.aspose.barcode.cloud.demo_app.model"

codegen/config-dart.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"browserClient": false,
44
"pubDescription": "This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily",
55
"pubName": "aspose_barcode_cloud",
6-
"pubVersion": "4.25.2",
6+
"pubVersion": "4.25.3",
77
"useEnumExtension": true
88
}

codegen/config-go.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"packageName": "barcode",
3-
"packageVersion": "4.2502.0"
3+
"packageVersion": "4.2503.0"
44
}

codegen/config-java.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"artifactDescription": "Aspose.BarCode Cloud SDK for Java",
44
"artifactId": "aspose-barcode-cloud",
55
"artifactUrl": "https://www.aspose.cloud",
6-
"artifactVersion": "25.2.0",
6+
"artifactVersion": "25.3.0",
77
"developerEmail": "denis.averin@aspose.com",
88
"developerName": "Denis Averin",
99
"developerOrganization": "Aspose",

0 commit comments

Comments
 (0)