Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9eee3b4
Update codegen for API 26.6
TimurBaiguskarovAspose Jun 10, 2026
9e026b7
Fix Java wrapper import template
TimurBaiguskarovAspose Jun 11, 2026
14d6b8d
Ignore release tag URLs in URL check
TimurBaiguskarovAspose Jun 11, 2026
a969eb1
Release 26.6
TimurBaiguskarovAspose Jun 18, 2026
b6b8270
Split generate params into groups
Denis-Averin Jun 22, 2026
d7506fa
Update spec
ivankamkin Jun 22, 2026
759f925
Dart templates fixed for new spec
ivankamkin Jun 24, 2026
c9b1d2a
Fixed dotnet templates
ivankamkin Jun 24, 2026
be04516
Templates fixed for new spec
ivankamkin Jun 24, 2026
c6ba7a4
Fix java template
ivankamkin Jun 24, 2026
9c489d4
Fix node template
ivankamkin Jun 24, 2026
05d4370
Fix php templates
ivankamkin Jun 24, 2026
05bdcfc
Fix python templates
ivankamkin Jun 24, 2026
8bb46b1
Fix swift template
ivankamkin Jun 24, 2026
c488c9b
Update java template
ivankamkin Jun 30, 2026
1feb8f3
Fix Java templates
Denis-Averin Jun 30, 2026
35884fc
Update Swift templates
Denis-Averin Jun 30, 2026
eddc240
Fix Swift templates again
Denis-Averin Jun 30, 2026
6b716c5
Add .spi.yml for Swift
Denis-Averin Jul 1, 2026
753c4a5
Generate the Node.js SDK in a single openapi-generator run
Denis-Averin Jul 2, 2026
0cd977f
Emit Java, .NET, and Go SDK support files via the files config
Denis-Averin Jul 2, 2026
f095b81
Rework the Android SDK templates for the files config and grouped API
Denis-Averin Jul 2, 2026
e9b97c4
Point the Go SDK badges at the v4 module and branch
Denis-Averin Jul 2, 2026
0eaa7b8
Drop dead boilerplate from the Go SDK utils.go template
Denis-Averin Jul 2, 2026
c656dd5
Restrict the CI badge branch check to main or v4
Denis-Averin Jul 2, 2026
3e9c3ef
Update submodules
Denis-Averin Jul 2, 2026
ea2df2d
Refresh the spec from the live API and drop inject-param-groups
Denis-Averin Jul 2, 2026
af98105
Ignore .example domains in the URL checker
Denis-Averin Jul 2, 2026
65db185
Ignore incorrect URLs from tests
Denis-Averin Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
32 changes: 19 additions & 13 deletions codegen/Templates/android/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://dashboard.aspose.cloud/applications>
- Go to `app/src/main/java/com/aspose/barcode/cloud/demo_app/MainActivity.kt` and set your `clientId` and `clientSecret` from <https://dashboard.aspose.cloud/applications>.

- 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
Expand Down
38 changes: 30 additions & 8 deletions codegen/Templates/csharp/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,22 @@ namespace {{packageName}}.Api
/// <summary>
/// {{summary}} {{notes}}
/// </summary>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param>
{{#allParams}}
{{^vendorExtensions.x-param-group-camel}}
/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param>
{{/vendorExtensions.x-param-group-camel}}
{{/allParams}}
{{#vendorExtensions.x-param-groups}}
/// <param name="{{camel}}">Grouped parameters of type {{type}} (optional)</param>
{{/vendorExtensions.x-param-groups}}
/// <param name="cancellationToken"></param>
/// <returns>
/// A task that represents the asynchronous operation. {{#returnType}}Task result type is <see cref="{{returnType}}" /> {{/returnType}}
/// </returns>
{{#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)
Expand All @@ -87,17 +93,22 @@ namespace {{packageName}}.Api
.Replace("&amp;", "&")
.Replace("/?", "?");
{{#headerParams}}
{{#-first}}Dictionary<string, string> headerParams = new Dictionary<string, string>();{{/-first}}
{{#-first}}
Dictionary<string, string> headerParams = new Dictionary<string, string>();
{{/-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}}
Expand All @@ -113,14 +124,25 @@ namespace {{packageName}}.Api
{{/isPrimitiveType}}
{{/isFile}}
{{^isEnum}} } {{/isEnum}} {{#isEnum}}{{^required}} } {{/required}}{{/isEnum}}
{{/vendorExtensions.x-param-group-camel}}
{{#vendorExtensions.x-param-group-camel}}
if ({{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}} != null)
{
multipartContent.Add(new StringContent($"{ {{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}} }"), "{{paramName}}");
}
{{/vendorExtensions.x-param-group-camel}}
{{/formParams}}
{{#pathParams}}
resourcePath = UrlHelper.AddPathParameter(resourcePath, "{{paramName}}", {{paramName}});
{{/pathParams}}
{{#queryParams}}
{{#-first}}#pragma warning disable CS0618 // Type or member is obsolete{{/-first}}
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{paramName}});
{{#-last}}#pragma warning restore CS0618 // Type or member is obsolete{{/-last}}
{{#-first}}
#pragma warning disable CS0618 // Type or member is obsolete
{{/-first}}
{{^vendorExtensions.x-param-group-camel}}resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{paramName}});{{/vendorExtensions.x-param-group-camel}}{{#vendorExtensions.x-param-group-camel}}resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{{paramName}}", {{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}});{{/vendorExtensions.x-param-group-camel}}
{{#-last}}
#pragma warning restore CS0618 // Type or member is obsolete
{{/-last}}
{{/queryParams}}
{{#hasBodyParam}}string postBody = SerializationHelper.Serialize({{bodyParam.paramName}}); // http body (model) parameter{{/hasBodyParam}}

Expand Down
7 changes: 5 additions & 2 deletions codegen/Templates/csharp/api_test.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ namespace {{packageName}}.Interfaces
/// </remarks>
/// <exception cref="{{packageName}}.Api.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}
/// <param name="{{paramName}}">{{description}}</param>
{{^vendorExtensions.x-param-group-camel}}/// <param name="{{paramName}}">{{description}}</param>{{/vendorExtensions.x-param-group-camel}}
{{/allParams}}
{{#vendorExtensions.x-param-groups}}
/// <param name="{{camel}}">Grouped parameters of type {{type}}</param>
{{/vendorExtensions.x-param-groups}}
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns>
{{#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}}
Expand Down
29 changes: 22 additions & 7 deletions codegen/Templates/dart/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}};

Expand All @@ -34,13 +34,20 @@ class {{classname}} {
final Map<String, String> headerParams = {};
final Map<String, String> formParams = {};
{{#queryParams}}
{{^vendorExtensions.x-param-group-camel}}
{{^required}}
if({{paramName}} != null) {
{{/required}}
queryParams.addAll(convertParametersForCollectionFormat("{{collectionFormat}}", "{{baseName}}", {{paramName}}));
{{^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}}
Expand All @@ -52,7 +59,9 @@ class {{classname}} {

{{#hasFormParams}}
MultipartRequestPlus mp = MultipartRequestPlus('{{httpMethod}}', Uri.parse(requestPath));
{{#formParams}}{{^isFile}}
{{#formParams}}
{{^vendorExtensions.x-param-group-camel}}
{{^isFile}}
if ({{paramName}} != null) {
{{#isCollectionFormatMulti}}
final List<String> stringValues = {{paramName}}.map((i) => parameterToString(i)).toList();
Expand All @@ -62,8 +71,8 @@ class {{classname}} {
mp.fields['{{baseName}}'] = [parameterToString({{paramName}})];
{{/isCollectionFormatMulti}}
}
{{/isFile}}{{#isFile}}

{{/isFile}}
{{#isFile}}
{{#required}}
mp.files.add(MultipartFile.fromBytes("{{paramName}}", {{paramName}}Bytes.toList(), filename: "somefile.xyz"));
{{/required}}
Expand All @@ -72,10 +81,16 @@ class {{classname}} {
mp.files.add(MultipartFile.fromBytes("{{paramName}}", {{paramName}}Bytes.toList(), filename: "somefile.xyz"));
}
{{/required}}

{{/isFile}}{{/formParams}}
{{/isFile}}
{{/vendorExtensions.x-param-group-camel}}
{{#vendorExtensions.x-param-group-camel}}
if ({{vendorExtensions.x-param-group-camel}}?.{{paramName}} != null) {
mp.fields['{{baseName}}'] = [parameterToString({{vendorExtensions.x-param-group-camel}}!.{{paramName}})];
}
{{/vendorExtensions.x-param-group-camel}}
{{/formParams}}
postBody = mp;

{{/hasFormParams}}

final response = await _apiClient.invokeAPI(requestPath,
Expand Down
4 changes: 2 additions & 2 deletions codegen/Templates/go/README.mustache
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down
23 changes: 21 additions & 2 deletions codegen/Templates/go/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand Down Expand Up @@ -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());
Expand All @@ -120,6 +122,14 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
queryParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/isCollectionFormatMulti}}
}
{{/vendorExtensions.x-param-group-pascal}}
{{#vendorExtensions.x-param-group-pascal}}
if optionals != nil && optionals.{{vendorExtensions.x-param-group-pascal}}.IsSet() {
if {{paramName}}Value := optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}; !reflect.ValueOf({{paramName}}Value).IsZero() {
queryParams.Add("{{baseName}}", parameterToString({{paramName}}Value, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
}
{{/vendorExtensions.x-param-group-pascal}}
{{/required}}
{{/queryParams}}
{{/hasQueryParams}}
Expand Down Expand Up @@ -195,6 +205,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
formParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/required}}
{{^required}}
{{^vendorExtensions.x-param-group-pascal}}
if optionals != nil && optionals.{{vendorExtensions.x-export-param-name}}.IsSet() {
{{#isCollectionFormatMulti}}
values := reflect.ValueOf(optionals.{{vendorExtensions.x-export-param-name}}.Value());
Expand All @@ -207,6 +218,14 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
formParams.Add("{{baseName}}", parameterToString(optionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/isCollectionFormatMulti}}
}
{{/vendorExtensions.x-param-group-pascal}}
{{#vendorExtensions.x-param-group-pascal}}
if optionals != nil && optionals.{{vendorExtensions.x-param-group-pascal}}.IsSet() {
if {{paramName}}Value := optionals.{{vendorExtensions.x-param-group-pascal}}.Value().({{vendorExtensions.x-param-group-type}}).{{vendorExtensions.x-export-param-name}}; !reflect.ValueOf({{paramName}}Value).IsZero() {
formParams.Add("{{baseName}}", parameterToString({{paramName}}Value, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
}
{{/vendorExtensions.x-param-group-pascal}}
{{/required}}
{{/isFile}}
{{/formParams}}
Expand Down
2 changes: 2 additions & 0 deletions codegen/Templates/go/utils.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{>partial_header}}
package {{packageName}}
Loading