diff --git a/codegen/Templates/android/apiException.mustache b/codegen/Templates/android/MainActivity.kt.mustache similarity index 92% rename from codegen/Templates/android/apiException.mustache rename to codegen/Templates/android/MainActivity.kt.mustache index 73484c8b..01dacd22 100644 --- a/codegen/Templates/android/apiException.mustache +++ b/codegen/Templates/android/MainActivity.kt.mustache @@ -29,7 +29,12 @@ import com.aspose.barcode.cloud.ApiException import com.aspose.barcode.cloud.api.GenerateApi import com.aspose.barcode.cloud.api.ScanApi import com.aspose.barcode.cloud.model.BarcodeImageFormat +import com.aspose.barcode.cloud.model.BarcodeImageParams import com.aspose.barcode.cloud.model.EncodeBarcodeType +import com.aspose.barcode.cloud.model.QREncodeMode +import com.aspose.barcode.cloud.model.QRErrorLevel +import com.aspose.barcode.cloud.model.QRVersion +import com.aspose.barcode.cloud.model.QrParams import com.aspose.barcode.cloud.requests.GenerateRequestWrapper import com.aspose.barcode.cloud.requests.ScanMultipartRequestWrapper import com.google.android.material.snackbar.Snackbar @@ -227,9 +232,20 @@ class MainActivity : AppCompatActivity() { val type = EncodeBarcodeType.fromValue(barcodeTypeSpinner.selectedItem.toString()) val genRequest = GenerateRequestWrapper(type, barcodeTextEdit.text.toString()) - genRequest.imageFormat = BarcodeImageFormat.PNG - genRequest.imageHeight = barcodeImgView.measuredHeight.toFloat() - genRequest.imageWidth = barcodeImgView.measuredWidth.toFloat() + genRequest.barcodeImageParams = BarcodeImageParams().apply { + imageFormat = BarcodeImageFormat.PNG + imageHeight = barcodeImgView.measuredHeight.toFloat() + imageWidth = barcodeImgView.measuredWidth.toFloat() + } + + if (type == EncodeBarcodeType.QR) { + genRequest.qrParams = QrParams().apply { + qrEncodeMode = QREncodeMode.AUTO + qrErrorLevel = QRErrorLevel.LEVEL_M + qrVersion = QRVersion.AUTO + qrAspectRatio = 0.75f + } + } Thread { try { diff --git a/codegen/Templates/android/README.mustache b/codegen/Templates/android/README.mustache index 15877864..a1e20316 100644 --- a/codegen/Templates/android/README.mustache +++ b/codegen/Templates/android/README.mustache @@ -70,25 +70,31 @@ To use Aspose Barcode Cloud for Android you need to register an account with [As ## Getting Started -- Open project in Android Studio +- Open project in Android Studio. -- Go to file *app/src/main/java/com/example/asposebarcodecloud/MainActivity.kt* and set *clientId* and *clientSecret* to apropriate values from +- Go to `app/src/main/java/com/aspose/barcode/cloud/demo_app/MainActivity.kt` and set your `clientId` and `clientSecret` from . -- Build project and run application on connected device or emulator. +- Build the project and run the app on a connected device or emulator. -## Generate Code128 BbarCode in Android using Java +## Generate QR Barcode in Android using Kotlin -```java - // Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required). - ApiClient client = new ApiClient("MY_CLIENT_ID", "MY_CLIENT_SECRET"); +```kotlin +val client = ApiClient("MY_CLIENT_ID", "MY_CLIENT_SECRET") +val generateApi = GenerateApi(client) - BarcodeApi api = new BarcodeApi(client); +val request = GenerateRequestWrapper(EncodeBarcodeType.QR, "text example") +request.barcodeImageParams = BarcodeImageParams().apply { + imageFormat = BarcodeImageFormat.PNG +} +request.qrParams = QrParams().apply { + qrEncodeMode = QREncodeMode.AUTO + qrErrorLevel = QRErrorLevel.LEVEL_M + qrVersion = QRVersion.AUTO + qrAspectRatio = 0.75f +} - String type = "code128"; - String text = "text example"; - - File result = api.getBarcodeGenerate(type, text); - System.out.println(result); +val result = generateApi.generate(request) +println(result?.absolutePath) ``` ## Licensing diff --git a/codegen/Templates/android/gradlew.mustache b/codegen/Templates/android/app-build.gradle.mustache similarity index 100% rename from codegen/Templates/android/gradlew.mustache rename to codegen/Templates/android/app-build.gradle.mustache diff --git a/codegen/Templates/android/git_push.sh.mustache b/codegen/Templates/android/gradle.properties.mustache similarity index 100% rename from codegen/Templates/android/git_push.sh.mustache rename to codegen/Templates/android/gradle.properties.mustache diff --git a/codegen/Templates/android/pom.mustache b/codegen/Templates/android/settings.gradle.mustache similarity index 100% rename from codegen/Templates/android/pom.mustache rename to codegen/Templates/android/settings.gradle.mustache diff --git a/codegen/Templates/csharp/appveyor.mustache b/codegen/Templates/csharp/NetFrameworkTests.csproj.mustache similarity index 100% rename from codegen/Templates/csharp/appveyor.mustache rename to codegen/Templates/csharp/NetFrameworkTests.csproj.mustache diff --git a/codegen/Templates/csharp/api.mustache b/codegen/Templates/csharp/api.mustache index 631e0836..39550975 100644 --- a/codegen/Templates/csharp/api.mustache +++ b/codegen/Templates/csharp/api.mustache @@ -64,8 +64,14 @@ namespace {{packageName}}.Api /// /// {{summary}} {{notes}} /// - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{#allParams}} + {{^vendorExtensions.x-param-group-camel}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/vendorExtensions.x-param-group-camel}} {{/allParams}} + {{#vendorExtensions.x-param-groups}} + /// Grouped parameters of type {{type}} (optional) + {{/vendorExtensions.x-param-groups}} /// /// /// A task that represents the asynchronous operation. {{#returnType}}Task result type is {{/returnType}} @@ -73,7 +79,7 @@ namespace {{packageName}}.Api {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async {{#returnType}}Task<{{{returnType}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{nickname}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default) + public async {{#returnType}}Task<{{{returnType}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{nickname}}Async({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{type}} {{camel}} = default, {{/vendorExtensions.x-param-groups}}System.Threading.CancellationToken cancellationToken = default) { {{#allParams}}{{#required}}{{^isEnum}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) @@ -87,17 +93,22 @@ namespace {{packageName}}.Api .Replace("&", "&") .Replace("/?", "?"); {{#headerParams}} - {{#-first}}Dictionary headerParams = new Dictionary();{{/-first}} + {{#-first}} + Dictionary headerParams = new Dictionary(); + {{/-first}} {{/headerParams}} {{#formParams}} - {{#-first}}MultipartFormDataContent multipartContent = new MultipartFormDataContent();{{/-first}} + {{#-first}} + MultipartFormDataContent multipartContent = new MultipartFormDataContent(); + {{/-first}} + {{^vendorExtensions.x-param-group-camel}} {{^isEnum}} if ({{paramName}} != null) { {{/isEnum}} {{#isEnum}}{{^required}}if ({{paramName}} != null) { {{/required}}{{/isEnum}} {{#isFile}} {{^required}} if ({{paramName}} != null) - { {{/required}} + { {{/required}} multipartContent.Add(new StreamContent({{paramName}}), "{{paramName}}", "{{paramName}}.png"); {{^required}} } {{/required}} {{/isFile}} @@ -113,14 +124,25 @@ namespace {{packageName}}.Api {{/isPrimitiveType}} {{/isFile}} {{^isEnum}} } {{/isEnum}} {{#isEnum}}{{^required}} } {{/required}}{{/isEnum}} + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if ({{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}} != null) + { + multipartContent.Add(new StringContent($"{ {{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}} }"), "{{paramName}}"); + } + {{/vendorExtensions.x-param-group-camel}} {{/formParams}} {{#pathParams}} resourcePath = UrlHelper.AddPathParameter(resourcePath, "{{paramName}}", {{paramName}}); {{/pathParams}} {{#queryParams}} - {{#-first}}#pragma warning disable CS0618 // Type or member is obsolete{{/-first}} - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{paramName}}); - {{#-last}}#pragma warning restore CS0618 // Type or member is obsolete{{/-last}} + {{#-first}} + #pragma warning disable CS0618 // Type or member is obsolete + {{/-first}} + {{^vendorExtensions.x-param-group-camel}}resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{paramName}});{{/vendorExtensions.x-param-group-camel}}{{#vendorExtensions.x-param-group-camel}}resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}});{{/vendorExtensions.x-param-group-camel}} + {{#-last}} + #pragma warning restore CS0618 // Type or member is obsolete + {{/-last}} {{/queryParams}} {{#hasBodyParam}}string postBody = SerializationHelper.Serialize({{bodyParam.paramName}}); // http body (model) parameter{{/hasBodyParam}} diff --git a/codegen/Templates/csharp/api_test.mustache b/codegen/Templates/csharp/api_test.mustache index 19c8e1c3..0ef6aaf3 100644 --- a/codegen/Templates/csharp/api_test.mustache +++ b/codegen/Templates/csharp/api_test.mustache @@ -22,14 +22,17 @@ namespace {{packageName}}.Interfaces /// /// Thrown when fails to make API call {{#allParams}} - /// {{description}} + {{^vendorExtensions.x-param-group-camel}}/// {{description}}{{/vendorExtensions.x-param-group-camel}} {{/allParams}} + {{#vendorExtensions.x-param-groups}} + /// Grouped parameters of type {{type}} + {{/vendorExtensions.x-param-groups}} /// Cancellation Token to cancel the request. /// Task of {{returnType}}{{^returnType}}void{{/returnType}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}Task<{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default); + {{#returnType}}Task<{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{operationId}}Async({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{type}} {{camel}} = default, {{/vendorExtensions.x-param-groups}}System.Threading.CancellationToken cancellationToken = default); {{/operation}} } {{/operations}} diff --git a/codegen/Templates/csharp/git_push.sh.mustache b/codegen/Templates/csharp/dependency.xml.mustache similarity index 100% rename from codegen/Templates/csharp/git_push.sh.mustache rename to codegen/Templates/csharp/dependency.xml.mustache diff --git a/codegen/Templates/dart/api.mustache b/codegen/Templates/dart/api.mustache index e7ab8f94..f83f0783 100644 --- a/codegen/Templates/dart/api.mustache +++ b/codegen/Templates/dart/api.mustache @@ -22,7 +22,7 @@ class {{classname}} { {{#isDeprecated}} @deprecated {{/isDeprecated}} - {{#returnType}}Future<{{#isResponseFile}}Uint8List{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}Uint8List {{paramName}}Bytes{{/isFile}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{^isFile}}{{{dataType}}}? {{paramName}}{{/isFile}}{{#isFile}}Uint8List? {{paramName}}Bytes{{/isFile}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { + {{#returnType}}Future<{{#isResponseFile}}Uint8List{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}Uint8List {{paramName}}Bytes{{/isFile}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{^vendorExtensions.x-param-group-camel}}{{^isFile}}{{{dataType}}}? {{paramName}}{{/isFile}}{{#isFile}}Uint8List? {{paramName}}Bytes{{/isFile}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/required}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{type}}? {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}} }{{/hasOptionalParams}}) async { // ignore: prefer_final_locals Object? postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; @@ -34,6 +34,7 @@ class {{classname}} { final Map headerParams = {}; final Map formParams = {}; {{#queryParams}} + {{^vendorExtensions.x-param-group-camel}} {{^required}} if({{paramName}} != null) { {{/required}} @@ -41,6 +42,12 @@ class {{classname}} { {{^required}} } {{/required}} + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if({{vendorExtensions.x-param-group-camel}}?.{{paramName}} != null) { + queryParams.addAll(convertParametersForCollectionFormat("{{collectionFormat}}", "{{baseName}}", {{vendorExtensions.x-param-group-camel}}!.{{paramName}})); + } + {{/vendorExtensions.x-param-group-camel}} {{/queryParams}} {{#headerParams}}headerParams["{{baseName}}"] = {{paramName}}; {{/headerParams}} @@ -52,7 +59,9 @@ class {{classname}} { {{#hasFormParams}} MultipartRequestPlus mp = MultipartRequestPlus('{{httpMethod}}', Uri.parse(requestPath)); - {{#formParams}}{{^isFile}} + {{#formParams}} + {{^vendorExtensions.x-param-group-camel}} + {{^isFile}} if ({{paramName}} != null) { {{#isCollectionFormatMulti}} final List stringValues = {{paramName}}.map((i) => parameterToString(i)).toList(); @@ -62,8 +71,8 @@ class {{classname}} { mp.fields['{{baseName}}'] = [parameterToString({{paramName}})]; {{/isCollectionFormatMulti}} } - {{/isFile}}{{#isFile}} - + {{/isFile}} + {{#isFile}} {{#required}} mp.files.add(MultipartFile.fromBytes("{{paramName}}", {{paramName}}Bytes.toList(), filename: "somefile.xyz")); {{/required}} @@ -72,10 +81,16 @@ class {{classname}} { mp.files.add(MultipartFile.fromBytes("{{paramName}}", {{paramName}}Bytes.toList(), filename: "somefile.xyz")); } {{/required}} - - {{/isFile}}{{/formParams}} + {{/isFile}} + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if ({{vendorExtensions.x-param-group-camel}}?.{{paramName}} != null) { + mp.fields['{{baseName}}'] = [parameterToString({{vendorExtensions.x-param-group-camel}}!.{{paramName}})]; + } + {{/vendorExtensions.x-param-group-camel}} + {{/formParams}} postBody = mp; - + {{/hasFormParams}} final response = await _apiClient.invokeAPI(requestPath, diff --git a/codegen/Templates/go/README.mustache b/codegen/Templates/go/README.mustache index fcb18ecb..3b8d93b8 100644 --- a/codegen/Templates/go/README.mustache +++ b/codegen/Templates/go/README.mustache @@ -1,8 +1,8 @@ # Aspose.BarCode Cloud SDK for Go [![License](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-go)](LICENSE) -[![Go Report Card](https://goreportcard.com/badge/github.com/aspose-barcode-cloud/aspose-barcode-cloud-go)](https://goreportcard.com/report/github.com/aspose-barcode-cloud/aspose-barcode-cloud-go) -[![Go](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/actions/workflows/go.yml) +[![Go Reference](https://pkg.go.dev/badge/github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/v4.svg)](https://pkg.go.dev/github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/v4) +[![Go](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/actions/workflows/go.yml/badge.svg?branch=v4)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-go/actions/workflows/go.yml) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/aspose-barcode-cloud/aspose-barcode-cloud-go?label=module&sort=semver)](https://pkg.go.dev/github.com/aspose-barcode-cloud/aspose-barcode-cloud-go) - API version: {{appVersion}} diff --git a/codegen/Templates/go/api.mustache b/codegen/Templates/go/api.mustache index b8cac253..2c4d3d71 100644 --- a/codegen/Templates/go/api.mustache +++ b/codegen/Templates/go/api.mustache @@ -23,8 +23,9 @@ type {{classname}}Service service {{#hasOptionalParams}} //{{{classname}}}{{{nickname}}}Opts - Optional Parameters for {{{classname}}}{{{nickname}}} -type {{{classname}}}{{{nickname}}}Opts struct { {{#allParams}}{{^required}} -{{#isPrimitiveType}} {{vendorExtensions.x-export-param-name}} optional.{{dataType}}{{/isPrimitiveType}}{{^isPrimitiveType}} {{vendorExtensions.x-export-param-name}} optional.Interface{{/isPrimitiveType}}{{/required}}{{/allParams}} +type {{{classname}}}{{{nickname}}}Opts struct { {{#allParams}}{{^required}}{{^vendorExtensions.x-param-group-pascal}} +{{#isPrimitiveType}} {{vendorExtensions.x-export-param-name}} optional.{{dataType}}{{/isPrimitiveType}}{{^isPrimitiveType}} {{vendorExtensions.x-export-param-name}} optional.Interface{{/isPrimitiveType}}{{/vendorExtensions.x-param-group-pascal}}{{/required}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + {{pascal}} optional.Interface{{/vendorExtensions.x-param-groups}} } {{/hasOptionalParams}} @@ -108,6 +109,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} queryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/required}} {{^required}} + {{^vendorExtensions.x-param-group-pascal}} if optionals != nil && optionals.{{vendorExtensions.x-export-param-name}}.IsSet() { {{#isCollectionFormatMulti}} values := reflect.ValueOf(optionals.{{vendorExtensions.x-export-param-name}}.Value()); @@ -120,6 +122,14 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} queryParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} } + {{/vendorExtensions.x-param-group-pascal}} + {{#vendorExtensions.x-param-group-pascal}} + if optionals != nil && optionals.{{vendorExtensions.x-param-group-pascal}}.IsSet() { + if {{paramName}}Value := optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}; !reflect.ValueOf({{paramName}}Value).IsZero() { + queryParams.Add("{{baseName}}", parameterToString({{paramName}}Value, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + } + {{/vendorExtensions.x-param-group-pascal}} {{/required}} {{/queryParams}} {{/hasQueryParams}} @@ -195,6 +205,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} formParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/required}} {{^required}} + {{^vendorExtensions.x-param-group-pascal}} if optionals != nil && optionals.{{vendorExtensions.x-export-param-name}}.IsSet() { {{#isCollectionFormatMulti}} values := reflect.ValueOf(optionals.{{vendorExtensions.x-export-param-name}}.Value()); @@ -207,6 +218,14 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} formParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} } + {{/vendorExtensions.x-param-group-pascal}} + {{#vendorExtensions.x-param-group-pascal}} + if optionals != nil && optionals.{{vendorExtensions.x-param-group-pascal}}.IsSet() { + if {{paramName}}Value := optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}; !reflect.ValueOf({{paramName}}Value).IsZero() { + formParams.Add("{{baseName}}", parameterToString({{paramName}}Value, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + } + {{/vendorExtensions.x-param-group-pascal}} {{/required}} {{/isFile}} {{/formParams}} diff --git a/codegen/Templates/go/response.mustache b/codegen/Templates/go/jwt.mustache similarity index 100% rename from codegen/Templates/go/response.mustache rename to codegen/Templates/go/jwt.mustache diff --git a/codegen/Templates/go/utils.mustache b/codegen/Templates/go/utils.mustache new file mode 100644 index 00000000..11bf8e67 --- /dev/null +++ b/codegen/Templates/go/utils.mustache @@ -0,0 +1,2 @@ +{{>partial_header}} +package {{packageName}} diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index 24c62d9e..4b047688 100644 --- a/codegen/Templates/java/api.mustache +++ b/codegen/Templates/java/api.mustache @@ -82,9 +82,16 @@ public class {{classname}} { {{javaUtilPrefix}}List {{localVariablePrefix}}queryParams = new {{javaUtilPrefix}}ArrayList<>(); {{javaUtilPrefix}}List {{localVariablePrefix}}collectionQueryParams = new {{javaUtilPrefix}}ArrayList<>();{{#queryParams}} + {{^vendorExtensions.x-param-group-camel}} if (request.{{paramName}} != null) { {{localVariablePrefix}}{{#collectionFormat}}collectionQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}queryParams.addAll({{localVariablePrefix}}apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", request.{{paramName}})); } + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if (request.{{vendorExtensions.x-param-group-camel}} != null && request.{{vendorExtensions.x-param-group-camel}}.get{{nameInPascalCase}}() != null) { + {{localVariablePrefix}}{{#collectionFormat}}collectionQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}queryParams.addAll({{localVariablePrefix}}apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", request.{{vendorExtensions.x-param-group-camel}}.get{{nameInPascalCase}}())); + } + {{/vendorExtensions.x-param-group-camel}} {{/queryParams}} {{javaUtilPrefix}}Map {{localVariablePrefix}}headerParams = new {{javaUtilPrefix}}HashMap<>();{{#headerParams}} @@ -92,9 +99,16 @@ public class {{classname}} { {{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString(request.{{paramName}}));{{/headerParams}} {{javaUtilPrefix}}Map {{localVariablePrefix}}formParams = new {{javaUtilPrefix}}HashMap<>();{{#formParams}} + {{^vendorExtensions.x-param-group-camel}} if (request.{{^isModel}}{{baseName}}{{/isModel}}{{#isModel}}{{paramName}}{{/isModel}} != null) { {{localVariablePrefix}}formParams.put("{{baseName}}", request.{{^isModel}}{{baseName}}{{/isModel}}{{#isModel}}{{paramName}}{{/isModel}} ); } + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if (request.{{vendorExtensions.x-param-group-camel}} != null && request.{{vendorExtensions.x-param-group-camel}}.get{{nameInPascalCase}}() != null) { + {{localVariablePrefix}}formParams.put("{{baseName}}", request.{{vendorExtensions.x-param-group-camel}}.get{{nameInPascalCase}}()); + } + {{/vendorExtensions.x-param-group-camel}} {{/formParams}} final String[] {{localVariablePrefix}}accepts = { @@ -300,12 +314,25 @@ import java.util.List; import java.net.URI; import com.aspose.barcode.cloud.model.BarcodeImageFormat; import com.aspose.barcode.cloud.model.BarcodeImageParams; +import com.aspose.barcode.cloud.model.Code128EncodeMode; +import com.aspose.barcode.cloud.model.Code128Params; import com.aspose.barcode.cloud.model.EncodeBarcodeType; import com.aspose.barcode.cloud.model.EncodeData; import com.aspose.barcode.cloud.model.EncodeDataType; +import com.aspose.barcode.cloud.model.ECIEncodings; import com.aspose.barcode.cloud.model.GenerateParams; import com.aspose.barcode.cloud.model.DecodeBarcodeType; import com.aspose.barcode.cloud.model.GraphicsUnit; +import com.aspose.barcode.cloud.model.MacroCharacter; +import com.aspose.barcode.cloud.model.MicroQRVersion; +import com.aspose.barcode.cloud.model.Pdf417EncodeMode; +import com.aspose.barcode.cloud.model.Pdf417ErrorLevel; +import com.aspose.barcode.cloud.model.Pdf417Params; +import com.aspose.barcode.cloud.model.QREncodeMode; +import com.aspose.barcode.cloud.model.QRErrorLevel; +import com.aspose.barcode.cloud.model.QRVersion; +import com.aspose.barcode.cloud.model.QrParams; +import com.aspose.barcode.cloud.model.RectMicroQRVersion; import com.aspose.barcode.cloud.model.RecognitionMode; import com.aspose.barcode.cloud.model.TextAlignment; import com.aspose.barcode.cloud.model.RecognitionImageKind; @@ -319,11 +346,19 @@ import com.aspose.barcode.cloud.model.ScanBase64Request; */ public class {{operationIdCamelCase}}RequestWrapper { {{#allParams}} + {{^vendorExtensions.x-param-group-camel}} /** * {{{unescapedDescription}}}. */ public {{#required}}final{{/required}} {{{dataType}}} {{^isModel}}{{baseName}}{{/isModel}}{{#isModel}}{{paramName}}{{/isModel}} {{^required}}{{#defaultValue}}={{{example}}}{{/defaultValue}}{{/required}}; + {{/vendorExtensions.x-param-group-camel}} {{/allParams}} + {{#vendorExtensions.x-param-groups}} + /** + * Grouped {{type}} parameters. + */ + public {{type}} {{camel}}; + {{/vendorExtensions.x-param-groups}} {{#requiredParams.0}} /** diff --git a/codegen/Templates/java/git_push.sh.mustache b/codegen/Templates/java/dependency.xml.mustache similarity index 100% rename from codegen/Templates/java/git_push.sh.mustache rename to codegen/Templates/java/dependency.xml.mustache diff --git a/codegen/Templates/java/pojo.mustache b/codegen/Templates/java/pojo.mustache index c9ea49a9..37b5e602 100644 --- a/codegen/Templates/java/pojo.mustache +++ b/codegen/Templates/java/pojo.mustache @@ -157,7 +157,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} - public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { + public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; } {{^isReadOnly}} diff --git a/codegen/Templates/java/pom.mustache b/codegen/Templates/java/pom.mustache index a169383a..4189165d 100644 --- a/codegen/Templates/java/pom.mustache +++ b/codegen/Templates/java/pom.mustache @@ -168,17 +168,12 @@ - CLASS - - com.aspose.barcode.cloud.api.GenerateApi - com.aspose.barcode.cloud.api.RecognizeApi - com.aspose.barcode.cloud.api.ScanApi - + BUNDLE - METHOD + LINE COVEREDRATIO - 0.81 + 0.80 diff --git a/codegen/Templates/nodejs/docs/tsconfig.mustache b/codegen/Templates/nodejs/README.template.mustache similarity index 100% rename from codegen/Templates/nodejs/docs/tsconfig.mustache rename to codegen/Templates/nodejs/README.template.mustache diff --git a/codegen/Templates/nodejs/api.mustache b/codegen/Templates/nodejs/api.mustache index 04a8f308..ccac9c50 100644 --- a/codegen/Templates/nodejs/api.mustache +++ b/codegen/Templates/nodejs/api.mustache @@ -451,10 +451,18 @@ export class {{classname}} { {{/required}} {{/allParams}} {{#queryParams}} +{{^vendorExtensions.x-param-group-camel}} if (request.{{paramName}} != null) { queryParameters['{{baseName}}'] = ObjectSerializer.serialize(request.{{paramName}}, "{{{dataType}}}"); } +{{/vendorExtensions.x-param-group-camel}} +{{#vendorExtensions.x-param-group-camel}} + if (request.{{vendorExtensions.x-param-group-camel}}?.{{paramName}} != null) { + queryParameters['{{baseName}}'] = ObjectSerializer.serialize(request.{{vendorExtensions.x-param-group-camel}}.{{paramName}}, "{{{dataType}}}"); + } + +{{/vendorExtensions.x-param-group-camel}} {{/queryParams}} {{#headerParams}} headerParams['{{baseName}}'] = ObjectSerializer.serialize(request.{{paramName}}, '{{{dataType}}}'); @@ -462,6 +470,7 @@ export class {{classname}} { {{#formParams}} {{^isFile}} + {{^vendorExtensions.x-param-group-camel}} if (request.{{paramName}} != null) { {{^isListContainer}} formParams.push(['{{baseName}}', ObjectSerializer.serialize(request.{{paramName}}, {{#isString}}'string'{{/isString}}{{^isString}}'{{{dataType}}}'{{/isString}})]); @@ -472,6 +481,12 @@ export class {{classname}} { } {{/isListContainer}} } + {{/vendorExtensions.x-param-group-camel}} + {{#vendorExtensions.x-param-group-camel}} + if (request.{{vendorExtensions.x-param-group-camel}}?.{{paramName}} != null) { + formParams.push(['{{baseName}}', ObjectSerializer.serialize(request.{{vendorExtensions.x-param-group-camel}}.{{paramName}}, {{#isString}}'string'{{/isString}}{{^isString}}'{{{dataType}}}'{{/isString}})]); + } + {{/vendorExtensions.x-param-group-camel}} {{/isFile}} {{/formParams}} const requestOptions: ApiRequestOptions = { diff --git a/codegen/Templates/nodejs/docs/api.mustache b/codegen/Templates/nodejs/docs/index.md.mustache similarity index 100% rename from codegen/Templates/nodejs/docs/api.mustache rename to codegen/Templates/nodejs/docs/index.md.mustache diff --git a/codegen/Templates/nodejs/docs/git_push.sh.mustache b/codegen/Templates/nodejs/docs/models.md.mustache similarity index 100% rename from codegen/Templates/nodejs/docs/git_push.sh.mustache rename to codegen/Templates/nodejs/docs/models.md.mustache diff --git a/codegen/Templates/nodejs/git_push.sh.mustache b/codegen/Templates/nodejs/src/models.ts.mustache similarity index 88% rename from codegen/Templates/nodejs/git_push.sh.mustache rename to codegen/Templates/nodejs/src/models.ts.mustache index 787aa9f4..a74e9aee 100644 --- a/codegen/Templates/nodejs/git_push.sh.mustache +++ b/codegen/Templates/nodejs/src/models.ts.mustache @@ -57,11 +57,19 @@ export class {{classname}} { */ export class {{operationIdCamelCase}}RequestWrapper { {{#allParams}} + {{^vendorExtensions.x-param-group-camel}} /** * {{{unescapedDescription}}} */ '{{paramName}}{{#isFile}}Bytes{{/isFile}}'{{^required}}?{{/required}}: {{^isFile}}{{{dataType}}}{{/isFile}}{{#isFile}}Buffer{{/isFile}}{{#defaultValue}}={{#isString}}"{{{.}}}"{{/isString}}{{^isString}}{{{.}}}{{/isString}}{{/defaultValue}}; + {{/vendorExtensions.x-param-group-camel}} {{/allParams}} + {{#vendorExtensions.x-param-groups}} + /** + * Grouped parameters for {{pascal}}. + */ + '{{camel}}'?: {{type}}; + {{/vendorExtensions.x-param-groups}} {{#requiredParams.0}} /** diff --git a/codegen/Templates/php/api.mustache b/codegen/Templates/php/api.mustache index 8e102fa3..9d8fe387 100644 --- a/codegen/Templates/php/api.mustache +++ b/codegen/Templates/php/api.mustache @@ -333,6 +333,7 @@ use RuntimeException; } {{/collectionFormat}} {{^collectionFormat}} + {{^vendorExtensions.x-param-group-snake}} if (isset($request->{{paramName}})) { $queryParamName = lcfirst('{{baseName}}'); $queryParamValue = is_bool($request->{{paramName}}) ? ($request->{{paramName}} ? 'true' : 'false') : $request->{{paramName}}; @@ -342,6 +343,19 @@ use RuntimeException; $queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue); } } + {{/vendorExtensions.x-param-group-snake}} + {{#vendorExtensions.x-param-group-snake}} + $groupValue = $request->{{vendorExtensions.x-param-group-snake}} === null ? null : $request->{{vendorExtensions.x-param-group-snake}}['{{paramName}}']; + if (isset($groupValue)) { + $queryParamName = lcfirst('{{baseName}}'); + $queryParamValue = is_bool($groupValue) ? ($groupValue ? 'true' : 'false') : $groupValue; + if (strpos($resourcePath, '{' . $queryParamName . '}') !== false) { + $resourcePath = str_replace('{' . $queryParamName . '}', ObjectSerializer::toPathValue($queryParamValue), $resourcePath); + } else { + $queryParams[$queryParamName] = ObjectSerializer::toQueryValue($queryParamValue); + } + } + {{/vendorExtensions.x-param-group-snake}} {{/collectionFormat}} {{/queryParams}} {{#headerParams}} @@ -376,9 +390,17 @@ use RuntimeException; } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} + {{^vendorExtensions.x-param-group-snake}} if (isset($request->{{paramName}})) { $formParams['{{baseName}}'][] = ObjectSerializer::toFormValue($request->{{paramName}}); } + {{/vendorExtensions.x-param-group-snake}} + {{#vendorExtensions.x-param-group-snake}} + $groupValue = $request->{{vendorExtensions.x-param-group-snake}} === null ? null : $request->{{vendorExtensions.x-param-group-snake}}['{{paramName}}']; + if (isset($groupValue)) { + $formParams['{{baseName}}'][] = ObjectSerializer::toFormValue($groupValue); + } + {{/vendorExtensions.x-param-group-snake}} {{/isCollectionFormatMulti}} {{/isFile}} {{/formParams}} diff --git a/codegen/Templates/php/model.mustache b/codegen/Templates/php/model.mustache index c3b8aa1e..c2c8ba91 100644 --- a/codegen/Templates/php/model.mustache +++ b/codegen/Templates/php/model.mustache @@ -430,7 +430,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param string $offset Offset * * @return boolean */ @@ -442,7 +442,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets offset. * - * @param integer $offset Offset + * @param string $offset Offset * * @return mixed */ @@ -455,8 +455,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param string $offset Offset + * @param mixed $value Value to be set * * @return void */ @@ -472,7 +472,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Unsets offset. * - * @param integer $offset Offset + * @param string $offset Offset * * @return void */ diff --git a/codegen/Templates/php/requestModel.mustache b/codegen/Templates/php/requestModel.mustache index 5b3141dc..7a5ef0d0 100644 --- a/codegen/Templates/php/requestModel.mustache +++ b/codegen/Templates/php/requestModel.mustache @@ -18,6 +18,7 @@ namespace Aspose\BarCode\Requests; class {{operationId}}RequestWrapper { {{#hasParams}} + {{^vendorExtensions.x-has-param-groups}} /** * Initializes a new instance of the {{operationId}}RequestWrapper class. * @@ -41,6 +42,53 @@ class {{operationId}}RequestWrapper {{/-last}} {{/allParams}} + {{/vendorExtensions.x-has-param-groups}} + {{#vendorExtensions.x-has-param-groups}} + /** + * Initializes a new instance of the {{operationId}}RequestWrapper class. + * + {{#allParams}} + {{^vendorExtensions.x-param-group-snake}} + * @param {{^schema}}{{dataType}}{{/schema}}{{#schema}}{{dataType}}{{/schema}} ${{paramName}} {{#description}}{{{description}}}{{/description}} + {{/vendorExtensions.x-param-group-snake}} + {{/allParams}} + {{#vendorExtensions.x-param-groups}} + * @param \Aspose\BarCode\Model\{{type}} ${{snake}} Grouped parameters for {{pascal}}. + {{/vendorExtensions.x-param-groups}} + */ + public function __construct({{#allParams}}{{^vendorExtensions.x-param-group-snake}}${{paramName}}{{^required}} = null{{/required}}, {{/vendorExtensions.x-param-group-snake}}{{/allParams}}{{#vendorExtensions.x-param-groups}}${{snake}} = null{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}) + { + {{#allParams}} + {{^vendorExtensions.x-param-group-snake}} + $this->{{paramName}} = ${{paramName}}; + {{/vendorExtensions.x-param-group-snake}} + {{/allParams}} + {{#vendorExtensions.x-param-groups}} + $this->{{snake}} = ${{snake}}; + {{/vendorExtensions.x-param-groups}} + } + + {{#allParams}} + {{^vendorExtensions.x-param-group-snake}} + /** + * {{^description}}Gets or sets {{paramName}}{{/description}}{{#description}}{{{description}}}{{/description}} + */ + public ${{paramName}}; + + {{/vendorExtensions.x-param-group-snake}} + {{/allParams}} + {{#vendorExtensions.x-param-groups}} + /** + * Grouped parameters for {{pascal}}. + * + * @var \Aspose\BarCode\Model\{{type}}|null + */ + public ${{snake}}; + {{^-last}} + + {{/-last}} + {{/vendorExtensions.x-param-groups}} + {{/vendorExtensions.x-has-param-groups}} {{/hasParams}} } {{/operation}} diff --git a/codegen/Templates/python/api.mustache b/codegen/Templates/python/api.mustache index bf59d1b8..c90a5926 100644 --- a/codegen/Templates/python/api.mustache +++ b/codegen/Templates/python/api.mustache @@ -22,7 +22,7 @@ class {{classname}}(object): self.auth_settings = [{{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}}] {{#operation}} - def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{paramName}}{{^required}}={{#defaultValue}}{{#isBoolean}}None{{/isBoolean}}{{^isBoolean}}{{{example}}}{{/isBoolean}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/required}}, {{/allParams}}{{/sortParamsByRequiredFlag}}async_req=False, **kwargs): + def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{^vendorExtensions.x-param-group-snake}}{{paramName}}{{^required}}={{#defaultValue}}{{#isBoolean}}None{{/isBoolean}}{{^isBoolean}}{{{example}}}{{/isBoolean}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/required}}, {{/vendorExtensions.x-param-group-snake}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{snake}}=None, {{/vendorExtensions.x-param-groups}}{{/sortParamsByRequiredFlag}}async_req=False, **kwargs): """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} {{#notes}} @@ -39,8 +39,13 @@ class {{classname}}(object): >>> result = thread.get() {{#allParams}} +{{^vendorExtensions.x-param-group-snake}} :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}} # noqa: E501 +{{/vendorExtensions.x-param-group-snake}} {{/allParams}} +{{#vendorExtensions.x-param-groups}} + :param {{type}} {{snake}}: Grouped {{type}} parameters. # noqa: E501 +{{/vendorExtensions.x-param-groups}} :param async_req bool :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} If the method is called asynchronously, @@ -48,9 +53,9 @@ class {{classname}}(object): """ kwargs["_return_http_data_only"] = True if async_req: - return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{paramName}}{{^required}}={{paramName}}{{/required}}, {{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) + return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{^vendorExtensions.x-param-group-snake}}{{paramName}}{{^required}}={{paramName}}{{/required}}, {{/vendorExtensions.x-param-group-snake}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{snake}}={{snake}}, {{/vendorExtensions.x-param-groups}}{{/sortParamsByRequiredFlag}}**kwargs) else: - (data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{paramName}}{{^required}}={{paramName}}{{/required}}, {{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) + (data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{^vendorExtensions.x-param-group-snake}}{{paramName}}{{^required}}={{paramName}}{{/required}}, {{/vendorExtensions.x-param-group-snake}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{snake}}={{snake}}, {{/vendorExtensions.x-param-groups}}{{/sortParamsByRequiredFlag}}**kwargs) return data def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): @@ -79,7 +84,12 @@ class {{classname}}(object): returns the request thread. """ +{{#vendorExtensions.x-has-param-groups}} + all_params = { {{#allParams}}{{^vendorExtensions.x-param-group-snake}}"{{paramName}}", {{/vendorExtensions.x-param-group-snake}}{{/allParams}}{{#vendorExtensions.x-param-groups}}"{{snake}}", {{/vendorExtensions.x-param-groups}} } +{{/vendorExtensions.x-has-param-groups}} +{{^vendorExtensions.x-has-param-groups}} all_params = { {{#allParams}}"{{paramName}}"{{^-last}}, {{/-last}}{{/allParams}} } +{{/vendorExtensions.x-has-param-groups}} all_params.add("async_req") all_params.add("_return_http_data_only") all_params.add("_preload_content") @@ -97,6 +107,20 @@ class {{classname}}(object): params[key] = val del params["kwargs"] +{{#vendorExtensions.x-has-param-groups}} +{{#queryParams}} +{{#vendorExtensions.x-param-group-snake}} + if "{{vendorExtensions.x-param-group-snake}}" in params and params["{{vendorExtensions.x-param-group-snake}}"].{{paramName}} is not None: + params["{{paramName}}"] = params["{{vendorExtensions.x-param-group-snake}}"].{{paramName}} +{{/vendorExtensions.x-param-group-snake}} +{{/queryParams}} +{{#formParams}} +{{#vendorExtensions.x-param-group-snake}} + if "{{vendorExtensions.x-param-group-snake}}" in params and params["{{vendorExtensions.x-param-group-snake}}"].{{paramName}} is not None: + params["{{paramName}}"] = params["{{vendorExtensions.x-param-group-snake}}"].{{paramName}} +{{/vendorExtensions.x-param-group-snake}} +{{/formParams}} +{{/vendorExtensions.x-has-param-groups}} {{#allParams}} {{#required}} # verify the required parameter "{{paramName}}" is set diff --git a/codegen/Templates/swift/Podspec.mustache b/codegen/Templates/swift/Podspec.mustache new file mode 100644 index 00000000..81a26263 --- /dev/null +++ b/codegen/Templates/swift/Podspec.mustache @@ -0,0 +1,23 @@ +Pod::Spec.new do |s| + s.name = '{{projectName}}' + s.version = '{{packageVersion}}' + s.summary = 'Aspose.BarCode Cloud SDK for Swift' + s.description = 'Swift SDK for Aspose.BarCode Cloud barcode generation and recognition APIs.' + s.homepage = 'https://github.com/aspose-barcode-cloud/Aspose.BarCode-Cloud-SDK-for-Swift' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.authors = { 'Aspose' => 'support@aspose.cloud' } + + s.source = { + :git => 'https://github.com/aspose-barcode-cloud/Aspose.BarCode-Cloud-SDK-for-Swift.git', + :tag => "v#{s.version}" + } + + s.module_name = '{{projectName}}' + s.swift_versions = ['6.0'] + s.ios.deployment_target = '13.0' + s.osx.deployment_target = '10.15' + s.tvos.deployment_target = '13.0' + s.watchos.deployment_target = '6.0' + s.source_files = 'Sources/{{projectName}}/**/*.swift' + s.requires_arc = true +end diff --git a/codegen/Templates/swift/api.mustache b/codegen/Templates/swift/api.mustache index 9c1c78da..727d6aaf 100644 --- a/codegen/Templates/swift/api.mustache +++ b/codegen/Templates/swift/api.mustache @@ -56,8 +56,9 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - parameter completion: completion handler to receive the data and the error objects */ @@ -65,8 +66,8 @@ extension {{projectName}}API { @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} @discardableResult - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}, {{/allParams}}{{#apiStaticMethod}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, {{/apiStaticMethod}}completion: @Sendable @escaping (_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) -> RequestTask { - return {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}, {{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil, {{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, {{/apiStaticMethod}}completion: @Sendable @escaping (_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) -> RequestTask { + return {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in switch result { {{#returnType}} case let .success(response): @@ -87,15 +88,16 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - returns: Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ @available(*, deprecated, message: "{{#isDeprecated}}This operation is deprecated. | {{/isDeprecated}}NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791") - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { let deferred = Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in + {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in switch result { {{#returnType}} case let .success(response): @@ -117,17 +119,18 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - returns: Observable<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> Observable<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> Observable<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { return Observable.create { observer -> Disposable in - let requestTask = self.{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in + let requestTask = self.{{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in switch result { {{#returnType}} case let .success(response): @@ -154,16 +157,17 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - returns: AnyPublisher<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> AnyPublisher<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> { - let requestBuilder = {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> AnyPublisher<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> { + let requestBuilder = {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}) let requestTask = requestBuilder.requestTask return {{#combineDeferred}}Deferred { {{/combineDeferred}}Future<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> { promise in nonisolated(unsafe) let promise = promise @@ -197,16 +201,17 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - returns: {{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}} */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) async throws(ErrorResponse){{#returnType}} -> {{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{/returnType}} { - return try await {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute().body + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) async throws(ErrorResponse){{#returnType}} -> {{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{/returnType}} { + return try await {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute().body } {{/useAsyncAwait}} {{#useResult}} @@ -214,8 +219,9 @@ extension {{projectName}}API { /** {{#summary}} {{{.}}} -{{/summary}}{{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#apiStaticMethod}} +{{/summary}}{{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}} - parameter completion: completion handler to receive the result */ @@ -223,8 +229,8 @@ extension {{projectName}}API { @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} @discardableResult - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}, {{/allParams}}{{#apiStaticMethod}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, {{/apiStaticMethod}}completion: @Sendable @escaping (_ result: Swift.Result<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, ErrorResponse>) -> Void) -> RequestTask { - return {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}, {{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil, {{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, {{/apiStaticMethod}}completion: @Sendable @escaping (_ result: Swift.Result<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, ErrorResponse>) -> Void) -> RequestTask { + return {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in switch result { {{#returnType}} case let .success(response): @@ -260,9 +266,9 @@ extension {{projectName}}API { {{#externalDocs}} - externalDocs: {{.}} {{/externalDocs}} - {{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} + {{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{.}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}} {{#apiStaticMethod}} - parameter apiConfiguration: The configuration for the http request. {{/apiStaticMethod}} @@ -271,7 +277,7 @@ extension {{projectName}}API { {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> RequestBuilder<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}WithRequestBuilder({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> RequestBuilder<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{#-first}}var{{/-first}}{{/pathParams}} localVariablePath = "{{{path}}}"{{#pathParams}} let {{paramName}}PreEscape = "\({{#isEnum}}{{paramName}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}.rawValue{{/isContainer}}{{/isEnum}}{{^isEnum}}APIHelper.mapValueToPathItem({{paramName}}){{/isEnum}})" let {{paramName}}PostEscape = {{paramName}}PreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -289,7 +295,7 @@ extension {{projectName}}API { {{#hasFormParams}} let localVariableFormParams: [String: (any Sendable)?] = [ {{#formParams}} - {{> _param}}, + {{^vendorExtensions.x-param-group-camel}}{{> _param}},{{/vendorExtensions.x-param-group-camel}}{{#vendorExtensions.x-param-group-camel}}"{{baseName}}": {{vendorExtensions.x-param-group-camel}}?.{{paramName}}?.asParameter(codableHelper: apiConfiguration.codableHelper),{{/vendorExtensions.x-param-group-camel}} {{/formParams}} ] @@ -303,7 +309,7 @@ extension {{projectName}}API { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([{{^queryParams}}:{{/queryParams}} {{#queryParams}} - {{> _param}}, + {{^vendorExtensions.x-param-group-camel}}{{> _param}},{{/vendorExtensions.x-param-group-camel}}{{#vendorExtensions.x-param-group-camel}}"{{baseName}}": (wrappedValue: {{vendorExtensions.x-param-group-camel}}?.{{paramName}}?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: {{isExplode}}),{{/vendorExtensions.x-param-group-camel}} {{/queryParams}} ]){{/hasQueryParams}}{{^hasQueryParams}} let localVariableUrlComponents = URLComponents(string: localVariableURLString){{/hasQueryParams}} @@ -343,15 +349,15 @@ extension {{projectName}}API { {{#externalDocs}} - externalDocs: {{.}} {{/externalDocs}} - {{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{{.}}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} + {{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{{.}}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}} - returns: `EventLoopFuture` of `ClientResponse`{{#description}} {{{.}}}{{/description}} */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}Raw({{#allParams}}{{paramName}}: {{#isEnum}}{{#isArray}}[{{enumName}}_{{operationId}}]{{/isArray}}{{^isArray}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders? = nil, apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, beforeSend: @Sendable (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}Raw({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isArray}}[{{enumName}}_{{operationId}}]{{/isArray}}{{^isArray}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders? = nil, apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, beforeSend: @Sendable (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{#-first}}var{{/-first}}{{/pathParams}} localVariablePath = "{{{path}}}"{{#pathParams}} let {{paramName}}PreEscape = String(describing: {{#isEnum}}{{paramName}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}.rawValue{{/isContainer}}{{/isEnum}}{{^isEnum}}{{paramName}}{{/isEnum}}) let {{paramName}}PostEscape = {{paramName}}PreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -423,16 +429,16 @@ extension {{projectName}}API { {{#externalDocs}} - externalDocs: {{.}} {{/externalDocs}} - {{#allParams}} - - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{{.}}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} + {{#allParams}}{{^vendorExtensions.x-param-group-camel}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}){{#description}} {{{.}}}{{/description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} + - parameter {{camel}}: ({{type}}) Grouped {{camel}} parameters.{{/vendorExtensions.x-param-groups}} - returns: `EventLoopFuture` of `{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}`{{#description}} {{{.}}}{{/description}} */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isArray}}[{{enumName}}_{{operationId}}]{{/isArray}}{{^isArray}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders? = nil, apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, beforeSend: @Sendable (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}> { - return {{operationId}}Raw({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers: headers, apiConfiguration: apiConfiguration, beforeSend: beforeSend).flatMapThrowing { response -> {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} in + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isArray}}[{{enumName}}_{{operationId}}]{{/isArray}}{{^isArray}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders? = nil, apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared, beforeSend: @Sendable (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}> { + return {{operationId}}Raw({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}{{#hasParams}}, {{/hasParams}}headers: headers, apiConfiguration: apiConfiguration, beforeSend: beforeSend).flatMapThrowing { response -> {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} in switch response.status.code { {{#responses}} {{#isDefault}}default{{/isDefault}}{{^isDefault}}case {{code}}{{/isDefault}}: diff --git a/codegen/Templates/swift/api_doc.mustache b/codegen/Templates/swift/api_doc.mustache new file mode 100644 index 00000000..b0b7f70d --- /dev/null +++ b/codegen/Templates/swift/api_doc.mustache @@ -0,0 +1,143 @@ +# {{classname}}{{#description}} +{{.}}{{/description}} + +All URIs are relative to *{{{basePath}}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} +# **{{{operationId}}}** +```swift +{{^usePromiseKit}} +{{^useRxSwift}} +{{^useVapor}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}, {{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{type}}? = nil, {{/vendorExtensions.x-param-groups}}completion: @escaping (_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) +{{/useVapor}} +{{/useRxSwift}} +{{/usePromiseKit}} +{{#usePromiseKit}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> +{{/usePromiseKit}} +{{#useRxSwift}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> +{{/useRxSwift}} +{{#useVapor}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders = {{projectName}}APIConfiguration.shared.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}> +{{/useVapor}} +``` + +{{{summary}}}{{#notes}} + +{{{.}}}{{/notes}} + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import {{{projectName}}} + +{{#allParams}}{{^vendorExtensions.x-param-group-camel}}let {{paramName}} = {{{vendorExtensions.x-swift-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}let {{camel}} = {{type}}() // {{type}} (optional) +{{/vendorExtensions.x-param-groups}} + +{{^usePromiseKit}} +{{^useRxSwift}} +{{^useVapor}} +{{#summary}} +// {{{.}}} +{{/summary}} +{{classname}}.{{{operationId}}}({{#allParams}}{{^vendorExtensions.x-param-group-camel}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}}{{camel}}: {{camel}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-param-groups}}) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +{{/useVapor}} +{{/useRxSwift}} +{{/usePromiseKit}} +{{#usePromiseKit}} +{{#summary}} +// {{{.}}} +{{/summary}} +{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +{{/usePromiseKit}} +{{#useRxSwift}} +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +{{/useRxSwift}} +{{#useVapor}} +{{#summary}} +// {{{.}}} +{{/summary}} +{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).whenComplete { result in + switch result { + case .failure(let error): + // process error + case .success(let response): + switch response { + // process decoded response value or raw ClientResponse + {{#responses}} + case .http{{code}}(let value, let raw): + {{/responses}} + {{^hasDefaultResponse}} + case .http0(let value, let raw): + {{/hasDefaultResponse}} + } + } +} +{{/useVapor}} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}}{{^vendorExtensions.x-param-group-camel}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} +{{/vendorExtensions.x-param-group-camel}}{{/allParams}}{{#vendorExtensions.x-param-groups}} **{{camel}}** | [**{{type}}**]({{type}}.md) | Grouped {{camel}} parameters. | [optional] +{{/vendorExtensions.x-param-groups}} + +### Return type + +{{#useVapor}} +#### {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} + +```swift +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} { + {{#responses}} + case http{{code}}(value: {{#dataType}}{{.}}?{{/dataType}}{{^dataType}}Void?{{/dataType}}, raw: ClientResponse) + {{/responses}} + {{^hasDefaultResponse}} + case http0(value: {{#returnType}}{{.}}?{{/returnType}}{{^returnType}}Void?{{/returnType}}, raw: ClientResponse) + {{/hasDefaultResponse}} +} +``` +{{/useVapor}} +{{^useVapor}} +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}Void (empty response body){{/returnType}} +{{/useVapor}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +{{/operation}} +{{/operations}} diff --git a/codegen/Templates/swift/spi.mustache b/codegen/Templates/swift/spi.mustache new file mode 100644 index 00000000..a79d7d7f --- /dev/null +++ b/codegen/Templates/swift/spi.mustache @@ -0,0 +1,9 @@ +version: 1 +builder: + configs: + - platform: ios + - platform: macos-spm + documentation_targets: [{{projectName}}] + - platform: tvos + - platform: watchos + - platform: linux diff --git a/codegen/config-android.json b/codegen/config-android.json index 9831e8be..602ae7a4 100644 --- a/codegen/config-android.json +++ b/codegen/config-android.json @@ -4,8 +4,22 @@ "androidSdkVersion": "36", "apiPackage": "com.aspose.barcode.cloud.demo_app", "artifactId": "Android Application for Barcode Processing in the Cloud via REST API", - "artifactVersion": "26.5.0", + "artifactVersion": "26.6.0", + "files": { + "gradle.properties.mustache": { + "destinationFilename": "gradle.properties", + "templateType": "SupportingFiles" + }, + "app-build.gradle.mustache": { + "destinationFilename": "app/build.gradle", + "templateType": "SupportingFiles" + }, + "MainActivity.kt.mustache": { + "destinationFilename": "MainActivity.kt", + "templateType": "SupportingFiles" + } + }, "groupId": "com.aspose", "invokerPackage": "com.aspose.barcode.cloud.demo_app", "modelPackage": "com.aspose.barcode.cloud.demo_app.model" -} \ No newline at end of file +} diff --git a/codegen/config-dart.json b/codegen/config-dart.json index 16d44d18..b41bdc2b 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.26.5", + "pubVersion": "4.26.6", "useEnumExtension": true } \ No newline at end of file diff --git a/codegen/config-dotnet.json b/codegen/config-dotnet.json index 56fe8add..921a34dc 100644 --- a/codegen/config-dotnet.json +++ b/codegen/config-dotnet.json @@ -1,5 +1,15 @@ { + "files": { + "dependency.xml.mustache": { + "destinationFilename": "dependency.xml", + "templateType": "SupportingFiles" + }, + "NetFrameworkTests.csproj.mustache": { + "destinationFilename": "NetFrameworkTests.csproj", + "templateType": "SupportingFiles" + } + }, "packageName": "Aspose.BarCode.Cloud.Sdk", - "packageVersion": "26.5.0", + "packageVersion": "26.6.0", "targetFramework": "netstandard2.0" -} \ No newline at end of file +} diff --git a/codegen/config-go.json b/codegen/config-go.json index a1665428..5516be3c 100644 --- a/codegen/config-go.json +++ b/codegen/config-go.json @@ -1,4 +1,10 @@ { + "files": { + "jwt.mustache": { + "destinationFilename": "jwt.go", + "templateType": "SupportingFiles" + } + }, "packageName": "barcode", - "packageVersion": "4.2605.0" -} \ No newline at end of file + "packageVersion": "4.2606.0" +} diff --git a/codegen/config-java.json b/codegen/config-java.json index c8c00e9b..ea7c8b81 100644 --- a/codegen/config-java.json +++ b/codegen/config-java.json @@ -3,11 +3,17 @@ "artifactDescription": "Aspose.BarCode Cloud SDK for Java", "artifactId": "aspose-barcode-cloud", "artifactUrl": "https://www.aspose.cloud", - "artifactVersion": "26.5.0", + "artifactVersion": "26.6.0", "developerEmail": "denis.averin@aspose.com", "developerName": "Denis Averin", "developerOrganization": "Aspose", "developerOrganizationUrl": "https://www.aspose.cloud", + "files": { + "dependency.xml.mustache": { + "destinationFilename": "dependency.xml", + "templateType": "SupportingFiles" + } + }, "groupId": "com.aspose", "hideGenerationTimestamp": true, "invokerPackage": "com.aspose.barcode.cloud", @@ -17,4 +23,4 @@ "scmConnection": "scm:git:git@github.com:aspose-barcode-cloud/Aspose.BarCode-Cloud-SDK-for-Java.git", "scmDeveloperConnection": "scm:git:git@github.com:aspose-barcode-cloud/Aspose.BarCode-Cloud-SDK-for-Java.git", "scmUrl": "https://github.com/aspose-barcode-cloud/Aspose.BarCode-Cloud-SDK-for-Java" -} \ No newline at end of file +} diff --git a/codegen/config-node.json b/codegen/config-node.json index 36fb689d..c91a5fe4 100644 --- a/codegen/config-node.json +++ b/codegen/config-node.json @@ -1,5 +1,23 @@ { "npmName": "aspose-barcode-cloud-node", - "npmVersion": "26.5.0", - "supportsES6": true -} \ No newline at end of file + "npmVersion": "26.6.0", + "supportsES6": true, + "files": { + "src/models.ts.mustache": { + "destinationFilename": "src/models.ts", + "templateType": "SupportingFiles" + }, + "docs/index.md.mustache": { + "destinationFilename": "docs/index.md", + "templateType": "SupportingFiles" + }, + "docs/models.md.mustache": { + "destinationFilename": "docs/models.md", + "templateType": "SupportingFiles" + }, + "README.template.mustache": { + "destinationFilename": "README.template", + "templateType": "SupportingFiles" + } + } +} diff --git a/codegen/config-php.json b/codegen/config-php.json index ea4b55d0..3dc889fc 100644 --- a/codegen/config-php.json +++ b/codegen/config-php.json @@ -1,4 +1,4 @@ { - "artifactVersion": "26.5.0", + "artifactVersion": "26.6.0", "invokerPackage": "Aspose\\BarCode" } \ No newline at end of file diff --git a/codegen/config-python.json b/codegen/config-python.json index 0c652ba9..0d43ba62 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-SDK-for-Python", - "packageVersion": "26.5.0", + "packageVersion": "26.6.0", "projectName": "aspose-barcode-cloud" } \ No newline at end of file diff --git a/codegen/config-swift.json b/codegen/config-swift.json index c7281147..6cff1407 100644 --- a/codegen/config-swift.json +++ b/codegen/config-swift.json @@ -17,15 +17,19 @@ "BarcodeAuthInterceptor.mustache": { "destinationFilename": "Sources/AsposeBarcodeCloud/Infrastructure/BarcodeAuthInterceptor.swift", "templateType": "SupportingFiles" + }, + "spi.mustache": { + "destinationFilename": ".spi.yml", + "templateType": "SupportingFiles" } }, "hideGenerationTimestamp": true, "library": "urlsession", "mapFileBinaryToData": true, - "packageVersion": "26.5.0", + "packageVersion": "26.6.0", "projectName": "AsposeBarcodeCloud", "responseAs": "AsyncAwait,ObjcBlock", "swiftPackagePath": "Sources/AsposeBarcodeCloud", "useClasses": true, "useSPMFileStructure": true -} +} \ No newline at end of file diff --git a/codegen/generate-android.bash b/codegen/generate-android.bash index 097e761f..e5bbab2a 100755 --- a/codegen/generate-android.bash +++ b/codegen/generate-android.bash @@ -18,16 +18,16 @@ java -jar Tools/openapi-generator-cli.jar generate -i "${specSource}" -g android mv "$tempDir/README.md" "$targetDir" mv "$tempDir/.gitignore" "$targetDir" mv "$tempDir/build.gradle" "$targetDir" -mv "$tempDir/git_push.sh" "$targetDir/gradle.properties" -mv "$tempDir/pom.xml" "$targetDir/settings.gradle" -mv "$tempDir/gradlew" "$targetDir/app/build.gradle" +mv "$tempDir/gradle.properties" "$targetDir/gradle.properties" +mv "$tempDir/settings.gradle" "$targetDir/settings.gradle" +mv "$tempDir/app/build.gradle" "$targetDir/app/build.gradle" mv "$tempDir/src/main/AndroidManifest.xml" "$targetDir/app/src/main/" exampleDir="$targetDir/app/src/main/java/com/aspose/barcode/cloud/demo_app" rm -rf ${exampleDir:?}/* mkdir -p "$exampleDir" || true -mv "$tempDir/src/main/java/com/aspose/barcode/cloud/demo_app/ApiException.java" "$exampleDir/MainActivity.kt" +mv "$tempDir/MainActivity.kt" "$exampleDir/MainActivity.kt" cp ../LICENSE "$targetDir/" diff --git a/codegen/generate-dotnet.bash b/codegen/generate-dotnet.bash index 2955bc05..06f9c978 100755 --- a/codegen/generate-dotnet.bash +++ b/codegen/generate-dotnet.bash @@ -53,8 +53,8 @@ cp "$tempDir/src/Aspose.BarCode.Cloud.Sdk.Test/Aspose.BarCode.Cloud.Sdk.Test.csp cp "$tempDir/src/Aspose.BarCode.Cloud.Sdk.Test/Aspose.BarCode.Cloud.Sdk.Test.csproj" "$targetDir/examples/GenerateQR/GenerateQR.csproj" mv "$tempDir/src/Aspose.BarCode.Cloud.Sdk.Test/Aspose.BarCode.Cloud.Sdk.Test.csproj" "$targetDir/examples/ReadQR/ReadQR.csproj" -mv "$tempDir/appveyor.yml" "$targetDir/NetFrameworkTests/Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj" -mv "$tempDir/git_push.sh" "$targetDir/snippets/dependency.xml" +mv "$tempDir/NetFrameworkTests.csproj" "$targetDir/NetFrameworkTests/Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj" +mv "$tempDir/dependency.xml" "$targetDir/snippets/dependency.xml" rm -rf $tempDir pushd "$targetDir" && make after-gen && popd >/dev/null diff --git a/codegen/generate-go.bash b/codegen/generate-go.bash index 3596ff8c..76726c91 100755 --- a/codegen/generate-go.bash +++ b/codegen/generate-go.bash @@ -19,7 +19,10 @@ java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g go -t Tem rm -rf "$targetDir/barcode" mkdir -p "$targetDir/barcode/jwt" -mv "$tempDir/response.go" "$targetDir/barcode/jwt/jwt.go" +# jwt.go is emitted directly via the "files" config; drop the generator's default +# response.go so the wildcard move below doesn't pull it into the SDK. +rm -f "$tempDir/response.go" +mv "$tempDir/jwt.go" "$targetDir/barcode/jwt/jwt.go" mv $tempDir/*.go $targetDir/barcode/ diff --git a/codegen/generate-java.bash b/codegen/generate-java.bash index dd07ca69..8b746058 100755 --- a/codegen/generate-java.bash +++ b/codegen/generate-java.bash @@ -41,7 +41,7 @@ mv $tempDir/pom.xml $targetDir cp ../LICENSE $targetDir cp ../scripts/check-badges.bash "$targetDir/scripts/" -mv "$tempDir/git_push.sh" "$targetDir/snippets/dependency.xml" +mv "$tempDir/dependency.xml" "$targetDir/snippets/dependency.xml" rm -rf $tempDir diff --git a/codegen/generate-node.bash b/codegen/generate-node.bash index 0a957a06..b92f5f83 100755 --- a/codegen/generate-node.bash +++ b/codegen/generate-node.bash @@ -10,6 +10,9 @@ then rm -rf $tempDir fi +# typescript-node does not generate docs on its own, so the SDK's models.ts, +# docs and README are emitted as user-defined supporting files (see the "files" +# section in config-node.json). This keeps everything in a single generator run. # java -jar Tools/openapi-generator-cli.jar config-help -g typescript-node java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json # java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json > debugModels.ts.json; exit @@ -17,17 +20,11 @@ java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescrip # java -DdebugSupportingFiles -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json 2> debugSupportingFiles.ts.txt mv "$tempDir/api.ts" "$targetDir/src/" +mv "$tempDir/src/models.ts" "$targetDir/src/models.ts" mv "$tempDir/package.json" "$targetDir/" -mv "$tempDir/git_push.sh" "$targetDir/src/models.ts" - -# Use typescript-node one more time because typescript-node does not generate docs -java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json -#java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json > debugModels.node.json -#java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json > debugOperations.node.json - -mv "$tempDir/docs/api.ts" "$targetDir/docs/index.md" -mv "$tempDir/docs/git_push.sh" "$targetDir/docs/models.md" -mv "$tempDir/docs/tsconfig.json" "$targetDir/README.template" +mv "$tempDir/docs/index.md" "$targetDir/docs/index.md" +mv "$tempDir/docs/models.md" "$targetDir/docs/models.md" +mv "$tempDir/README.template" "$targetDir/README.template" cp ../LICENSE "$targetDir/" cp ../scripts/check-badges.bash "$targetDir/scripts/" diff --git a/codegen/generate-swift.bash b/codegen/generate-swift.bash index 296ed744..d6443b42 100755 --- a/codegen/generate-swift.bash +++ b/codegen/generate-swift.bash @@ -21,6 +21,8 @@ rm -rf "$targetDir/Sources/AsposeBarcodeCloud" mv "$tempDir/Sources/AsposeBarcodeCloud" "$targetDir/Sources/AsposeBarcodeCloud" mv "$tempDir/Package.swift" "$targetDir/Package.swift" +mv "$tempDir/AsposeBarcodeCloud.podspec" "$targetDir/AsposeBarcodeCloud.podspec" +mv "$tempDir/.spi.yml" "$targetDir/.spi.yml" mv "$tempDir/README.md" "$targetDir/README.template" rm -rf "$targetDir/docs" diff --git a/scripts/check-badges.bash b/scripts/check-badges.bash index 578d9585..a79bc397 100755 --- a/scripts/check-badges.bash +++ b/scripts/check-badges.bash @@ -16,7 +16,7 @@ pushd "${SCRIPT_DIR}/.." >/dev/null fi done -(grep -oP '[^/]+\.yml/badge.svg(?!\?branch=main)' "${readme_file}" || echo ) | while read -r badge_without_branch; do +(grep -oP '[^/]+\.yml/badge.svg(?!\?branch=(main|v4)\b)' "${readme_file}" || echo ) | while read -r badge_without_branch; do if [ -z "${badge_without_branch}" ]; then continue; fi >&2 echo "Badge without branch \"${badge_without_branch}\"" exit 1 diff --git a/scripts/check-urls.py b/scripts/check-urls.py index 0cb404d7..76b7a9be 100644 --- a/scripts/check-urls.py +++ b/scripts/check-urls.py @@ -6,9 +6,9 @@ import typing import urllib.parse +from curl_wrapper import CurlExitCodes from github_job_summary import JobSummary from subdomains import Subdomains -from curl_wrapper import CurlExitCodes from url_checker import UrlChecker """ @@ -27,16 +27,22 @@ "https://api.aspose.cloud/v4.0/": (CurlExitCodes.HTTP_RETURNED_ERROR, 404), "https://id.aspose.cloud/connect/token": (CurlExitCodes.HTTP_RETURNED_ERROR, 400), # TODO: Temporary fix - "https://dashboard.aspose.cloud/applications": (CurlExitCodes.HTTP_RETURNED_ERROR, 404), + "https://dashboard.aspose.cloud/applications": ( + CurlExitCodes.HTTP_RETURNED_ERROR, + 404, + ), } REGEX_TO_IGNORE: list[re.Pattern[str]] = [ re.compile(r"^https://github\.com/(?P[^/]+)/(?P[^/]+)/(?:blob|issues)/\S+$"), + re.compile(r"^https://github\.com/(?P[^/]+)/(?P[^/]+)/releases/tag/\S+$"), ] URLS_TO_IGNORE = frozenset( [ "https://api.aspose.cloud", + "https://api.aspose.cloud/{version}", + "https://api.aspose.cloud/v5.0", "https://www.aspose.cloud/404", "https://www.aspose.cloud/404/", ] @@ -49,6 +55,7 @@ ".curl.se", ".dart.dev", ".dartlang.org", + ".example", ".getcomposer.org", ".go.dev", ".golang.org", @@ -61,8 +68,8 @@ ".mvnrepository.com", ".nodejs.org", ".npmjs.com", - ".openapi-generator.tech", ".nuget.org", + ".openapi-generator.tech", ".opensource.org", ".packagist.org", ".php.net", diff --git a/scripts/update_swagger_spec.bash b/scripts/update_swagger_spec.bash index 99aaa1be..3d52523d 100755 --- a/scripts/update_swagger_spec.bash +++ b/scripts/update_swagger_spec.bash @@ -5,4 +5,4 @@ set -euo pipefail SWAGGER_SPEC_URL="https://api.aspose.cloud/v4.0/barcode/swagger/spec" # SWAGGER_SPEC_URL="http://localhost:47972/v4.0/barcode/swagger/spec" -curl "${SWAGGER_SPEC_URL}" > spec/aspose-barcode-cloud.json +curl "${SWAGGER_SPEC_URL}" >spec/aspose-barcode-cloud.json diff --git a/spec/aspose-barcode-cloud.json b/spec/aspose-barcode-cloud.json index 8f60ad58..1ae81a7a 100644 --- a/spec/aspose-barcode-cloud.json +++ b/spec/aspose-barcode-cloud.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.4", + "openapi": "3.1.1", "info": { "title": "Aspose.BarCode.Cloud v4.0 Specification", "description": "High quality barcodes generation and recognition API", @@ -16,7 +16,7 @@ "tags": [ "Generate" ], - "summary": "Generate barcode using GET request with parameters in route and query string.", + "summary": "Generate a barcode using a GET request with parameters in the route and query string.", "operationId": "Generate", "parameters": [ { @@ -25,6 +25,7 @@ "description": "Type of barcode to generate.", "required": true, "schema": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.generation/encodetypes/", "$ref": "#/components/schemas/EncodeBarcodeType" } }, @@ -33,13 +34,14 @@ "in": "query", "description": "Type of data to encode.\nDefault value: StringData.", "schema": { + "default": "StringData", "$ref": "#/components/schemas/EncodeDataType" } }, { "name": "data", "in": "query", - "description": "String represents data to encode", + "description": "String that represents the data to encode.", "required": true, "schema": { "type": "string" @@ -48,82 +50,359 @@ { "name": "imageFormat", "in": "query", - "description": "Barcode output image format.\nDefault value: png", + "description": "Barcode output image format.\nDefault value: png.", "schema": { + "default": "Png", "$ref": "#/components/schemas/BarcodeImageFormat" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "textLocation", "in": "query", - "description": "Specify the displaying Text Location, set to CodeLocation.None to hide CodeText.\nDefault value: Depends on BarcodeType. CodeLocation.Below for 1D Barcodes. CodeLocation.None for 2D Barcodes.", + "description": "Specify the displayed text location. Set to CodeLocation.None to hide CodeText.\nDefault value depends on BarcodeType: CodeLocation.Below for 1D barcodes and CodeLocation.None for 2D barcodes.", "schema": { "$ref": "#/components/schemas/CodeLocation" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "foregroundColor", "in": "query", - "description": "Specify the displaying bars and content Color.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: Black.", + "description": "Specify the display color for bars and content.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: Black.", "schema": { "type": "string", "default": "Black" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "backgroundColor", "in": "query", - "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: White.", + "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: White.", "schema": { "type": "string", "default": "White" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "units", "in": "query", - "description": "Common Units for all measuring in query. Default units: pixel.", + "description": "Common units for all measurements. Default units: pixels.", "schema": { "$ref": "#/components/schemas/GraphicsUnit" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "resolution", "in": "query", - "description": "Resolution of the BarCode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is dot.", + "description": "Resolution of the barcode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is a dot.", "schema": { "maximum": 100000, "minimum": 1, "type": "number", "format": "float" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "imageHeight", "in": "query", - "description": "Height of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", + "description": "Height of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", "schema": { "type": "number", "format": "float" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "imageWidth", "in": "query", - "description": "Width of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", + "description": "Width of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", "schema": { "type": "number", "format": "float" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, { "name": "rotationAngle", "in": "query", - "description": "BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", + "description": "Barcode image rotation angle, measured in degrees. For example, RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle is not equal to 90, 180, 270, or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", "schema": { "type": "integer", "format": "int32" - } + }, + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" + }, + { + "name": "qrEncodeMode", + "in": "query", + "description": "QR barcode encode mode.", + "schema": { + "$ref": "#/components/schemas/QREncodeMode" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "qrErrorLevel", + "in": "query", + "description": "QR barcode error correction level.", + "schema": { + "$ref": "#/components/schemas/QRErrorLevel" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "qrVersion", + "in": "query", + "description": "QR barcode version. Automatically selects the smallest version that fits the data.", + "schema": { + "$ref": "#/components/schemas/QRVersion" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "qrECIEncoding", + "in": "query", + "description": "ECI encoding for QR barcode data.", + "schema": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "qrAspectRatio", + "in": "query", + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "schema": { + "maximum": 1, + "minimum": 0.001, + "type": "number", + "format": "float" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "microQRVersion", + "in": "query", + "description": "MicroQR barcode version. Used when BarcodeType is MicroQR.", + "schema": { + "$ref": "#/components/schemas/MicroQRVersion" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "rectMicroQrVersion", + "in": "query", + "description": "RectMicroQR barcode version. Used when BarcodeType is RectMicroQR.", + "schema": { + "$ref": "#/components/schemas/RectMicroQRVersion" + }, + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + { + "name": "code128EncodeMode", + "in": "query", + "description": "Code128 barcode encode mode. Controls which Code 128 subset (A, B, C, or mix) is used.", + "schema": { + "$ref": "#/components/schemas/Code128EncodeMode" + }, + "x-param-group-snake": "code128_params", + "x-param-group-camel": "code128Params", + "x-param-group-pascal": "Code128Params", + "x-param-group-type": "Code128Params" + }, + { + "name": "pdf417EncodeMode", + "in": "query", + "description": "PDF417 barcode encode mode.", + "schema": { + "$ref": "#/components/schemas/Pdf417EncodeMode" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417ErrorLevel", + "in": "query", + "description": "PDF417 barcode error correction level.", + "schema": { + "$ref": "#/components/schemas/Pdf417ErrorLevel" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417Truncate", + "in": "query", + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", + "schema": { + "type": "boolean" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417Columns", + "in": "query", + "description": "Number of columns in the PDF417 barcode. Values between 1 and 30. 0 for auto.", + "schema": { + "maximum": 30, + "minimum": 0, + "type": "integer", + "format": "int32" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417Rows", + "in": "query", + "description": "Number of rows in the PDF417 barcode. Values between 3 and 90. 0 for automatic.", + "schema": { + "maximum": 90, + "minimum": 0, + "type": "integer", + "format": "int32" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417AspectRatio", + "in": "query", + "description": "PDF417 barcode aspect ratio (height/width of the barcode module). Values are defined by the standard: 2 to 5 for MicroPdf417; 3 to 5 for Pdf417 and MacroPdf417.", + "schema": { + "maximum": 10, + "minimum": 2, + "type": "number", + "format": "float" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417ECIEncoding", + "in": "query", + "description": "ECI encoding for PDF417 barcode data.", + "schema": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417IsReaderInitialization", + "in": "query", + "description": "Whether the barcode is used for reader initialization (programming).", + "schema": { + "type": "boolean" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417MacroCharacters", + "in": "query", + "description": "Macro character to prepend (structured append).", + "schema": { + "$ref": "#/components/schemas/MacroCharacter" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417IsLinked", + "in": "query", + "description": "Whether to use linked mode (for MicroPdf417).", + "schema": { + "type": "boolean" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + { + "name": "pdf417IsCode128Emulation", + "in": "query", + "description": "Whether to use Code128 emulation for MicroPdf417.", + "schema": { + "type": "boolean" + }, + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" } ], "responses": { @@ -173,11 +452,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -188,11 +469,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -203,11 +486,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -217,7 +502,34 @@ "description": "Internal Server Error" } }, - "x-binary-result": true + "x-binary-result": true, + "x-param-groups": [ + { + "camel": "barcodeImageParams", + "snake": "barcode_image_params", + "pascal": "BarcodeImageParams", + "type": "BarcodeImageParams" + }, + { + "camel": "qrParams", + "snake": "qr_params", + "pascal": "QrParams", + "type": "QrParams" + }, + { + "camel": "code128Params", + "snake": "code128_params", + "pascal": "Code128Params", + "type": "Code128Params" + }, + { + "camel": "pdf417Params", + "snake": "pdf417_params", + "pascal": "Pdf417Params", + "type": "Pdf417Params" + } + ], + "x-has-param-groups": true } }, "/barcode/generate-multipart": { @@ -225,7 +537,7 @@ "tags": [ "Generate" ], - "summary": "Generate barcode using POST request with parameters in multipart form.", + "summary": "Generate a barcode using a POST request with parameters in a multipart form.", "operationId": "GenerateMultipart", "requestBody": { "content": { @@ -238,55 +550,262 @@ "type": "object", "properties": { "barcodeType": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.generation/encodetypes/", "$ref": "#/components/schemas/EncodeBarcodeType" }, "dataType": { + "description": "Type of data to encode.\nDefault value: StringData.", + "default": "StringData", "$ref": "#/components/schemas/EncodeDataType" }, "data": { "type": "string", - "description": "String represents data to encode" + "description": "String that represents the data to encode." }, "imageFormat": { + "description": "Barcode output image format.\nDefault value: png.", + "default": "Png", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams", "$ref": "#/components/schemas/BarcodeImageFormat" }, "textLocation": { + "description": "Specify the displayed text location. Set to CodeLocation.None to hide CodeText.\nDefault value depends on BarcodeType: CodeLocation.Below for 1D barcodes and CodeLocation.None for 2D barcodes.", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams", "$ref": "#/components/schemas/CodeLocation" }, "foregroundColor": { "type": "string", - "description": "Specify the displaying bars and content Color.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: Black.", - "default": "Black" + "description": "Specify the display color for bars and content.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: Black.", + "default": "Black", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, "backgroundColor": { "type": "string", - "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: White.", - "default": "White" + "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: White.", + "default": "White", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, "units": { + "description": "Common units for all measurements. Default units: pixels.", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams", "$ref": "#/components/schemas/GraphicsUnit" }, "resolution": { "maximum": 100000, "minimum": 1, "type": "number", - "description": "Resolution of the BarCode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is dot.", - "format": "float" + "description": "Resolution of the barcode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is a dot.", + "format": "float", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, "imageHeight": { "type": "number", - "description": "Height of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", - "format": "float" + "description": "Height of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", + "format": "float", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, "imageWidth": { "type": "number", - "description": "Width of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", - "format": "float" + "description": "Width of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", + "format": "float", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" }, "rotationAngle": { "type": "integer", - "description": "BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", - "format": "int32" + "description": "Barcode image rotation angle, measured in degrees. For example, RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle is not equal to 90, 180, 270, or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", + "format": "int32", + "x-param-group-snake": "barcode_image_params", + "x-param-group-camel": "barcodeImageParams", + "x-param-group-pascal": "BarcodeImageParams", + "x-param-group-type": "BarcodeImageParams" + }, + "qrEncodeMode": { + "description": "QR barcode encode mode.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/QREncodeMode" + }, + "qrErrorLevel": { + "description": "QR barcode error correction level.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/QRErrorLevel" + }, + "qrVersion": { + "description": "QR barcode version. Automatically selects the smallest version that fits the data.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/QRVersion" + }, + "qrECIEncoding": { + "description": "ECI encoding for QR barcode data.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/ECIEncodings" + }, + "qrAspectRatio": { + "maximum": 1, + "minimum": 0.001, + "type": "number", + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "format": "float", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams" + }, + "microQRVersion": { + "description": "MicroQR barcode version. Used when BarcodeType is MicroQR.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/MicroQRVersion" + }, + "rectMicroQrVersion": { + "description": "RectMicroQR barcode version. Used when BarcodeType is RectMicroQR.", + "x-param-group-snake": "qr_params", + "x-param-group-camel": "qrParams", + "x-param-group-pascal": "QrParams", + "x-param-group-type": "QrParams", + "$ref": "#/components/schemas/RectMicroQRVersion" + }, + "code128EncodeMode": { + "description": "Code128 barcode encode mode. Controls which Code 128 subset (A, B, C, or mix) is used.", + "x-param-group-snake": "code128_params", + "x-param-group-camel": "code128Params", + "x-param-group-pascal": "Code128Params", + "x-param-group-type": "Code128Params", + "$ref": "#/components/schemas/Code128EncodeMode" + }, + "pdf417EncodeMode": { + "description": "PDF417 barcode encode mode.", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params", + "$ref": "#/components/schemas/Pdf417EncodeMode" + }, + "pdf417ErrorLevel": { + "description": "PDF417 barcode error correction level.", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params", + "$ref": "#/components/schemas/Pdf417ErrorLevel" + }, + "pdf417Truncate": { + "type": "boolean", + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417Columns": { + "maximum": 30, + "minimum": 0, + "type": "integer", + "description": "Number of columns in the PDF417 barcode. Values between 1 and 30. 0 for auto.", + "format": "int32", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417Rows": { + "maximum": 90, + "minimum": 0, + "type": "integer", + "description": "Number of rows in the PDF417 barcode. Values between 3 and 90. 0 for automatic.", + "format": "int32", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417AspectRatio": { + "maximum": 10, + "minimum": 2, + "type": "number", + "description": "PDF417 barcode aspect ratio (height/width of the barcode module). Values are defined by the standard: 2 to 5 for MicroPdf417; 3 to 5 for Pdf417 and MacroPdf417.", + "format": "float", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417ECIEncoding": { + "description": "ECI encoding for PDF417 barcode data.", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params", + "$ref": "#/components/schemas/ECIEncodings" + }, + "pdf417IsReaderInitialization": { + "type": "boolean", + "description": "Whether the barcode is used for reader initialization (programming).", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417MacroCharacters": { + "description": "Macro character to prepend (structured append).", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params", + "$ref": "#/components/schemas/MacroCharacter" + }, + "pdf417IsLinked": { + "type": "boolean", + "description": "Whether to use linked mode (for MicroPdf417).", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" + }, + "pdf417IsCode128Emulation": { + "type": "boolean", + "description": "Whether to use Code128 emulation for MicroPdf417.", + "x-param-group-snake": "pdf417_params", + "x-param-group-camel": "pdf417Params", + "x-param-group-pascal": "Pdf417Params", + "x-param-group-type": "Pdf417Params" } } }, @@ -326,6 +845,63 @@ }, "rotationAngle": { "style": "form" + }, + "qrEncodeMode": { + "style": "form" + }, + "qrErrorLevel": { + "style": "form" + }, + "qrVersion": { + "style": "form" + }, + "qrECIEncoding": { + "style": "form" + }, + "qrAspectRatio": { + "style": "form" + }, + "microQRVersion": { + "style": "form" + }, + "rectMicroQrVersion": { + "style": "form" + }, + "code128EncodeMode": { + "style": "form" + }, + "pdf417EncodeMode": { + "style": "form" + }, + "pdf417ErrorLevel": { + "style": "form" + }, + "pdf417Truncate": { + "style": "form" + }, + "pdf417Columns": { + "style": "form" + }, + "pdf417Rows": { + "style": "form" + }, + "pdf417AspectRatio": { + "style": "form" + }, + "pdf417ECIEncoding": { + "style": "form" + }, + "pdf417IsReaderInitialization": { + "style": "form" + }, + "pdf417MacroCharacters": { + "style": "form" + }, + "pdf417IsLinked": { + "style": "form" + }, + "pdf417IsCode128Emulation": { + "style": "form" } } } @@ -378,11 +954,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -393,11 +971,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -408,11 +988,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -422,7 +1004,34 @@ "description": "Internal Server Error" } }, - "x-binary-result": true + "x-binary-result": true, + "x-param-groups": [ + { + "camel": "barcodeImageParams", + "snake": "barcode_image_params", + "pascal": "BarcodeImageParams", + "type": "BarcodeImageParams" + }, + { + "camel": "qrParams", + "snake": "qr_params", + "pascal": "QrParams", + "type": "QrParams" + }, + { + "camel": "code128Params", + "snake": "code128_params", + "pascal": "Code128Params", + "type": "Code128Params" + }, + { + "camel": "pdf417Params", + "snake": "pdf417_params", + "pascal": "Pdf417Params", + "type": "Pdf417Params" + } + ], + "x-has-param-groups": true } }, "/barcode/generate-body": { @@ -430,18 +1039,20 @@ "tags": [ "Generate" ], - "summary": "Generate barcode using POST request with parameters in body in json or xml format.", + "summary": "Generate a barcode using a POST request with parameters in the request body in JSON or XML format.", "operationId": "GenerateBody", "requestBody": { - "description": "Parameters of generation", + "description": "Generation parameters.", "content": { "application/json": { "schema": { + "description": "Barcode generation parameters.", "$ref": "#/components/schemas/GenerateParams" } }, "application/xml": { "schema": { + "description": "Barcode generation parameters.", "$ref": "#/components/schemas/GenerateParams" } } @@ -495,11 +1106,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -510,11 +1123,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -525,11 +1140,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -547,22 +1164,23 @@ "tags": [ "Recognize" ], - "summary": "Recognize barcode from file on server in the Internet using GET requests with parameter in query string.\nFor recognizing files from your hard drive use `recognize-body` or `recognize-multipart` endpoints instead.", + "summary": "Recognize a barcode from a file on an Internet server using a GET request with a query string parameter.\nFor recognizing files from your hard drive, use `recognize-body` or `recognize-multipart` endpoints instead.", "operationId": "Recognize", "parameters": [ { "name": "barcodeType", "in": "query", - "description": "Type of barcode to recognize", + "description": "Type of barcode to recognize.", "required": true, "schema": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "$ref": "#/components/schemas/DecodeBarcodeType" } }, { "name": "fileUrl", "in": "query", - "description": "Url to barcode image", + "description": "URL to the barcode image.", "required": true, "schema": { "type": "string", @@ -572,16 +1190,18 @@ { "name": "recognitionMode", "in": "query", - "description": "Recognition mode", + "description": "Recognition mode.", "schema": { + "description": "Recognition mode.", "$ref": "#/components/schemas/RecognitionMode" } }, { "name": "recognitionImageKind", "in": "query", - "description": "Image kind for recognition", + "description": "Image kind for recognition.", "schema": { + "description": "Kind of image to recognize", "$ref": "#/components/schemas/RecognitionImageKind" } } @@ -592,11 +1212,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -607,11 +1229,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -622,11 +1246,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -637,11 +1263,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -658,18 +1286,20 @@ "tags": [ "Recognize" ], - "summary": "Recognize barcode from file in request body using POST requests with parameters in body in json or xml format.", + "summary": "Recognize a barcode from a file in the request body using a POST request with JSON or XML body parameters.", "operationId": "RecognizeBase64", "requestBody": { - "description": "Barcode recognition request", + "description": "Barcode recognition request.", "content": { "application/json": { "schema": { + "description": "Barcode recognition request.", "$ref": "#/components/schemas/RecognizeBase64Request" } }, "application/xml": { "schema": { + "description": "Barcode recognition request.", "$ref": "#/components/schemas/RecognizeBase64Request" } } @@ -682,11 +1312,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -697,11 +1329,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -712,11 +1346,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -727,11 +1363,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -748,7 +1386,7 @@ "tags": [ "Recognize" ], - "summary": "Recognize barcode from file in request body using POST requests with parameters in multipart form.", + "summary": "Recognize a barcode from a file in the request body using a POST request with multipart form parameters.", "operationId": "RecognizeMultipart", "requestBody": { "content": { @@ -761,17 +1399,20 @@ "type": "object", "properties": { "barcodeType": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "$ref": "#/components/schemas/DecodeBarcodeType" }, "file": { "type": "string", - "description": "Barcode image file", + "description": "Barcode image file.", "format": "binary" }, "recognitionMode": { + "description": "Recognition mode.", "$ref": "#/components/schemas/RecognitionMode" }, "recognitionImageKind": { + "description": "Image kind for recognition.", "$ref": "#/components/schemas/RecognitionImageKind" } } @@ -799,11 +1440,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -814,11 +1457,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -829,11 +1474,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -844,11 +1491,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -865,13 +1514,13 @@ "tags": [ "Scan" ], - "summary": "Scan barcode from file on server in the Internet using GET requests with parameter in query string.\nFor scaning files from your hard drive use `scan-body` or `scan-multipart` endpoints instead.", + "summary": "Scan a barcode from a file on an Internet server using a GET request with a query string parameter.\nFor scanning files from your hard drive, use `scan-body` or `scan-multipart` endpoints instead.", "operationId": "Scan", "parameters": [ { "name": "fileUrl", "in": "query", - "description": "Url to barcode image", + "description": "URL to the barcode image.", "required": true, "schema": { "type": "string", @@ -885,11 +1534,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -900,11 +1551,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -915,11 +1568,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -930,11 +1585,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -951,18 +1608,20 @@ "tags": [ "Scan" ], - "summary": "Scan barcode from file in request body using POST requests with parameter in body in json or xml format.", + "summary": "Scan a barcode from a file in the request body using a POST request with a JSON or XML body parameter.", "operationId": "ScanBase64", "requestBody": { - "description": "Barcode scan request", + "description": "Barcode scan request.", "content": { "application/json": { "schema": { + "description": "Scan barcode request.", "$ref": "#/components/schemas/ScanBase64Request" } }, "application/xml": { "schema": { + "description": "Scan barcode request.", "$ref": "#/components/schemas/ScanBase64Request" } } @@ -975,11 +1634,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -990,11 +1651,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1005,11 +1668,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1020,11 +1685,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1041,7 +1708,7 @@ "tags": [ "Scan" ], - "summary": "Scan barcode from file in request body using POST requests with parameter in multipart form.", + "summary": "Scan a barcode from a file in the request body using a POST request with a multipart form parameter.", "operationId": "ScanMultipart", "requestBody": { "content": { @@ -1054,7 +1721,7 @@ "properties": { "file": { "type": "string", - "description": "Barcode image file", + "description": "Barcode image file.", "format": "binary" } } @@ -1073,11 +1740,13 @@ "content": { "application/json": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } }, "application/xml": { "schema": { + "description": "Represents information about a barcode list.", "$ref": "#/components/schemas/BarcodeResponseList" } } @@ -1088,11 +1757,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1103,11 +1774,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1118,11 +1791,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1145,39 +1820,48 @@ "type": "object", "properties": { "code": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Gets or sets api error code.", - "nullable": true, "xml": { "name": "Code" } }, "message": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Gets or sets error message.", - "nullable": true, "xml": { "name": "Message" } }, "description": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Gets or sets error description.", - "nullable": true, "xml": { "name": "Description" } }, "dateTime": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Gets or sets server datetime.", "format": "date-time", - "nullable": true, "xml": { "name": "DateTime" } }, "innerError": { + "description": "Gets or sets inner error.", "$ref": "#/components/schemas/ApiError" } }, @@ -1195,14 +1879,17 @@ "type": "object", "properties": { "requestId": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Gets or sets request Id.", - "nullable": true, "xml": { "name": "RequestId" } }, "error": { + "description": "Gets or sets error.", "$ref": "#/components/schemas/ApiError" } }, @@ -1230,76 +1917,92 @@ "type": "object", "properties": { "imageFormat": { + "description": "Barcode output image format.\nDefault value: png.", + "default": "Png", "$ref": "#/components/schemas/BarcodeImageFormat" }, "textLocation": { + "description": "Specify the displayed text location. Set to CodeLocation.None to hide CodeText.\nDefault value depends on BarcodeType: CodeLocation.Below for 1D barcodes and CodeLocation.None for 2D barcodes.", "$ref": "#/components/schemas/CodeLocation" }, "foregroundColor": { - "type": "string", - "description": "Specify the displaying bars and content Color.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: Black.", + "type": [ + "null", + "string" + ], + "description": "Specify the display color for bars and content.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: Black.", "default": "Black", - "nullable": true, "xml": { "name": "ForegroundColor" } }, "backgroundColor": { - "type": "string", - "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #.\nFor example: AliceBlue or #FF000000\nDefault value: White.", + "type": [ + "null", + "string" + ], + "description": "Background color of the barcode image.\nValue: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: White.", "default": "White", - "nullable": true, "xml": { "name": "BackgroundColor" } }, "units": { + "description": "Common units for all measurements. Default units: pixels.", "$ref": "#/components/schemas/GraphicsUnit" }, "resolution": { "maximum": 100000, "minimum": 1, - "type": "number", - "description": "Resolution of the BarCode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is dot.", + "type": [ + "null", + "number" + ], + "description": "Resolution of the barcode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is a dot.", "format": "float", - "nullable": true, "xml": { "name": "Resolution" }, "example": 96 }, "imageHeight": { - "type": "number", - "description": "Height of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", + "type": [ + "null", + "number" + ], + "description": "Height of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", "format": "float", - "nullable": true, "xml": { "name": "ImageHeight" }, "example": 200 }, "imageWidth": { - "type": "number", - "description": "Width of the barcode image in given units. Default units: pixel.\nDecimal separator is dot.", + "type": [ + "null", + "number" + ], + "description": "Width of the barcode image in the specified units. Default units: pixels.\nDecimal separator is a dot.", "format": "float", - "nullable": true, "xml": { "name": "ImageWidth" }, "example": 200 }, "rotationAngle": { - "type": "integer", - "description": "BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", + "type": [ + "null", + "integer" + ], + "description": "Barcode image rotation angle, measured in degrees. For example, RotationAngle = 0 or RotationAngle = 360 means no rotation.\nIf RotationAngle is not equal to 90, 180, 270, or 0, it may increase the difficulty for the scanner to read the image.\nDefault value: 0.", "format": "int32", - "nullable": true, "xml": { "name": "RotationAngle" } } }, "additionalProperties": false, - "description": "Barcode image optional parameters", + "description": "Optional barcode image parameters.", "xml": { "name": "BarcodeImageParams" } @@ -1308,44 +2011,53 @@ "type": "object", "properties": { "barcodeValue": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Barcode data.", - "nullable": true, "xml": { "name": "BarcodeValue" } }, "type": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Type of the barcode.", - "nullable": true, "xml": { "name": "Type" } }, "region": { - "type": "array", + "type": [ + "null", + "array" + ], "items": { + "description": "Wrapper around Drawing.Point for proper specification.", "$ref": "#/components/schemas/RegionPoint" }, - "description": "Region with barcode.", - "nullable": true, + "description": "Region with the barcode.", "xml": { "name": "Region", "wrapped": true } }, "checksum": { - "type": "string", - "description": "Checksum of barcode.", - "nullable": true, + "type": [ + "null", + "string" + ], + "description": "Checksum of the barcode.", "xml": { "name": "Checksum" } } }, "additionalProperties": false, - "description": "Represents information about barcode.", + "description": "Represents information about a barcode.", "xml": { "name": "BarcodeResponse" } @@ -1357,12 +2069,15 @@ "type": "object", "properties": { "barcodes": { - "type": "array", + "type": [ + "null", + "array" + ], "items": { + "description": "Represents information about a barcode.", "$ref": "#/components/schemas/BarcodeResponse" }, - "description": "List of barcodes which are present in image.", - "nullable": true, + "description": "List of barcodes that are present in the image.", "xml": { "name": "Barcodes", "wrapped": true @@ -1370,11 +2085,41 @@ } }, "additionalProperties": false, - "description": "Represents information about barcode list.", + "description": "Represents information about a barcode list.", "xml": { "name": "BarcodeResponseList" } }, + "Code128EncodeMode": { + "enum": [ + "Auto", + "CodeA", + "CodeB", + "CodeAB", + "CodeC", + "CodeAC", + "CodeBC" + ], + "type": "string", + "description": "Code128 barcode encode mode. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/code128encodemode/", + "xml": { + "name": "Code128EncodeMode" + } + }, + "Code128Params": { + "type": "object", + "properties": { + "code128EncodeMode": { + "description": "Code128 barcode encode mode. Controls which Code 128 subset (A, B, C, or mix) is used.", + "$ref": "#/components/schemas/Code128EncodeMode" + } + }, + "additionalProperties": false, + "description": "Optional Code128 barcode generation parameters.", + "xml": { + "name": "Code128Params" + } + }, "CodeLocation": { "enum": [ "Below", @@ -1474,11 +2219,54 @@ "VIN" ], "type": "string", - "description": "See Aspose.BarCode.BarCodeRecognition.DecodeType", + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "xml": { "name": "DecodeBarcodeType" } }, + "ECIEncodings": { + "enum": [ + "NONE", + "ISO_8859_1", + "ISO_8859_2", + "ISO_8859_3", + "ISO_8859_4", + "ISO_8859_5", + "ISO_8859_6", + "ISO_8859_7", + "ISO_8859_8", + "ISO_8859_9", + "ISO_8859_10", + "ISO_8859_11", + "ISO_8859_13", + "ISO_8859_14", + "ISO_8859_15", + "ISO_8859_16", + "Shift_JIS", + "Win1250", + "Win1251", + "Win1252", + "Win1256", + "UTF16BE", + "UTF8", + "US_ASCII", + "Big5", + "GB2312", + "EUC_KR", + "GBK", + "GB18030", + "UTF16LE", + "UTF32BE", + "UTF32LE", + "INVARIANT", + "BINARY" + ], + "type": "string", + "description": "ECI encoding identifiers. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/eciencodings/", + "xml": { + "name": "ECIEncodings" + } + }, "EncodeBarcodeType": { "enum": [ "QR", @@ -1556,7 +2344,7 @@ "VIN" ], "type": "string", - "description": "See Aspose.BarCode.Generation.EncodeTypes", + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.generation/encodetypes/", "xml": { "name": "BarcodeType" } @@ -1568,19 +2356,21 @@ "type": "object", "properties": { "dataType": { + "description": "Type of data to encode.\nDefault value: StringData.", + "default": "StringData", "$ref": "#/components/schemas/EncodeDataType" }, "data": { "minLength": 1, "type": "string", - "description": "String represents data to encode", + "description": "String that represents the data to encode.", "xml": { "name": "Data" } } }, "additionalProperties": false, - "description": "Data to encode in barcode", + "description": "Data to encode in a barcode.", "xml": { "name": "EncodeData" } @@ -1592,7 +2382,7 @@ "HexBytes" ], "type": "string", - "description": "Types of data can be encoded to barcode", + "description": "Types of data that can be encoded into a barcode.", "xml": { "name": "DataType" } @@ -1605,17 +2395,32 @@ "type": "object", "properties": { "barcodeType": { + "description": "Barcode type.", "$ref": "#/components/schemas/EncodeBarcodeType" }, "encodeData": { + "description": "Data to encode into a barcode.", "$ref": "#/components/schemas/EncodeData" }, "barcodeImageParams": { + "description": "Optional barcode image parameters.", "$ref": "#/components/schemas/BarcodeImageParams" + }, + "qrParams": { + "description": "Optional QR barcode generation parameters.", + "$ref": "#/components/schemas/QrParams" + }, + "code128Params": { + "description": "Optional Code128 barcode generation parameters.", + "$ref": "#/components/schemas/Code128Params" + }, + "pdf417Params": { + "description": "Optional PDF417 barcode generation parameters.", + "$ref": "#/components/schemas/Pdf417Params" } }, "additionalProperties": false, - "description": "Barcode generation parameters", + "description": "Barcode generation parameters.", "xml": { "name": "GenerateParams" } @@ -1628,11 +2433,296 @@ "Millimeter" ], "type": "string", - "description": "Subset of Aspose.Drawing.GraphicsUnit.", + "description": "Subset of https://reference.aspose.com/drawing/net/system.drawing/graphicsunit/", "xml": { "name": "Units" } }, + "MacroCharacter": { + "enum": [ + "None", + "Macro05", + "Macro06" + ], + "type": "string", + "description": "PDF417 macro character mode. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/macrocharacter/", + "xml": { + "name": "MacroCharacter" + } + }, + "MicroQRVersion": { + "enum": [ + "Auto", + "M1", + "M2", + "M3", + "M4" + ], + "type": "string", + "description": "MicroQR barcode version. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/microqrversion/", + "xml": { + "name": "MicroQRVersion" + } + }, + "Pdf417EncodeMode": { + "enum": [ + "Auto", + "Binary", + "ECI", + "Extended" + ], + "type": "string", + "description": "PDF417 barcode encode mode. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/pdf417encodemode/", + "xml": { + "name": "Pdf417EncodeMode" + } + }, + "Pdf417ErrorLevel": { + "enum": [ + "Level0", + "Level1", + "Level2", + "Level3", + "Level4", + "Level5", + "Level6", + "Level7", + "Level8" + ], + "type": "string", + "description": "PDF417 barcode error correction level. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/pdf417errorlevel/", + "xml": { + "name": "Pdf417ErrorLevel" + } + }, + "Pdf417Params": { + "type": "object", + "properties": { + "pdf417EncodeMode": { + "description": "PDF417 barcode encode mode.", + "$ref": "#/components/schemas/Pdf417EncodeMode" + }, + "pdf417ErrorLevel": { + "description": "PDF417 barcode error correction level.", + "$ref": "#/components/schemas/Pdf417ErrorLevel" + }, + "pdf417Truncate": { + "type": [ + "null", + "boolean" + ], + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", + "xml": { + "name": "Pdf417Truncate" + } + }, + "pdf417Columns": { + "maximum": 30, + "minimum": 0, + "type": [ + "null", + "integer" + ], + "description": "Number of columns in the PDF417 barcode. Values between 1 and 30. 0 for auto.", + "format": "int32", + "xml": { + "name": "Pdf417Columns" + } + }, + "pdf417Rows": { + "maximum": 90, + "minimum": 0, + "type": [ + "null", + "integer" + ], + "description": "Number of rows in the PDF417 barcode. Values between 3 and 90. 0 for automatic.", + "format": "int32", + "xml": { + "name": "Pdf417Rows" + } + }, + "pdf417AspectRatio": { + "maximum": 10, + "minimum": 2, + "type": [ + "null", + "number" + ], + "description": "PDF417 barcode aspect ratio (height/width of the barcode module). Values are defined by the standard: 2 to 5 for MicroPdf417; 3 to 5 for Pdf417 and MacroPdf417.", + "format": "float", + "xml": { + "name": "Pdf417AspectRatio" + } + }, + "pdf417ECIEncoding": { + "description": "ECI encoding for PDF417 barcode data.", + "$ref": "#/components/schemas/ECIEncodings" + }, + "pdf417IsReaderInitialization": { + "type": [ + "null", + "boolean" + ], + "description": "Whether the barcode is used for reader initialization (programming).", + "xml": { + "name": "Pdf417IsReaderInitialization" + } + }, + "pdf417MacroCharacters": { + "description": "Macro character to prepend (structured append).", + "$ref": "#/components/schemas/MacroCharacter" + }, + "pdf417IsLinked": { + "type": [ + "null", + "boolean" + ], + "description": "Whether to use linked mode (for MicroPdf417).", + "xml": { + "name": "Pdf417IsLinked" + } + }, + "pdf417IsCode128Emulation": { + "type": [ + "null", + "boolean" + ], + "description": "Whether to use Code128 emulation for MicroPdf417.", + "xml": { + "name": "Pdf417IsCode128Emulation" + } + } + }, + "additionalProperties": false, + "description": "Optional PDF417 barcode generation parameters. Applies to Pdf417, MacroPdf417, MicroPdf417, and GS1MicroPdf417 barcode types.", + "xml": { + "name": "Pdf417Params" + } + }, + "QREncodeMode": { + "enum": [ + "Auto", + "Extended", + "Binary", + "ECI" + ], + "type": "string", + "description": "QR barcode encode mode. Subset of https://reference.aspose.com/barcode/net/aspose.barcode.generation/qrencodemode/\nObsolete members (Bytes, Utf8BOM, Utf16BEBOM, ECIEncoding, ExtendedCodetext) are omitted.", + "xml": { + "name": "QREncodeMode" + } + }, + "QRErrorLevel": { + "enum": [ + "LevelL", + "LevelM", + "LevelQ", + "LevelH" + ], + "type": "string", + "description": "QR barcode error correction level. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/qrerrorlevel/", + "xml": { + "name": "QRErrorLevel" + } + }, + "QRVersion": { + "enum": [ + "Auto", + "Version01", + "Version02", + "Version03", + "Version04", + "Version05", + "Version06", + "Version07", + "Version08", + "Version09", + "Version10", + "Version11", + "Version12", + "Version13", + "Version14", + "Version15", + "Version16", + "Version17", + "Version18", + "Version19", + "Version20", + "Version21", + "Version22", + "Version23", + "Version24", + "Version25", + "Version26", + "Version27", + "Version28", + "Version29", + "Version30", + "Version31", + "Version32", + "Version33", + "Version34", + "Version35", + "Version36", + "Version37", + "Version38", + "Version39", + "Version40" + ], + "type": "string", + "description": "QR barcode version. Subset of https://reference.aspose.com/barcode/net/aspose.barcode.generation/qrversion/\nMicroQR versions (VersionM1–VersionM4) are omitted; use Aspose.BarCode.Cloud.DTO.Enums.MicroQRVersion instead.", + "xml": { + "name": "QRVersion" + } + }, + "QrParams": { + "type": "object", + "properties": { + "qrEncodeMode": { + "description": "QR barcode encode mode.", + "$ref": "#/components/schemas/QREncodeMode" + }, + "qrErrorLevel": { + "description": "QR barcode error correction level.", + "$ref": "#/components/schemas/QRErrorLevel" + }, + "qrVersion": { + "description": "QR barcode version. Automatically selects the smallest version that fits the data.", + "$ref": "#/components/schemas/QRVersion" + }, + "qrECIEncoding": { + "description": "ECI encoding for QR barcode data.", + "$ref": "#/components/schemas/ECIEncodings" + }, + "qrAspectRatio": { + "maximum": 1, + "minimum": 0.001, + "type": [ + "null", + "number" + ], + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "format": "float", + "xml": { + "name": "QrAspectRatio" + } + }, + "microQRVersion": { + "description": "MicroQR barcode version. Used when BarcodeType is MicroQR.", + "$ref": "#/components/schemas/MicroQRVersion" + }, + "rectMicroQrVersion": { + "description": "RectMicroQR barcode version. Used when BarcodeType is RectMicroQR.", + "$ref": "#/components/schemas/RectMicroQRVersion" + } + }, + "additionalProperties": false, + "description": "Optional QR barcode generation parameters. Applies to QR, GS1QR, MicroQR, and RectMicroQR barcode types.", + "xml": { + "name": "QrParams" + } + }, "RecognitionImageKind": { "enum": [ "Photo", @@ -1667,9 +2757,10 @@ "barcodeTypes": { "type": "array", "items": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "$ref": "#/components/schemas/DecodeBarcodeType" }, - "description": "Array of decode types to find on barcode", + "description": "Array of barcode decode types to find.", "xml": { "name": "BarcodeTypes", "wrapped": true @@ -1685,18 +2776,62 @@ } }, "recognitionMode": { + "description": "Barcode recognition mode.", "$ref": "#/components/schemas/RecognitionMode" }, "recognitionImageKind": { + "description": "Image kind for recognition.", "$ref": "#/components/schemas/RecognitionImageKind" } }, "additionalProperties": false, - "description": "Barcode recognize request", + "description": "Barcode recognition request.", "xml": { "name": "RecognizeBase64Request" } }, + "RectMicroQRVersion": { + "enum": [ + "Auto", + "R7x43", + "R7x59", + "R7x77", + "R7x99", + "R7x139", + "R9x43", + "R9x59", + "R9x77", + "R9x99", + "R9x139", + "R11x27", + "R11x43", + "R11x59", + "R11x77", + "R11x99", + "R11x139", + "R13x27", + "R13x43", + "R13x59", + "R13x77", + "R13x99", + "R13x139", + "R15x43", + "R15x59", + "R15x77", + "R15x99", + "R15x139", + "R17x43", + "R17x59", + "R17x77", + "R17x99", + "R17x139" + ], + "type": "string", + "description": "RectMicroQR barcode version. Mirrors https://reference.aspose.com/barcode/net/aspose.barcode.generation/rectmicroqrversion/", + "xml": { + "name": "RectMicroQRVersion" + } + }, "RegionPoint": { "type": "object", "properties": { diff --git a/submodules/android b/submodules/android index 7fa022c4..5954e078 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit 7fa022c436423f30a8ecabea4aa3bc102e913e81 +Subproject commit 5954e0780bae1a16042efafc92d2d11f7614ee50 diff --git a/submodules/dart b/submodules/dart index fd4944c6..e81c31aa 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit fd4944c655c7504997075c31c8b7fad3d4117228 +Subproject commit e81c31aa691a96f2a7e2453427641d2a356dde3d diff --git a/submodules/dotnet b/submodules/dotnet index bf2c1b39..a0ffc401 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit bf2c1b3924d78730a87a3b01539ea9d7716bf748 +Subproject commit a0ffc40167de17dceb159b87ab8db17f86449391 diff --git a/submodules/go b/submodules/go index c26dea08..41a31ca5 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit c26dea08476d3b492b66b08048f57d271e90f35b +Subproject commit 41a31ca59ba79dda709dc60413a18f0e7078e75f diff --git a/submodules/java b/submodules/java index 527239ac..04b84be6 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 527239ac8d2e1b8fdb26726a728883126d83d497 +Subproject commit 04b84be6879a3c7592061f121af033ab30cd7ca7 diff --git a/submodules/node b/submodules/node index 31fcf2cc..3be091b4 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 31fcf2ccd43b0abf7342d86b81aa7c02672a2a15 +Subproject commit 3be091b4a9f74153b0d6bc48f3b4eb90f5ea6dbe diff --git a/submodules/php b/submodules/php index 947c275c..58f20070 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 947c275c76a4f51dcb557272dca7cbff4617a0bd +Subproject commit 58f20070f074e3572f6d97c87739ebcd406d5008 diff --git a/submodules/python b/submodules/python index b2a75e06..4b074aa4 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit b2a75e06a7b296f9de352187de4e55dc79d5f430 +Subproject commit 4b074aa48a5c937ab63b7b5634988038e845dc75 diff --git a/submodules/swift b/submodules/swift index 13125893..11db3c5c 160000 --- a/submodules/swift +++ b/submodules/swift @@ -1 +1 @@ -Subproject commit 1312589347399c09856c517f29059110f865c841 +Subproject commit 11db3c5c5fbb53e34596668944bd71d803777ee8