Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
702 changes: 321 additions & 381 deletions ballerina/client.bal

Large diffs are not rendered by default.

867 changes: 425 additions & 442 deletions ballerina/types.bal

Large diffs are not rendered by default.

27 changes: 6 additions & 21 deletions ballerina/utils.bal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
//
// WSO2 LLC. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
Expand All @@ -17,6 +17,7 @@
// specific language governing permissions and limitations
// under the License.

import ballerina/http;
import ballerina/url;

type SimpleBasicType string|boolean|int|float|decimal;
Expand Down Expand Up @@ -186,12 +187,13 @@ isolated function getEncodedUri(anydata value) returns string {
# + encodingMap - Details on serialization mechanism
# + return - Returns generated Path or error at failure of client initialization
isolated function getPathForQueryParam(map<anydata> queryParam, map<Encoding> encodingMap = {}) returns string|error {
map<anydata> queriesMap = http:getQueryMap(queryParam);
string[] param = [];
if queryParam.length() > 0 {
if queriesMap.length() > 0 {
param.push("?");
foreach var [key, value] in queryParam.entries() {
foreach var [key, value] in queriesMap.entries() {
if value is () {
_ = queryParam.remove(key);
_ = queriesMap.remove(key);
continue;
}
Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding;
Expand All @@ -215,20 +217,3 @@ isolated function getPathForQueryParam(map<anydata> queryParam, map<Encoding> en
string restOfPath = string:'join("", ...param);
return restOfPath;
}

# Generate header map for given header values.
#
# + headerParam - Headers map
# + return - Returns generated map or error at failure of client initialization
isolated function getMapForHeaders(map<anydata> headerParam) returns map<string|string[]> {
map<string|string[]> headerMap = {};
foreach var [key, value] in headerParam.entries() {
if value is SimpleBasicType[] {
headerMap[key] = from SimpleBasicType data in value
select data.toString();
} else {
headerMap[key] = value.toString();
}
}
return headerMap;
}
Loading
Loading