From 9eee3b435cfca33526eb5d6cc604232d5834470b Mon Sep 17 00:00:00 2001 From: Timur Baiguskarov Date: Wed, 10 Jun 2026 15:44:38 +0500 Subject: [PATCH 01/29] Update codegen for API 26.6 --- codegen/Templates/java/api.mustache | 1 + codegen/config-android.json | 2 +- codegen/config-dart.json | 2 +- codegen/config-dotnet.json | 2 +- codegen/config-go.json | 2 +- codegen/config-java.json | 2 +- codegen/config-node.json | 2 +- codegen/config-php.json | 2 +- codegen/config-python.json | 2 +- codegen/config-swift.json | 4 +- spec/aspose-barcode-cloud.json | 794 ++++++++++++++++++++++++++-- submodules/android | 2 +- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- submodules/swift | 2 +- 20 files changed, 757 insertions(+), 76 deletions(-) diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index 24c62d9e..6a52bf3b 100644 --- a/codegen/Templates/java/api.mustache +++ b/codegen/Templates/java/api.mustache @@ -298,6 +298,7 @@ package com.aspose.barcode.cloud.requests; import java.io.File; import java.util.List; import java.net.URI; +import com.aspose.barcode.cloud.model.*; import com.aspose.barcode.cloud.model.BarcodeImageFormat; import com.aspose.barcode.cloud.model.BarcodeImageParams; import com.aspose.barcode.cloud.model.EncodeBarcodeType; diff --git a/codegen/config-android.json b/codegen/config-android.json index 9831e8be..86cb0ed6 100644 --- a/codegen/config-android.json +++ b/codegen/config-android.json @@ -4,7 +4,7 @@ "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", "groupId": "com.aspose", "invokerPackage": "com.aspose.barcode.cloud.demo_app", "modelPackage": "com.aspose.barcode.cloud.demo_app.model" diff --git a/codegen/config-dart.json b/codegen/config-dart.json index 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..201ec155 100644 --- a/codegen/config-dotnet.json +++ b/codegen/config-dotnet.json @@ -1,5 +1,5 @@ { "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..52f85297 100644 --- a/codegen/config-go.json +++ b/codegen/config-go.json @@ -1,4 +1,4 @@ { "packageName": "barcode", - "packageVersion": "4.2605.0" + "packageVersion": "4.2606.0" } \ No newline at end of file diff --git a/codegen/config-java.json b/codegen/config-java.json index c8c00e9b..5b904493 100644 --- a/codegen/config-java.json +++ b/codegen/config-java.json @@ -3,7 +3,7 @@ "artifactDescription": "Aspose.BarCode Cloud SDK for Java", "artifactId": "aspose-barcode-cloud", "artifactUrl": "https://www.aspose.cloud", - "artifactVersion": "26.5.0", + "artifactVersion": "26.6.0", "developerEmail": "denis.averin@aspose.com", "developerName": "Denis Averin", "developerOrganization": "Aspose", diff --git a/codegen/config-node.json b/codegen/config-node.json index 36fb689d..c383cb93 100644 --- a/codegen/config-node.json +++ b/codegen/config-node.json @@ -1,5 +1,5 @@ { "npmName": "aspose-barcode-cloud-node", - "npmVersion": "26.5.0", + "npmVersion": "26.6.0", "supportsES6": true } \ No newline at end of file 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..eeb1e37d 100644 --- a/codegen/config-swift.json +++ b/codegen/config-swift.json @@ -22,10 +22,10 @@ "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/spec/aspose-barcode-cloud.json b/spec/aspose-barcode-cloud.json index 8f60ad58..93a6b38e 100644 --- a/spec/aspose-barcode-cloud.json +++ b/spec/aspose-barcode-cloud.json @@ -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": [ { @@ -39,7 +39,7 @@ { "name": "data", "in": "query", - "description": "String represents data to encode", + "description": "String that represents the data to encode.", "required": true, "schema": { "type": "string" @@ -48,7 +48,7 @@ { "name": "imageFormat", "in": "query", - "description": "Barcode output image format.\nDefault value: png", + "description": "Barcode output image format.\nDefault value: png.", "schema": { "$ref": "#/components/schemas/BarcodeImageFormat" } @@ -56,7 +56,7 @@ { "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" } @@ -64,7 +64,7 @@ { "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" @@ -73,7 +73,7 @@ { "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" @@ -82,7 +82,7 @@ { "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" } @@ -90,7 +90,7 @@ { "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, @@ -101,7 +101,7 @@ { "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" @@ -110,7 +110,7 @@ { "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" @@ -119,11 +119,175 @@ { "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" } + }, + { + "name": "qrEncodeMode", + "in": "query", + "description": "QR barcode encode mode.", + "schema": { + "$ref": "#/components/schemas/QREncodeMode" + } + }, + { + "name": "qrErrorLevel", + "in": "query", + "description": "QR barcode error correction level.", + "schema": { + "$ref": "#/components/schemas/QRErrorLevel" + } + }, + { + "name": "qrVersion", + "in": "query", + "description": "QR barcode version. Automatically selects the smallest version that fits the data.", + "schema": { + "$ref": "#/components/schemas/QRVersion" + } + }, + { + "name": "qrECIEncoding", + "in": "query", + "description": "ECI encoding for QR barcode data.", + "schema": { + "$ref": "#/components/schemas/ECIEncodings" + } + }, + { + "name": "qrAspectRatio", + "in": "query", + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "schema": { + "maximum": 1, + "minimum": 0.001, + "type": "number", + "format": "float" + } + }, + { + "name": "microQRVersion", + "in": "query", + "description": "MicroQR barcode version. Used when BarcodeType is MicroQR.", + "schema": { + "$ref": "#/components/schemas/MicroQRVersion" + } + }, + { + "name": "rectMicroQrVersion", + "in": "query", + "description": "RectMicroQR barcode version. Used when BarcodeType is RectMicroQR.", + "schema": { + "$ref": "#/components/schemas/RectMicroQRVersion" + } + }, + { + "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" + } + }, + { + "name": "pdf417EncodeMode", + "in": "query", + "description": "PDF417 barcode encode mode.", + "schema": { + "$ref": "#/components/schemas/Pdf417EncodeMode" + } + }, + { + "name": "pdf417ErrorLevel", + "in": "query", + "description": "PDF417 barcode error correction level.", + "schema": { + "$ref": "#/components/schemas/Pdf417ErrorLevel" + } + }, + { + "name": "pdf417Truncate", + "in": "query", + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", + "schema": { + "type": "boolean" + } + }, + { + "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" + } + }, + { + "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" + } + }, + { + "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" + } + }, + { + "name": "pdf417ECIEncoding", + "in": "query", + "description": "ECI encoding for PDF417 barcode data.", + "schema": { + "$ref": "#/components/schemas/ECIEncodings" + } + }, + { + "name": "pdf417IsReaderInitialization", + "in": "query", + "description": "Whether the barcode is used for reader initialization (programming).", + "schema": { + "type": "boolean" + } + }, + { + "name": "pdf417MacroCharacters", + "in": "query", + "description": "Macro character to prepend (structured append).", + "schema": { + "$ref": "#/components/schemas/MacroCharacter" + } + }, + { + "name": "pdf417IsLinked", + "in": "query", + "description": "Whether to use linked mode (for MicroPdf417).", + "schema": { + "type": "boolean" + } + }, + { + "name": "pdf417IsCode128Emulation", + "in": "query", + "description": "Whether to use Code128 emulation for MicroPdf417.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -225,7 +389,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": { @@ -245,7 +409,7 @@ }, "data": { "type": "string", - "description": "String represents data to encode" + "description": "String that represents the data to encode." }, "imageFormat": { "$ref": "#/components/schemas/BarcodeImageFormat" @@ -255,12 +419,12 @@ }, "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.", + "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" }, "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.", + "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" }, "units": { @@ -270,23 +434,100 @@ "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.", + "description": "Resolution of the barcode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is a dot.", "format": "float" }, "imageHeight": { "type": "number", - "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.", "format": "float" }, "imageWidth": { "type": "number", - "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.", "format": "float" }, "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.", + "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" + }, + "qrEncodeMode": { + "$ref": "#/components/schemas/QREncodeMode" + }, + "qrErrorLevel": { + "$ref": "#/components/schemas/QRErrorLevel" + }, + "qrVersion": { + "$ref": "#/components/schemas/QRVersion" + }, + "qrECIEncoding": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "qrAspectRatio": { + "maximum": 1, + "minimum": 0.001, + "type": "number", + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "format": "float" + }, + "microQRVersion": { + "$ref": "#/components/schemas/MicroQRVersion" + }, + "rectMicroQrVersion": { + "$ref": "#/components/schemas/RectMicroQRVersion" + }, + "code128EncodeMode": { + "$ref": "#/components/schemas/Code128EncodeMode" + }, + "pdf417EncodeMode": { + "$ref": "#/components/schemas/Pdf417EncodeMode" + }, + "pdf417ErrorLevel": { + "$ref": "#/components/schemas/Pdf417ErrorLevel" + }, + "pdf417Truncate": { + "type": "boolean", + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern)." + }, + "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" + }, + "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" + }, + "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" + }, + "pdf417ECIEncoding": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "pdf417IsReaderInitialization": { + "type": "boolean", + "description": "Whether the barcode is used for reader initialization (programming)." + }, + "pdf417MacroCharacters": { + "$ref": "#/components/schemas/MacroCharacter" + }, + "pdf417IsLinked": { + "type": "boolean", + "description": "Whether to use linked mode (for MicroPdf417)." + }, + "pdf417IsCode128Emulation": { + "type": "boolean", + "description": "Whether to use Code128 emulation for MicroPdf417." } } }, @@ -326,6 +567,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" } } } @@ -430,10 +728,10 @@ "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": { @@ -547,13 +845,13 @@ "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": { "$ref": "#/components/schemas/DecodeBarcodeType" @@ -562,7 +860,7 @@ { "name": "fileUrl", "in": "query", - "description": "Url to barcode image", + "description": "URL to the barcode image.", "required": true, "schema": { "type": "string", @@ -572,7 +870,7 @@ { "name": "recognitionMode", "in": "query", - "description": "Recognition mode", + "description": "Recognition mode.", "schema": { "$ref": "#/components/schemas/RecognitionMode" } @@ -580,7 +878,7 @@ { "name": "recognitionImageKind", "in": "query", - "description": "Image kind for recognition", + "description": "Image kind for recognition.", "schema": { "$ref": "#/components/schemas/RecognitionImageKind" } @@ -658,10 +956,10 @@ "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": { @@ -748,7 +1046,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": { @@ -765,7 +1063,7 @@ }, "file": { "type": "string", - "description": "Barcode image file", + "description": "Barcode image file.", "format": "binary" }, "recognitionMode": { @@ -865,13 +1163,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", @@ -951,10 +1249,10 @@ "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": { @@ -1041,7 +1339,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 +1352,7 @@ "properties": { "file": { "type": "string", - "description": "Barcode image file", + "description": "Barcode image file.", "format": "binary" } } @@ -1237,7 +1535,7 @@ }, "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.", + "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": { @@ -1246,7 +1544,7 @@ }, "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.", + "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": { @@ -1260,7 +1558,7 @@ "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.", + "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": { @@ -1270,7 +1568,7 @@ }, "imageHeight": { "type": "number", - "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.", "format": "float", "nullable": true, "xml": { @@ -1280,7 +1578,7 @@ }, "imageWidth": { "type": "number", - "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.", "format": "float", "nullable": true, "xml": { @@ -1290,7 +1588,7 @@ }, "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.", + "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": { @@ -1299,7 +1597,7 @@ } }, "additionalProperties": false, - "description": "Barcode image optional parameters", + "description": "Optional barcode image parameters.", "xml": { "name": "BarcodeImageParams" } @@ -1328,7 +1626,7 @@ "items": { "$ref": "#/components/schemas/RegionPoint" }, - "description": "Region with barcode.", + "description": "Region with the barcode.", "nullable": true, "xml": { "name": "Region", @@ -1337,7 +1635,7 @@ }, "checksum": { "type": "string", - "description": "Checksum of barcode.", + "description": "Checksum of the barcode.", "nullable": true, "xml": { "name": "Checksum" @@ -1345,7 +1643,7 @@ } }, "additionalProperties": false, - "description": "Represents information about barcode.", + "description": "Represents information about a barcode.", "xml": { "name": "BarcodeResponse" } @@ -1361,7 +1659,7 @@ "items": { "$ref": "#/components/schemas/BarcodeResponse" }, - "description": "List of barcodes which are present in image.", + "description": "List of barcodes that are present in the image.", "nullable": true, "xml": { "name": "Barcodes", @@ -1370,11 +1668,40 @@ } }, "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": { + "$ref": "#/components/schemas/Code128EncodeMode" + } + }, + "additionalProperties": false, + "description": "Optional Code128 barcode generation parameters.", + "xml": { + "name": "Code128Params" + } + }, "CodeLocation": { "enum": [ "Below", @@ -1474,11 +1801,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 +1926,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" } @@ -1573,14 +1943,14 @@ "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 +1962,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" } @@ -1612,10 +1982,19 @@ }, "barcodeImageParams": { "$ref": "#/components/schemas/BarcodeImageParams" + }, + "qrParams": { + "$ref": "#/components/schemas/QrParams" + }, + "code128Params": { + "$ref": "#/components/schemas/Code128Params" + }, + "pdf417Params": { + "$ref": "#/components/schemas/Pdf417Params" } }, "additionalProperties": false, - "description": "Barcode generation parameters", + "description": "Barcode generation parameters.", "xml": { "name": "GenerateParams" } @@ -1628,11 +2007,270 @@ "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": { + "$ref": "#/components/schemas/Pdf417EncodeMode" + }, + "pdf417ErrorLevel": { + "$ref": "#/components/schemas/Pdf417ErrorLevel" + }, + "pdf417Truncate": { + "type": "boolean", + "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", + "nullable": true, + "xml": { + "name": "Pdf417Truncate" + } + }, + "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", + "nullable": true, + "xml": { + "name": "Pdf417Columns" + } + }, + "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", + "nullable": true, + "xml": { + "name": "Pdf417Rows" + } + }, + "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", + "nullable": true, + "xml": { + "name": "Pdf417AspectRatio" + } + }, + "pdf417ECIEncoding": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "pdf417IsReaderInitialization": { + "type": "boolean", + "description": "Whether the barcode is used for reader initialization (programming).", + "nullable": true, + "xml": { + "name": "Pdf417IsReaderInitialization" + } + }, + "pdf417MacroCharacters": { + "$ref": "#/components/schemas/MacroCharacter" + }, + "pdf417IsLinked": { + "type": "boolean", + "description": "Whether to use linked mode (for MicroPdf417).", + "nullable": true, + "xml": { + "name": "Pdf417IsLinked" + } + }, + "pdf417IsCode128Emulation": { + "type": "boolean", + "description": "Whether to use Code128 emulation for MicroPdf417.", + "nullable": true, + "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": { + "$ref": "#/components/schemas/QREncodeMode" + }, + "qrErrorLevel": { + "$ref": "#/components/schemas/QRErrorLevel" + }, + "qrVersion": { + "$ref": "#/components/schemas/QRVersion" + }, + "qrECIEncoding": { + "$ref": "#/components/schemas/ECIEncodings" + }, + "qrAspectRatio": { + "maximum": 1, + "minimum": 0.001, + "type": "number", + "description": "QR barcode aspect ratio. Values: 0 to 1.", + "format": "float", + "nullable": true, + "xml": { + "name": "QrAspectRatio" + } + }, + "microQRVersion": { + "$ref": "#/components/schemas/MicroQRVersion" + }, + "rectMicroQrVersion": { + "$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", @@ -1669,7 +2307,7 @@ "items": { "$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 @@ -1692,11 +2330,53 @@ } }, "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..f5db4277 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit 7fa022c436423f30a8ecabea4aa3bc102e913e81 +Subproject commit f5db4277229e85cbf0bc8fa703e28fbfc9934cf5 diff --git a/submodules/dart b/submodules/dart index fd4944c6..74dcf5e8 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit fd4944c655c7504997075c31c8b7fad3d4117228 +Subproject commit 74dcf5e8ddc4a3d840f1f773aae006c063a398f8 diff --git a/submodules/dotnet b/submodules/dotnet index bf2c1b39..040860dc 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit bf2c1b3924d78730a87a3b01539ea9d7716bf748 +Subproject commit 040860dc35cc596eec0c5bcc6fe80e78e73c479a diff --git a/submodules/go b/submodules/go index c26dea08..f224fd4e 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit c26dea08476d3b492b66b08048f57d271e90f35b +Subproject commit f224fd4ee9af354e37731201fa1fc1da10a4f4eb diff --git a/submodules/java b/submodules/java index 527239ac..4255572f 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 527239ac8d2e1b8fdb26726a728883126d83d497 +Subproject commit 4255572fe9f0239bb8a99938f42f906515e304f6 diff --git a/submodules/node b/submodules/node index 31fcf2cc..b2be71d2 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 31fcf2ccd43b0abf7342d86b81aa7c02672a2a15 +Subproject commit b2be71d2f8ca39495368da4eb23d5ecce1393607 diff --git a/submodules/php b/submodules/php index 947c275c..7d353e66 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 947c275c76a4f51dcb557272dca7cbff4617a0bd +Subproject commit 7d353e6650bc7a17245cf6fe0c96c79d080cfab1 diff --git a/submodules/python b/submodules/python index b2a75e06..5378b223 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit b2a75e06a7b296f9de352187de4e55dc79d5f430 +Subproject commit 5378b2239e8a46e761a2ac737f6169c3f00a5ea4 diff --git a/submodules/swift b/submodules/swift index 13125893..735efb5c 160000 --- a/submodules/swift +++ b/submodules/swift @@ -1 +1 @@ -Subproject commit 1312589347399c09856c517f29059110f865c841 +Subproject commit 735efb5c24a7727a782c3c8d73c96d6fd7eebab0 From 9e026b76af4c46fab35e6aa27565c9567103d5d1 Mon Sep 17 00:00:00 2001 From: Timur Baiguskarov Date: Thu, 11 Jun 2026 12:09:09 +0500 Subject: [PATCH 02/29] Fix Java wrapper import template --- codegen/Templates/java/api.mustache | 14 +++++++++++++- submodules/java | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index 6a52bf3b..9b2ae045 100644 --- a/codegen/Templates/java/api.mustache +++ b/codegen/Templates/java/api.mustache @@ -298,15 +298,27 @@ package com.aspose.barcode.cloud.requests; import java.io.File; import java.util.List; import java.net.URI; -import com.aspose.barcode.cloud.model.*; 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; diff --git a/submodules/java b/submodules/java index 4255572f..4c8301d7 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 4255572fe9f0239bb8a99938f42f906515e304f6 +Subproject commit 4c8301d753dbe06e878be617b4b20abe7e9d4dfb From 14d6b8dbc7a372b09b59dd495d230061a7cd4164 Mon Sep 17 00:00:00 2001 From: Timur Baiguskarov Date: Thu, 11 Jun 2026 12:15:53 +0500 Subject: [PATCH 03/29] Ignore release tag URLs in URL check --- scripts/check-urls.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check-urls.py b/scripts/check-urls.py index 0cb404d7..28d77a93 100644 --- a/scripts/check-urls.py +++ b/scripts/check-urls.py @@ -32,6 +32,7 @@ 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( From a969eb1a9b3aeb0652a55ddf79eeae201151e66b Mon Sep 17 00:00:00 2001 From: Timur Baiguskarov Date: Thu, 18 Jun 2026 13:43:29 +0500 Subject: [PATCH 04/29] Release 26.6 --- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- submodules/swift | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/submodules/dart b/submodules/dart index 74dcf5e8..51e3eade 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit 74dcf5e8ddc4a3d840f1f773aae006c063a398f8 +Subproject commit 51e3eade809545ee4f3188d363bc725d04ae4303 diff --git a/submodules/dotnet b/submodules/dotnet index 040860dc..9a9c7eca 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit 040860dc35cc596eec0c5bcc6fe80e78e73c479a +Subproject commit 9a9c7ecacb54f15d63303c15edee18bfc29cbadb diff --git a/submodules/go b/submodules/go index f224fd4e..30d03e78 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit f224fd4ee9af354e37731201fa1fc1da10a4f4eb +Subproject commit 30d03e78436dad57a268c7ce3b054d1b2fdfcd95 diff --git a/submodules/java b/submodules/java index 4c8301d7..f74774f5 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 4c8301d753dbe06e878be617b4b20abe7e9d4dfb +Subproject commit f74774f5fbba289287b74a4671c7a4780d8a9485 diff --git a/submodules/node b/submodules/node index b2be71d2..03c3eb6d 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit b2be71d2f8ca39495368da4eb23d5ecce1393607 +Subproject commit 03c3eb6ddc3f320bde4c5096be06c1880a72a193 diff --git a/submodules/php b/submodules/php index 7d353e66..6448ce1a 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 7d353e6650bc7a17245cf6fe0c96c79d080cfab1 +Subproject commit 6448ce1aaf20f3fad380bb52c0acc772bc21f3a8 diff --git a/submodules/python b/submodules/python index 5378b223..1f98cad1 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit 5378b2239e8a46e761a2ac737f6169c3f00a5ea4 +Subproject commit 1f98cad170d2b8a0b001bd53ef39cc9c819202f1 diff --git a/submodules/swift b/submodules/swift index 735efb5c..4d45dc44 160000 --- a/submodules/swift +++ b/submodules/swift @@ -1 +1 @@ -Subproject commit 735efb5c24a7727a782c3c8d73c96d6fd7eebab0 +Subproject commit 4d45dc44fe742cd2c8806bdeb7547ce5fd4f6c0e From b6b8270cbe3df78a911ab30dac6d6d8c16b9844d Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Mon, 22 Jun 2026 17:10:55 +0700 Subject: [PATCH 05/29] Split generate params into groups --- Makefile | 8 + codegen/Templates/csharp/api.mustache | 9 +- codegen/Templates/csharp/api_test.mustache | 7 +- codegen/Templates/dart/api.mustache | 9 +- codegen/Templates/go/api.mustache | 12 +- codegen/Templates/java/api.mustache | 15 ++ codegen/Templates/nodejs/api.mustache | 8 + codegen/Templates/nodejs/git_push.sh.mustache | 8 + codegen/Templates/php/api.mustache | 14 ++ codegen/Templates/php/requestModel.mustache | 48 +++++ codegen/Templates/python/api.mustache | 24 ++- codegen/Templates/swift/api.mustache | 34 +-- scripts/inject-param-groups.py | 127 +++++++++++ scripts/update_swagger_spec.bash | 5 + spec/aspose-barcode-cloud.json | 203 +++++++++++++++--- 15 files changed, 471 insertions(+), 60 deletions(-) create mode 100644 scripts/inject-param-groups.py diff --git a/Makefile b/Makefile index 6f0d7bd2..7de5f6c9 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,14 @@ format-black: update: ./scripts/update_swagger_spec.bash +# Inject parameter-group vendor extensions into the spec so the SDK templates +# emit grouped generate() methods. `update` runs this automatically after the +# fetch; this target re-applies it standalone (e.g. before regenerating without +# a re-fetch). Idempotent. +.PHONY: spec-param-groups +spec-param-groups: + python scripts/inject-param-groups.py spec/aspose-barcode-cloud.json + .PHONY: start-release start-release: ./scripts/start-release.bash diff --git a/codegen/Templates/csharp/api.mustache b/codegen/Templates/csharp/api.mustache index 631e0836..7659e72b 100644 --- a/codegen/Templates/csharp/api.mustache +++ b/codegen/Templates/csharp/api.mustache @@ -64,8 +64,11 @@ 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 +76,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) @@ -119,7 +122,7 @@ namespace {{packageName}}.Api {{/pathParams}} {{#queryParams}} {{#-first}}#pragma warning disable CS0618 // Type or member is obsolete{{/-first}} - resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{paramName}}); + {{^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/dart/api.mustache b/codegen/Templates/dart/api.mustache index e7ab8f94..6ce3f838 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}} diff --git a/codegen/Templates/go/api.mustache b/codegen/Templates/go/api.mustache index b8cac253..37f65d67 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,12 @@ 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() { + queryParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + {{/vendorExtensions.x-param-group-pascal}} {{/required}} {{/queryParams}} {{/hasQueryParams}} diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index 9b2ae045..58e8a90a 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}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{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}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}())); + } + {{/vendorExtensions.x-param-group-camel}} {{/queryParams}} {{javaUtilPrefix}}Map {{localVariablePrefix}}headerParams = new {{javaUtilPrefix}}HashMap<>();{{#headerParams}} @@ -332,11 +339,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/nodejs/api.mustache b/codegen/Templates/nodejs/api.mustache index 04a8f308..98cbc7ff 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}}}'); diff --git a/codegen/Templates/nodejs/git_push.sh.mustache b/codegen/Templates/nodejs/git_push.sh.mustache index 787aa9f4..a74e9aee 100644 --- a/codegen/Templates/nodejs/git_push.sh.mustache +++ b/codegen/Templates/nodejs/git_push.sh.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..e512321f 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}} 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..e9754876 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,14 @@ 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}} +{{/vendorExtensions.x-has-param-groups}} {{#allParams}} {{#required}} # verify the required parameter "{{paramName}}" is set diff --git a/codegen/Templates/swift/api.mustache b/codegen/Templates/swift/api.mustache index 9c1c78da..55f72cc4 100644 --- a/codegen/Templates/swift/api.mustache +++ b/codegen/Templates/swift/api.mustache @@ -65,8 +65,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): @@ -93,9 +93,9 @@ extension {{projectName}}API { - 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): @@ -125,9 +125,9 @@ extension {{projectName}}API { {{#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): @@ -162,8 +162,8 @@ extension {{projectName}}API { {{#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 @@ -205,8 +205,8 @@ extension {{projectName}}API { {{#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}} @@ -223,8 +223,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): @@ -271,7 +271,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) ?? "" @@ -303,7 +303,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}} @@ -351,7 +351,7 @@ extension {{projectName}}API { {{#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) ?? "" @@ -431,8 +431,8 @@ extension {{projectName}}API { {{#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/scripts/inject-param-groups.py b/scripts/inject-param-groups.py new file mode 100644 index 00000000..5eb0ccdf --- /dev/null +++ b/scripts/inject-param-groups.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +"""Inject parameter-group metadata into the Generate (GET) operation of the spec. + +The barcode ``generate`` GET operation declares ~30 flat query parameters, so the +generated SDK method takes ~30 arguments. This script tags each query parameter +that belongs to one of the ``*Params`` groups (BarcodeImageParams, QrParams, +Pdf417Params, Code128Params) -- the same grouping the ``GenerateParams`` body +model already uses -- so the per-language ``api.mustache`` templates can emit a +method that accepts the four grouped objects instead of the flat list, while +still serialising the values into the unchanged flat query string. + +The mapping is derived from the spec itself (the properties of the four +``*Params`` sub-schemas), so it stays correct as the API evolves. ``data`` and +``dataType`` are intentionally left ungrouped. The script is idempotent. + +Vendor extensions are legal per the OpenAPI Specification, section +"Specification Extensions": https://spec.openapis.org/oas/v3.0.4.html#specification-extensions +""" +import argparse +import json +import re +import typing +from pathlib import Path + +GENERATE_PATH: typing.Final = "/barcode/generate/{barcodeType}" +GROUP_CONTAINER_SCHEMA: typing.Final = "GenerateParams" +GROUP_TYPE_SUFFIX: typing.Final = "Params" +_CAMEL_BOUNDARY: typing.Final = re.compile(r"(? str: + return _CAMEL_BOUNDARY.sub("_", name).lower() + + +def camel_to_pascal(name: str) -> str: + return name[:1].upper() + name[1:] + + +def resolve_type(schema: typing.Dict[str, typing.Any]) -> str: + if "$ref" in schema: + return schema["$ref"].split("/")[-1] + if "allOf" in schema and schema["allOf"] and "$ref" in schema["allOf"][0]: + return schema["allOf"][0]["$ref"].split("/")[-1] + if "type" in schema: + return schema["type"] + return "" + + +def build_field_to_group( + schemas: typing.Dict[str, typing.Any], +) -> typing.Tuple[ + typing.Dict[str, typing.Dict[str, str]], typing.List[typing.Dict[str, str]] +]: + """Return (field name -> group) and the ordered list of groups. + + A group is any ``GenerateParams`` property whose type name ends with + ``Params`` (this excludes ``barcodeType`` and ``encodeData``). + """ + container = schemas[GROUP_CONTAINER_SCHEMA]["properties"] + groups: typing.List[typing.Dict[str, str]] = [] + field_to_group: typing.Dict[str, typing.Dict[str, str]] = {} + for prop_name, prop_schema in container.items(): + type_name = resolve_type(prop_schema) + if not type_name.endswith(GROUP_TYPE_SUFFIX): + continue + group = { + "camel": prop_name, + "snake": camel_to_snake(prop_name), + "pascal": camel_to_pascal(prop_name), + "type": type_name, + } + groups.append(group) + for field_name in schemas[type_name]["properties"]: + field_to_group[field_name] = group + return field_to_group, groups + + +def inject(spec: typing.Dict[str, typing.Any]) -> int: + """Tag the Generate GET query params in place; return the number tagged.""" + schemas = spec["components"]["schemas"] + field_to_group, groups = build_field_to_group(schemas) + + operation = spec["paths"][GENERATE_PATH]["get"] + operation["x-param-groups"] = groups + operation["x-has-param-groups"] = True + + tagged = 0 + for parameter in operation["parameters"]: + if parameter["in"] != "query": + continue + name = parameter["name"] + if name not in field_to_group: + continue + group = field_to_group[name] + parameter["x-param-group-snake"] = group["snake"] + parameter["x-param-group-camel"] = group["camel"] + parameter["x-param-group-pascal"] = group["pascal"] + parameter["x-param-group-type"] = group["type"] + tagged += 1 + return tagged + + +def main() -> None: + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("input", type=Path, help="OpenAPI spec JSON to read") + parser.add_argument( + "output", + type=Path, + nargs="?", + help="Where to write the augmented spec (defaults to in-place)", + ) + args = parser.parse_args() + + spec = json.loads(args.input.read_text(encoding="utf-8")) + tagged = inject(spec) + destination = args.output if args.output is not None else args.input + destination.write_text( + json.dumps(spec, indent=2, ensure_ascii=False) + "\n", encoding="utf-8" + ) + group_count = len(spec["paths"][GENERATE_PATH]["get"]["x-param-groups"]) + print(f"Tagged {tagged} query params across {group_count} groups -> {destination}") + + +if __name__ == "__main__": + main() diff --git a/scripts/update_swagger_spec.bash b/scripts/update_swagger_spec.bash index 99aaa1be..f7e94246 100755 --- a/scripts/update_swagger_spec.bash +++ b/scripts/update_swagger_spec.bash @@ -6,3 +6,8 @@ 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 + +# Re-apply codegen parameter-group metadata (vendor extensions consumed by the +# api.mustache templates to emit grouped generate() methods). A fresh fetch from +# the server does not include them; the injection is idempotent. +python scripts/inject-param-groups.py spec/aspose-barcode-cloud.json diff --git a/spec/aspose-barcode-cloud.json b/spec/aspose-barcode-cloud.json index 93a6b38e..53fa06ec 100644 --- a/spec/aspose-barcode-cloud.json +++ b/spec/aspose-barcode-cloud.json @@ -51,7 +51,11 @@ "description": "Barcode output image format.\nDefault value: png.", "schema": { "$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", @@ -59,7 +63,11 @@ "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", @@ -68,7 +76,11 @@ "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", @@ -77,7 +89,11 @@ "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", @@ -85,7 +101,11 @@ "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", @@ -96,7 +116,11 @@ "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", @@ -105,7 +129,11 @@ "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", @@ -114,7 +142,11 @@ "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", @@ -123,7 +155,11 @@ "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", @@ -131,7 +167,11 @@ "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", @@ -139,7 +179,11 @@ "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", @@ -147,7 +191,11 @@ "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", @@ -155,7 +203,11 @@ "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", @@ -166,7 +218,11 @@ "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", @@ -174,7 +230,11 @@ "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", @@ -182,7 +242,11 @@ "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", @@ -190,7 +254,11 @@ "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", @@ -198,7 +266,11 @@ "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", @@ -206,7 +278,11 @@ "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", @@ -214,7 +290,11 @@ "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", @@ -225,7 +305,11 @@ "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", @@ -236,7 +320,11 @@ "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", @@ -247,7 +335,11 @@ "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", @@ -255,7 +347,11 @@ "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", @@ -263,7 +359,11 @@ "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", @@ -271,7 +371,11 @@ "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", @@ -279,7 +383,11 @@ "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", @@ -287,7 +395,11 @@ "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": { @@ -381,7 +493,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": { @@ -2432,7 +2571,7 @@ "flows": { "clientCredentials": { "tokenUrl": "https://id.aspose.cloud/connect/token", - "scopes": { } + "scopes": {} } } } @@ -2440,7 +2579,7 @@ }, "security": [ { - "JWT": [ ] + "JWT": [] } ] -} \ No newline at end of file +} From d7506fa6252c27d13a9fadb9d1e103222cf4dc32 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Mon, 22 Jun 2026 17:20:56 +0500 Subject: [PATCH 06/29] Update spec --- spec/aspose-barcode-cloud.json | 444 ++++++++++++++++++++++++++++----- 1 file changed, 380 insertions(+), 64 deletions(-) diff --git a/spec/aspose-barcode-cloud.json b/spec/aspose-barcode-cloud.json index 53fa06ec..0ba39ce3 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", @@ -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,6 +34,7 @@ "in": "query", "description": "Type of data to encode.\nDefault value: StringData.", "schema": { + "default": "StringData", "$ref": "#/components/schemas/EncodeDataType" } }, @@ -50,6 +52,7 @@ "in": "query", "description": "Barcode output image format.\nDefault value: png.", "schema": { + "default": "Png", "$ref": "#/components/schemas/BarcodeImageFormat" }, "x-param-group-snake": "barcode_image_params", @@ -449,11 +452,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -464,11 +469,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -479,11 +486,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -541,9 +550,12 @@ "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": { @@ -551,22 +563,46 @@ "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 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" + "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 starting with #.\nFor example: AliceBlue or #FF000000.\nDefault value: White.", - "default": "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": { @@ -574,33 +610,69 @@ "minimum": 1, "type": "number", "description": "Resolution of the barcode image.\nOne value for both dimensions.\nDefault value: 96 dpi.\nDecimal separator is a dot.", - "format": "float" + "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 the specified units. Default units: pixels.\nDecimal separator is a dot.", - "format": "float" + "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 the specified units. Default units: pixels.\nDecimal separator is a dot.", - "format": "float" + "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 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" + "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": { @@ -608,65 +680,132 @@ "minimum": 0.001, "type": "number", "description": "QR barcode aspect ratio. Values: 0 to 1.", - "format": "float" + "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)." + "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" + "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" + "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" + "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)." + "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)." + "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." + "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" } } }, @@ -815,11 +954,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -830,11 +971,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -845,11 +988,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -859,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": { @@ -874,11 +1046,13 @@ "content": { "application/json": { "schema": { + "description": "Barcode generation parameters.", "$ref": "#/components/schemas/GenerateParams" } }, "application/xml": { "schema": { + "description": "Barcode generation parameters.", "$ref": "#/components/schemas/GenerateParams" } } @@ -932,11 +1106,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -947,11 +1123,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -962,11 +1140,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -993,6 +1173,7 @@ "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" } }, @@ -1011,6 +1192,7 @@ "in": "query", "description": "Recognition mode.", "schema": { + "description": "Recognition mode.", "$ref": "#/components/schemas/RecognitionMode" } }, @@ -1019,6 +1201,7 @@ "in": "query", "description": "Image kind for recognition.", "schema": { + "description": "Kind of image to recognize", "$ref": "#/components/schemas/RecognitionImageKind" } } @@ -1029,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" } } @@ -1044,11 +1229,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1059,11 +1246,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1074,11 +1263,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1102,11 +1293,13 @@ "content": { "application/json": { "schema": { + "description": "Barcode recognition request.", "$ref": "#/components/schemas/RecognizeBase64Request" } }, "application/xml": { "schema": { + "description": "Barcode recognition request.", "$ref": "#/components/schemas/RecognizeBase64Request" } } @@ -1119,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" } } @@ -1134,11 +1329,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1149,11 +1346,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1164,11 +1363,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1198,6 +1399,7 @@ "type": "object", "properties": { "barcodeType": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "$ref": "#/components/schemas/DecodeBarcodeType" }, "file": { @@ -1206,9 +1408,11 @@ "format": "binary" }, "recognitionMode": { + "description": "Recognition mode.", "$ref": "#/components/schemas/RecognitionMode" }, "recognitionImageKind": { + "description": "Image kind for recognition.", "$ref": "#/components/schemas/RecognitionImageKind" } } @@ -1236,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" } } @@ -1251,11 +1457,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1266,11 +1474,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1281,11 +1491,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1322,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" } } @@ -1337,11 +1551,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1352,11 +1568,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1367,11 +1585,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1395,11 +1615,13 @@ "content": { "application/json": { "schema": { + "description": "Scan barcode request.", "$ref": "#/components/schemas/ScanBase64Request" } }, "application/xml": { "schema": { + "description": "Scan barcode request.", "$ref": "#/components/schemas/ScanBase64Request" } } @@ -1412,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" } } @@ -1427,11 +1651,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1442,11 +1668,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1457,11 +1685,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1510,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" } } @@ -1525,11 +1757,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1540,11 +1774,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1555,11 +1791,13 @@ "content": { "application/json": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } }, "application/xml": { "schema": { + "description": "ApiError Response", "$ref": "#/components/schemas/ApiErrorResponse" } } @@ -1582,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" } }, @@ -1632,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" } }, @@ -1667,69 +1917,85 @@ "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", + "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", + "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", + "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", + "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", + "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", + "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" } @@ -1745,37 +2011,46 @@ "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 the barcode.", - "nullable": true, "xml": { "name": "Region", "wrapped": true } }, "checksum": { - "type": "string", + "type": [ + "null", + "string" + ], "description": "Checksum of the barcode.", - "nullable": true, "xml": { "name": "Checksum" } @@ -1794,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 that are present in the image.", - "nullable": true, "xml": { "name": "Barcodes", "wrapped": true @@ -1832,6 +2110,7 @@ "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" } }, @@ -2077,6 +2356,8 @@ "type": "object", "properties": { "dataType": { + "description": "Type of data to encode.\nDefault value: StringData.", + "default": "StringData", "$ref": "#/components/schemas/EncodeDataType" }, "data": { @@ -2114,21 +2395,27 @@ "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" } }, @@ -2212,15 +2499,19 @@ "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": "boolean", + "type": [ + "null", + "boolean" + ], "description": "Whether to use truncated PDF417 format (removes right-side stop pattern).", - "nullable": true, "xml": { "name": "Pdf417Truncate" } @@ -2228,10 +2519,12 @@ "pdf417Columns": { "maximum": 30, "minimum": 0, - "type": "integer", + "type": [ + "null", + "integer" + ], "description": "Number of columns in the PDF417 barcode. Values between 1 and 30. 0 for auto.", "format": "int32", - "nullable": true, "xml": { "name": "Pdf417Columns" } @@ -2239,10 +2532,12 @@ "pdf417Rows": { "maximum": 90, "minimum": 0, - "type": "integer", + "type": [ + "null", + "integer" + ], "description": "Number of rows in the PDF417 barcode. Values between 3 and 90. 0 for automatic.", "format": "int32", - "nullable": true, "xml": { "name": "Pdf417Rows" } @@ -2250,40 +2545,50 @@ "pdf417AspectRatio": { "maximum": 10, "minimum": 2, - "type": "number", + "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", - "nullable": true, "xml": { "name": "Pdf417AspectRatio" } }, "pdf417ECIEncoding": { + "description": "ECI encoding for PDF417 barcode data.", "$ref": "#/components/schemas/ECIEncodings" }, "pdf417IsReaderInitialization": { - "type": "boolean", + "type": [ + "null", + "boolean" + ], "description": "Whether the barcode is used for reader initialization (programming).", - "nullable": true, "xml": { "name": "Pdf417IsReaderInitialization" } }, "pdf417MacroCharacters": { + "description": "Macro character to prepend (structured append).", "$ref": "#/components/schemas/MacroCharacter" }, "pdf417IsLinked": { - "type": "boolean", + "type": [ + "null", + "boolean" + ], "description": "Whether to use linked mode (for MicroPdf417).", - "nullable": true, "xml": { "name": "Pdf417IsLinked" } }, "pdf417IsCode128Emulation": { - "type": "boolean", + "type": [ + "null", + "boolean" + ], "description": "Whether to use Code128 emulation for MicroPdf417.", - "nullable": true, "xml": { "name": "Pdf417IsCode128Emulation" } @@ -2375,32 +2680,40 @@ "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": "number", + "type": [ + "null", + "number" + ], "description": "QR barcode aspect ratio. Values: 0 to 1.", "format": "float", - "nullable": true, "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" } }, @@ -2444,6 +2757,7 @@ "barcodeTypes": { "type": "array", "items": { + "description": "See https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/decodetype/", "$ref": "#/components/schemas/DecodeBarcodeType" }, "description": "Array of barcode decode types to find.", @@ -2462,9 +2776,11 @@ } }, "recognitionMode": { + "description": "Barcode recognition mode.", "$ref": "#/components/schemas/RecognitionMode" }, "recognitionImageKind": { + "description": "Image kind for recognition.", "$ref": "#/components/schemas/RecognitionImageKind" } }, From 759f9256ad39e33a4b08dad6ed8b43b4000c5d45 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 19:28:52 +0500 Subject: [PATCH 07/29] Dart templates fixed for new spec --- codegen/Templates/dart/api.mustache | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/codegen/Templates/dart/api.mustache b/codegen/Templates/dart/api.mustache index 6ce3f838..f83f0783 100644 --- a/codegen/Templates/dart/api.mustache +++ b/codegen/Templates/dart/api.mustache @@ -59,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(); @@ -69,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}} @@ -79,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, From c9b1d2aeb4aa7f43d866ce0604ed57a47b6c0e6f Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 19:41:22 +0500 Subject: [PATCH 08/29] Fixed dotnet templates --- codegen/Templates/csharp/api.mustache | 31 +++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/codegen/Templates/csharp/api.mustache b/codegen/Templates/csharp/api.mustache index 7659e72b..39550975 100644 --- a/codegen/Templates/csharp/api.mustache +++ b/codegen/Templates/csharp/api.mustache @@ -64,7 +64,10 @@ namespace {{packageName}}.Api /// /// {{summary}} {{notes}} /// - {{#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-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) @@ -90,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}} @@ -116,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}} + {{#-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}} + {{#-last}} + #pragma warning restore CS0618 // Type or member is obsolete + {{/-last}} {{/queryParams}} {{#hasBodyParam}}string postBody = SerializationHelper.Serialize({{bodyParam.paramName}}); // http body (model) parameter{{/hasBodyParam}} From be04516338027e55cf8a92ad8d044e8156f4ab38 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 19:53:04 +0500 Subject: [PATCH 09/29] Templates fixed for new spec --- codegen/Templates/go/api.mustache | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/codegen/Templates/go/api.mustache b/codegen/Templates/go/api.mustache index 37f65d67..2c4d3d71 100644 --- a/codegen/Templates/go/api.mustache +++ b/codegen/Templates/go/api.mustache @@ -125,7 +125,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} {{/vendorExtensions.x-param-group-pascal}} {{#vendorExtensions.x-param-group-pascal}} if optionals != nil && optionals.{{vendorExtensions.x-param-group-pascal}}.IsSet() { - queryParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + 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}} @@ -203,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()); @@ -215,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}} From c6ba7a46e63055aebf2549f783e3b7e13c226af0 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 20:15:57 +0500 Subject: [PATCH 10/29] Fix java template --- codegen/Templates/java/api.mustache | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index 58e8a90a..d08efbc1 100644 --- a/codegen/Templates/java/api.mustache +++ b/codegen/Templates/java/api.mustache @@ -99,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}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}() != null) { + {{localVariablePrefix}}formParams.put("{{baseName}}", request.{{vendorExtensions.x-param-group-camel}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}()); + } + {{/vendorExtensions.x-param-group-camel}} {{/formParams}} final String[] {{localVariablePrefix}}accepts = { From 9c489d422319c378bb3f842d43989e1307be8d59 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 20:31:00 +0500 Subject: [PATCH 11/29] Fix node template --- codegen/Templates/nodejs/api.mustache | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codegen/Templates/nodejs/api.mustache b/codegen/Templates/nodejs/api.mustache index 98cbc7ff..ccac9c50 100644 --- a/codegen/Templates/nodejs/api.mustache +++ b/codegen/Templates/nodejs/api.mustache @@ -470,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}})]); @@ -480,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 = { From 05d4370064fa35d2fd04987dbd508bd03db1182c Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 21:31:46 +0500 Subject: [PATCH 12/29] Fix php templates --- codegen/Templates/php/api.mustache | 8 ++++++++ codegen/Templates/php/model.mustache | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/codegen/Templates/php/api.mustache b/codegen/Templates/php/api.mustache index e512321f..9d8fe387 100644 --- a/codegen/Templates/php/api.mustache +++ b/codegen/Templates/php/api.mustache @@ -390,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 */ From 05bdcfce44ed9e5b18ad8775c2a22317f2b07ecc Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Wed, 24 Jun 2026 21:58:46 +0500 Subject: [PATCH 13/29] Fix python templates --- codegen/Templates/python/api.mustache | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codegen/Templates/python/api.mustache b/codegen/Templates/python/api.mustache index e9754876..c90a5926 100644 --- a/codegen/Templates/python/api.mustache +++ b/codegen/Templates/python/api.mustache @@ -114,6 +114,12 @@ class {{classname}}(object): 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}} From 8bb46b14379f7f50c36aaf386997dc8bfbc421de Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Thu, 25 Jun 2026 00:22:57 +0500 Subject: [PATCH 14/29] Fix swift template --- codegen/Templates/swift/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/Templates/swift/api.mustache b/codegen/Templates/swift/api.mustache index 55f72cc4..4e1013bd 100644 --- a/codegen/Templates/swift/api.mustache +++ b/codegen/Templates/swift/api.mustache @@ -289,7 +289,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}} ] From c488c9b8d730e2af0fcafd3761f9751330cacd51 Mon Sep 17 00:00:00 2001 From: Ivan Kamkin Date: Tue, 30 Jun 2026 17:21:25 +0500 Subject: [PATCH 15/29] Update java template --- codegen/Templates/java/pom.mustache | 11 +++-------- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- submodules/swift | 2 +- 9 files changed, 11 insertions(+), 16 deletions(-) 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/submodules/dart b/submodules/dart index 51e3eade..28552fc9 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit 51e3eade809545ee4f3188d363bc725d04ae4303 +Subproject commit 28552fc9b6b4acf5d35147ef60c6bebd751a5b8e diff --git a/submodules/dotnet b/submodules/dotnet index 9a9c7eca..a3d6d906 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit 9a9c7ecacb54f15d63303c15edee18bfc29cbadb +Subproject commit a3d6d906ced796158597e3b5ecc08a6e393d5c5b diff --git a/submodules/go b/submodules/go index 30d03e78..ade0cf50 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit 30d03e78436dad57a268c7ce3b054d1b2fdfcd95 +Subproject commit ade0cf50dd3c86a7a4e4c634be352373abd74184 diff --git a/submodules/java b/submodules/java index f74774f5..33ee1c0a 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit f74774f5fbba289287b74a4671c7a4780d8a9485 +Subproject commit 33ee1c0a30d604d6942437e108aefb882e950634 diff --git a/submodules/node b/submodules/node index 03c3eb6d..20e79a03 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 03c3eb6ddc3f320bde4c5096be06c1880a72a193 +Subproject commit 20e79a03e2c638e87caaf8e63c430bd634c5921a diff --git a/submodules/php b/submodules/php index 6448ce1a..8a0054f3 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 6448ce1aaf20f3fad380bb52c0acc772bc21f3a8 +Subproject commit 8a0054f3c54e20e028c89c8c8f672ae91b2801cd diff --git a/submodules/python b/submodules/python index 1f98cad1..4b8aaed3 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit 1f98cad170d2b8a0b001bd53ef39cc9c819202f1 +Subproject commit 4b8aaed351c3860cea2da30081aa23344d71a423 diff --git a/submodules/swift b/submodules/swift index 4d45dc44..3a05c750 160000 --- a/submodules/swift +++ b/submodules/swift @@ -1 +1 @@ -Subproject commit 4d45dc44fe742cd2c8806bdeb7547ce5fd4f6c0e +Subproject commit 3a05c750ea279f7bd5b5793f181251a1bc1479ce From 1feb8f315460cf7daabd3cb7e08433fb689d0a27 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Tue, 30 Jun 2026 20:09:41 +0700 Subject: [PATCH 16/29] Fix Java templates --- codegen/Templates/java/api.mustache | 8 ++++---- codegen/Templates/java/pojo.mustache | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codegen/Templates/java/api.mustache b/codegen/Templates/java/api.mustache index d08efbc1..4b047688 100644 --- a/codegen/Templates/java/api.mustache +++ b/codegen/Templates/java/api.mustache @@ -88,8 +88,8 @@ public class {{classname}} { } {{/vendorExtensions.x-param-group-camel}} {{#vendorExtensions.x-param-group-camel}} - if (request.{{vendorExtensions.x-param-group-camel}} != null && request.{{vendorExtensions.x-param-group-camel}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{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}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}())); + 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}} @@ -105,8 +105,8 @@ public class {{classname}} { } {{/vendorExtensions.x-param-group-camel}} {{#vendorExtensions.x-param-group-camel}} - if (request.{{vendorExtensions.x-param-group-camel}} != null && request.{{vendorExtensions.x-param-group-camel}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}() != null) { - {{localVariablePrefix}}formParams.put("{{baseName}}", request.{{vendorExtensions.x-param-group-camel}}.{{#isBoolean}}isget{{/isBoolean}}{{^isBoolean}}get{{/isBoolean}}{{nameInPascalCase}}()); + 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}} 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}} From 35884fc54f8e8e9f54bfad3576cc6a762e15a05c Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Tue, 30 Jun 2026 20:30:33 +0700 Subject: [PATCH 17/29] Update Swift templates --- codegen/Templates/swift/Podspec.mustache | 23 ++++++++++++++++++ codegen/Templates/swift/api.mustache | 30 ++++++++++++++---------- codegen/generate-swift.bash | 1 + 3 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 codegen/Templates/swift/Podspec.mustache 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 4e1013bd..ccbf7b05 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 */ @@ -87,8 +88,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}} - returns: Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ @@ -117,8 +119,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}} - returns: Observable<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ @@ -154,8 +157,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}} - returns: AnyPublisher<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> */ @@ -197,8 +201,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}} - returns: {{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}} */ @@ -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 */ diff --git a/codegen/generate-swift.bash b/codegen/generate-swift.bash index 296ed744..7503de61 100755 --- a/codegen/generate-swift.bash +++ b/codegen/generate-swift.bash @@ -21,6 +21,7 @@ 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/README.md" "$targetDir/README.template" rm -rf "$targetDir/docs" From eddc2400169e87ab25d1d85d1b556ea211431bf1 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Tue, 30 Jun 2026 20:49:55 +0700 Subject: [PATCH 18/29] Fix Swift templates again --- codegen/Templates/swift/api.mustache | 18 +-- codegen/Templates/swift/api_doc.mustache | 143 +++++++++++++++++++++++ 2 files changed, 152 insertions(+), 9 deletions(-) create mode 100644 codegen/Templates/swift/api_doc.mustache diff --git a/codegen/Templates/swift/api.mustache b/codegen/Templates/swift/api.mustache index ccbf7b05..727d6aaf 100644 --- a/codegen/Templates/swift/api.mustache +++ b/codegen/Templates/swift/api.mustache @@ -266,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}} @@ -349,9 +349,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}} - returns: `EventLoopFuture` of `ClientResponse`{{#description}} {{{.}}}{{/description}} */ {{#isDeprecated}} @@ -429,9 +429,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}} - returns: `EventLoopFuture` of `{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}`{{#description}} {{{.}}}{{/description}} */ {{#isDeprecated}} 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}} From 6b716c5963332797299bda766fd16c5be0811cc9 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Wed, 1 Jul 2026 13:46:22 +0700 Subject: [PATCH 19/29] Add .spi.yml for Swift --- codegen/Templates/swift/spi.mustache | 9 +++++++++ codegen/config-swift.json | 4 ++++ codegen/generate-swift.bash | 1 + 3 files changed, 14 insertions(+) create mode 100644 codegen/Templates/swift/spi.mustache 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-swift.json b/codegen/config-swift.json index eeb1e37d..6cff1407 100644 --- a/codegen/config-swift.json +++ b/codegen/config-swift.json @@ -17,6 +17,10 @@ "BarcodeAuthInterceptor.mustache": { "destinationFilename": "Sources/AsposeBarcodeCloud/Infrastructure/BarcodeAuthInterceptor.swift", "templateType": "SupportingFiles" + }, + "spi.mustache": { + "destinationFilename": ".spi.yml", + "templateType": "SupportingFiles" } }, "hideGenerationTimestamp": true, diff --git a/codegen/generate-swift.bash b/codegen/generate-swift.bash index 7503de61..d6443b42 100755 --- a/codegen/generate-swift.bash +++ b/codegen/generate-swift.bash @@ -22,6 +22,7 @@ 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" From 753c4a5876afe9c79459991f650d8ed8c65ac175 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:36:00 +0700 Subject: [PATCH 20/29] Generate the Node.js SDK in a single openapi-generator run typescript-node cannot emit docs on its own, so models.ts, the docs and the README were produced by a second generator invocation that reused the api.ts/git_push.sh/tsconfig.json output slots. Emit them as user-defined supporting files (config-node.json "files" section) so everything is produced in one run, and rename the templates to match their output. --- ...nfig.mustache => README.template.mustache} | 0 .../docs/{api.mustache => index.md.mustache} | 0 ...it_push.sh.mustache => models.md.mustache} | 0 .../models.ts.mustache} | 0 codegen/config-node.json | 22 +++++++++++++++++-- codegen/generate-node.bash | 17 ++++++-------- 6 files changed, 27 insertions(+), 12 deletions(-) rename codegen/Templates/nodejs/{docs/tsconfig.mustache => README.template.mustache} (100%) rename codegen/Templates/nodejs/docs/{api.mustache => index.md.mustache} (100%) rename codegen/Templates/nodejs/docs/{git_push.sh.mustache => models.md.mustache} (100%) rename codegen/Templates/nodejs/{git_push.sh.mustache => src/models.ts.mustache} (100%) 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/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 100% rename from codegen/Templates/nodejs/git_push.sh.mustache rename to codegen/Templates/nodejs/src/models.ts.mustache diff --git a/codegen/config-node.json b/codegen/config-node.json index c383cb93..c91a5fe4 100644 --- a/codegen/config-node.json +++ b/codegen/config-node.json @@ -1,5 +1,23 @@ { "npmName": "aspose-barcode-cloud-node", "npmVersion": "26.6.0", - "supportsES6": true -} \ No newline at end of file + "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/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/" From 0cd977f8ddf08625b367989e699e869f6ce40bc1 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:37:06 +0700 Subject: [PATCH 21/29] Emit Java, .NET, and Go SDK support files via the files config These generators produced a file under an unrelated built-in name (git_push.sh, appveyor.yml, response.go) and moved it into place. Emit each at its real name via the config "files" section and rename the templates to match. For Go, drop the generator's default response.go before the wildcard move so it is not pulled into the SDK. --- ...or.mustache => NetFrameworkTests.csproj.mustache} | 0 ...{git_push.sh.mustache => dependency.xml.mustache} | 0 .../Templates/go/{response.mustache => jwt.mustache} | 0 ...{git_push.sh.mustache => dependency.xml.mustache} | 0 codegen/config-dotnet.json | 12 +++++++++++- codegen/config-go.json | 8 +++++++- codegen/config-java.json | 8 +++++++- codegen/generate-dotnet.bash | 4 ++-- codegen/generate-go.bash | 5 ++++- codegen/generate-java.bash | 2 +- 10 files changed, 32 insertions(+), 7 deletions(-) rename codegen/Templates/csharp/{appveyor.mustache => NetFrameworkTests.csproj.mustache} (100%) rename codegen/Templates/csharp/{git_push.sh.mustache => dependency.xml.mustache} (100%) rename codegen/Templates/go/{response.mustache => jwt.mustache} (100%) rename codegen/Templates/java/{git_push.sh.mustache => dependency.xml.mustache} (100%) 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/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/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/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/config-dotnet.json b/codegen/config-dotnet.json index 201ec155..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.6.0", "targetFramework": "netstandard2.0" -} \ No newline at end of file +} diff --git a/codegen/config-go.json b/codegen/config-go.json index 52f85297..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.2606.0" -} \ No newline at end of file +} diff --git a/codegen/config-java.json b/codegen/config-java.json index 5b904493..ea7c8b81 100644 --- a/codegen/config-java.json +++ b/codegen/config-java.json @@ -8,6 +8,12 @@ "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/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 From f095b81462f30c8cb564dd5549ab910cc392ed5f Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:37:06 +0700 Subject: [PATCH 22/29] Rework the Android SDK templates for the files config and grouped API Emit gradle.properties, app/build.gradle and MainActivity.kt via the files config instead of hijacking the git_push.sh/gradlew/ApiException.java slots (settings.gradle overrides the built-in template directly). Update the MainActivity and README sample to the grouped generate() API (barcodeImageParams/qrParams) to match the current SDK. --- ...tion.mustache => MainActivity.kt.mustache} | 22 +++++++++++-- codegen/Templates/android/README.mustache | 32 +++++++++++-------- ...lew.mustache => app-build.gradle.mustache} | 0 ...sh.mustache => gradle.properties.mustache} | 0 ...{pom.mustache => settings.gradle.mustache} | 0 codegen/config-android.json | 16 +++++++++- codegen/generate-android.bash | 8 ++--- 7 files changed, 57 insertions(+), 21 deletions(-) rename codegen/Templates/android/{apiException.mustache => MainActivity.kt.mustache} (92%) rename codegen/Templates/android/{gradlew.mustache => app-build.gradle.mustache} (100%) rename codegen/Templates/android/{git_push.sh.mustache => gradle.properties.mustache} (100%) rename codegen/Templates/android/{pom.mustache => settings.gradle.mustache} (100%) 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/config-android.json b/codegen/config-android.json index 86cb0ed6..602ae7a4 100644 --- a/codegen/config-android.json +++ b/codegen/config-android.json @@ -5,7 +5,21 @@ "apiPackage": "com.aspose.barcode.cloud.demo_app", "artifactId": "Android Application for Barcode Processing in the Cloud via REST API", "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/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/" From e9b97c4369457c2a8987209716a55023c3279a82 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:37:06 +0700 Subject: [PATCH 23/29] Point the Go SDK badges at the v4 module and branch Replace the Go Report Card badge with the pkg.go.dev Go Reference badge for the v4 module, and point the CI status badge at the v4 branch. --- codegen/Templates/go/README.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}} From 0eaa7b8c104c38fde909f057808eecec4723addf Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:37:06 +0700 Subject: [PATCH 24/29] Drop dead boilerplate from the Go SDK utils.go template utils.go shipped only unused openapi-generator helpers (Ptr*, Nullable*, IsNil, newStrictDecoder). Emit an empty utils.go from a trimmed template. --- codegen/Templates/go/utils.mustache | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 codegen/Templates/go/utils.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}} From c656dd58c512d114cf367e12bb69ff7400a8e7f4 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:37:06 +0700 Subject: [PATCH 25/29] Restrict the CI badge branch check to main or v4 Previously only ?branch=main passed. Accept ?branch=main or ?branch=v4 (the Go SDK's default branch); flag any other branch, a missing branch, or prefixes like v40. --- scripts/check-badges.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 3e9c3efc2b69e054d74c686e126a921d3a838973 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:38:15 +0700 Subject: [PATCH 26/29] Update submodules --- submodules/android | 2 +- submodules/dart | 2 +- submodules/dotnet | 2 +- submodules/go | 2 +- submodules/java | 2 +- submodules/node | 2 +- submodules/php | 2 +- submodules/python | 2 +- submodules/swift | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/submodules/android b/submodules/android index f5db4277..5954e078 160000 --- a/submodules/android +++ b/submodules/android @@ -1 +1 @@ -Subproject commit f5db4277229e85cbf0bc8fa703e28fbfc9934cf5 +Subproject commit 5954e0780bae1a16042efafc92d2d11f7614ee50 diff --git a/submodules/dart b/submodules/dart index 28552fc9..e81c31aa 160000 --- a/submodules/dart +++ b/submodules/dart @@ -1 +1 @@ -Subproject commit 28552fc9b6b4acf5d35147ef60c6bebd751a5b8e +Subproject commit e81c31aa691a96f2a7e2453427641d2a356dde3d diff --git a/submodules/dotnet b/submodules/dotnet index a3d6d906..a0ffc401 160000 --- a/submodules/dotnet +++ b/submodules/dotnet @@ -1 +1 @@ -Subproject commit a3d6d906ced796158597e3b5ecc08a6e393d5c5b +Subproject commit a0ffc40167de17dceb159b87ab8db17f86449391 diff --git a/submodules/go b/submodules/go index ade0cf50..41a31ca5 160000 --- a/submodules/go +++ b/submodules/go @@ -1 +1 @@ -Subproject commit ade0cf50dd3c86a7a4e4c634be352373abd74184 +Subproject commit 41a31ca59ba79dda709dc60413a18f0e7078e75f diff --git a/submodules/java b/submodules/java index 33ee1c0a..04b84be6 160000 --- a/submodules/java +++ b/submodules/java @@ -1 +1 @@ -Subproject commit 33ee1c0a30d604d6942437e108aefb882e950634 +Subproject commit 04b84be6879a3c7592061f121af033ab30cd7ca7 diff --git a/submodules/node b/submodules/node index 20e79a03..3be091b4 160000 --- a/submodules/node +++ b/submodules/node @@ -1 +1 @@ -Subproject commit 20e79a03e2c638e87caaf8e63c430bd634c5921a +Subproject commit 3be091b4a9f74153b0d6bc48f3b4eb90f5ea6dbe diff --git a/submodules/php b/submodules/php index 8a0054f3..58f20070 160000 --- a/submodules/php +++ b/submodules/php @@ -1 +1 @@ -Subproject commit 8a0054f3c54e20e028c89c8c8f672ae91b2801cd +Subproject commit 58f20070f074e3572f6d97c87739ebcd406d5008 diff --git a/submodules/python b/submodules/python index 4b8aaed3..4b074aa4 160000 --- a/submodules/python +++ b/submodules/python @@ -1 +1 @@ -Subproject commit 4b8aaed351c3860cea2da30081aa23344d71a423 +Subproject commit 4b074aa48a5c937ab63b7b5634988038e845dc75 diff --git a/submodules/swift b/submodules/swift index 3a05c750..11db3c5c 160000 --- a/submodules/swift +++ b/submodules/swift @@ -1 +1 @@ -Subproject commit 3a05c750ea279f7bd5b5793f181251a1bc1479ce +Subproject commit 11db3c5c5fbb53e34596668944bd71d803777ee8 From ea2df2de4b5feab8c4cf2e2c494a44a8115fffff Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:56:35 +0700 Subject: [PATCH 27/29] Refresh the spec from the live API and drop inject-param-groups The API now serves the x-param-group vendor extensions itself, so inject-param-groups.py only re-serialised the fetched JSON ({ } -> {}, trailing newline), drifting the committed spec from live and failing the check-swagger CI job on every 'make update'. Remove the script and its callers (update_swagger_spec.bash, the Makefile spec-param-groups target); the fetched spec needs no post-processing. --- Makefile | 8 -- scripts/inject-param-groups.py | 127 ------------------------------- scripts/update_swagger_spec.bash | 7 +- spec/aspose-barcode-cloud.json | 6 +- 4 files changed, 4 insertions(+), 144 deletions(-) delete mode 100644 scripts/inject-param-groups.py diff --git a/Makefile b/Makefile index 7de5f6c9..6f0d7bd2 100644 --- a/Makefile +++ b/Makefile @@ -12,14 +12,6 @@ format-black: update: ./scripts/update_swagger_spec.bash -# Inject parameter-group vendor extensions into the spec so the SDK templates -# emit grouped generate() methods. `update` runs this automatically after the -# fetch; this target re-applies it standalone (e.g. before regenerating without -# a re-fetch). Idempotent. -.PHONY: spec-param-groups -spec-param-groups: - python scripts/inject-param-groups.py spec/aspose-barcode-cloud.json - .PHONY: start-release start-release: ./scripts/start-release.bash diff --git a/scripts/inject-param-groups.py b/scripts/inject-param-groups.py deleted file mode 100644 index 5eb0ccdf..00000000 --- a/scripts/inject-param-groups.py +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env python3 -"""Inject parameter-group metadata into the Generate (GET) operation of the spec. - -The barcode ``generate`` GET operation declares ~30 flat query parameters, so the -generated SDK method takes ~30 arguments. This script tags each query parameter -that belongs to one of the ``*Params`` groups (BarcodeImageParams, QrParams, -Pdf417Params, Code128Params) -- the same grouping the ``GenerateParams`` body -model already uses -- so the per-language ``api.mustache`` templates can emit a -method that accepts the four grouped objects instead of the flat list, while -still serialising the values into the unchanged flat query string. - -The mapping is derived from the spec itself (the properties of the four -``*Params`` sub-schemas), so it stays correct as the API evolves. ``data`` and -``dataType`` are intentionally left ungrouped. The script is idempotent. - -Vendor extensions are legal per the OpenAPI Specification, section -"Specification Extensions": https://spec.openapis.org/oas/v3.0.4.html#specification-extensions -""" -import argparse -import json -import re -import typing -from pathlib import Path - -GENERATE_PATH: typing.Final = "/barcode/generate/{barcodeType}" -GROUP_CONTAINER_SCHEMA: typing.Final = "GenerateParams" -GROUP_TYPE_SUFFIX: typing.Final = "Params" -_CAMEL_BOUNDARY: typing.Final = re.compile(r"(? str: - return _CAMEL_BOUNDARY.sub("_", name).lower() - - -def camel_to_pascal(name: str) -> str: - return name[:1].upper() + name[1:] - - -def resolve_type(schema: typing.Dict[str, typing.Any]) -> str: - if "$ref" in schema: - return schema["$ref"].split("/")[-1] - if "allOf" in schema and schema["allOf"] and "$ref" in schema["allOf"][0]: - return schema["allOf"][0]["$ref"].split("/")[-1] - if "type" in schema: - return schema["type"] - return "" - - -def build_field_to_group( - schemas: typing.Dict[str, typing.Any], -) -> typing.Tuple[ - typing.Dict[str, typing.Dict[str, str]], typing.List[typing.Dict[str, str]] -]: - """Return (field name -> group) and the ordered list of groups. - - A group is any ``GenerateParams`` property whose type name ends with - ``Params`` (this excludes ``barcodeType`` and ``encodeData``). - """ - container = schemas[GROUP_CONTAINER_SCHEMA]["properties"] - groups: typing.List[typing.Dict[str, str]] = [] - field_to_group: typing.Dict[str, typing.Dict[str, str]] = {} - for prop_name, prop_schema in container.items(): - type_name = resolve_type(prop_schema) - if not type_name.endswith(GROUP_TYPE_SUFFIX): - continue - group = { - "camel": prop_name, - "snake": camel_to_snake(prop_name), - "pascal": camel_to_pascal(prop_name), - "type": type_name, - } - groups.append(group) - for field_name in schemas[type_name]["properties"]: - field_to_group[field_name] = group - return field_to_group, groups - - -def inject(spec: typing.Dict[str, typing.Any]) -> int: - """Tag the Generate GET query params in place; return the number tagged.""" - schemas = spec["components"]["schemas"] - field_to_group, groups = build_field_to_group(schemas) - - operation = spec["paths"][GENERATE_PATH]["get"] - operation["x-param-groups"] = groups - operation["x-has-param-groups"] = True - - tagged = 0 - for parameter in operation["parameters"]: - if parameter["in"] != "query": - continue - name = parameter["name"] - if name not in field_to_group: - continue - group = field_to_group[name] - parameter["x-param-group-snake"] = group["snake"] - parameter["x-param-group-camel"] = group["camel"] - parameter["x-param-group-pascal"] = group["pascal"] - parameter["x-param-group-type"] = group["type"] - tagged += 1 - return tagged - - -def main() -> None: - parser = argparse.ArgumentParser( - description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter - ) - parser.add_argument("input", type=Path, help="OpenAPI spec JSON to read") - parser.add_argument( - "output", - type=Path, - nargs="?", - help="Where to write the augmented spec (defaults to in-place)", - ) - args = parser.parse_args() - - spec = json.loads(args.input.read_text(encoding="utf-8")) - tagged = inject(spec) - destination = args.output if args.output is not None else args.input - destination.write_text( - json.dumps(spec, indent=2, ensure_ascii=False) + "\n", encoding="utf-8" - ) - group_count = len(spec["paths"][GENERATE_PATH]["get"]["x-param-groups"]) - print(f"Tagged {tagged} query params across {group_count} groups -> {destination}") - - -if __name__ == "__main__": - main() diff --git a/scripts/update_swagger_spec.bash b/scripts/update_swagger_spec.bash index f7e94246..3d52523d 100755 --- a/scripts/update_swagger_spec.bash +++ b/scripts/update_swagger_spec.bash @@ -5,9 +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 - -# Re-apply codegen parameter-group metadata (vendor extensions consumed by the -# api.mustache templates to emit grouped generate() methods). A fresh fetch from -# the server does not include them; the injection is idempotent. -python scripts/inject-param-groups.py 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 0ba39ce3..1ae81a7a 100644 --- a/spec/aspose-barcode-cloud.json +++ b/spec/aspose-barcode-cloud.json @@ -2887,7 +2887,7 @@ "flows": { "clientCredentials": { "tokenUrl": "https://id.aspose.cloud/connect/token", - "scopes": {} + "scopes": { } } } } @@ -2895,7 +2895,7 @@ }, "security": [ { - "JWT": [] + "JWT": [ ] } ] -} +} \ No newline at end of file From af98105b0a91f66cd0e34e34cd3d9901ad10b069 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 19:56:35 +0700 Subject: [PATCH 28/29] Ignore .example domains in the URL checker Add the reserved .example TLD to the URL checker's ignore list; also apply isort/black formatting. --- scripts/check-urls.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/check-urls.py b/scripts/check-urls.py index 28d77a93..cda253e0 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,7 +27,10 @@ "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]] = [ @@ -50,6 +53,7 @@ ".curl.se", ".dart.dev", ".dartlang.org", + ".example", ".getcomposer.org", ".go.dev", ".golang.org", @@ -62,8 +66,8 @@ ".mvnrepository.com", ".nodejs.org", ".npmjs.com", - ".openapi-generator.tech", ".nuget.org", + ".openapi-generator.tech", ".opensource.org", ".packagist.org", ".php.net", From 65db1853dc11708a9060fae9adcffd17a3623d38 Mon Sep 17 00:00:00 2001 From: Denis Averin Date: Thu, 2 Jul 2026 20:06:38 +0700 Subject: [PATCH 29/29] Ignore incorrect URLs from tests --- scripts/check-urls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/check-urls.py b/scripts/check-urls.py index cda253e0..76b7a9be 100644 --- a/scripts/check-urls.py +++ b/scripts/check-urls.py @@ -41,6 +41,8 @@ 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/", ]