Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ codegen/.generated/
codegen/debug*.json
.idea/
.vscode/
.qodo
11 changes: 5 additions & 6 deletions codegen/Templates/go/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
35 changes: 24 additions & 11 deletions codegen/Templates/nodejs/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/php/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
15 changes: 5 additions & 10 deletions codegen/Templates/php/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/php/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion codegen/config-go.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packageName": "barcode",
"packageVersion": "4.2502.0"
"packageVersion": "4.2503.0"
}
2 changes: 1 addition & 1 deletion codegen/config-java.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"developerName": "Denis Averin",
"developerOrganization": "Aspose",
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-php.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"artifactVersion": "25.2.0",
"artifactVersion": "25.3.0",
"invokerPackage": "Aspose\\BarCode"
}
2 changes: 1 addition & 1 deletion codegen/config-python.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions codegen/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
135 changes: 135 additions & 0 deletions spec/aspose-barcode-cloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion submodules/android
Submodule android updated 1 files
+1 −1 app/build.gradle
2 changes: 1 addition & 1 deletion submodules/dart
Loading
Loading