Skip to content

Commit b0a4069

Browse files
ballerina-botballerina-botTharmiganK
authored
[Automated] Regenerate OpenAPI Connector (#16)
Co-authored-by: ballerina-bot <ballerina-bot@ballerina.org> Co-authored-by: Krishnananthalingam Tharmigan <63336800+TharmiganK@users.noreply.github.com>
1 parent 80d1dba commit b0a4069

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/regenerate-connector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
additional-flatten-flags: ${{ inputs.additional-flatten-flags }}
6161
align-openapi: ${{ inputs.align-openapi }}
6262
additional-align-flags: ${{ inputs.additional-align-flags }}
63-
additional-generation-flags: ${{ inputs.additional-generation-flags }}
63+
additional-generation-flags: '--client-methods remote ${{ inputs.additional-generation-flags }}'
6464
distribution-zip: ${{ inputs.distribution-zip }}
6565
auto-merge: ${{ inputs.auto-merge }}
6666
ballerina-version: ${{ inputs.ballerina-version }}

ballerina/client.bal

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// specific language governing permissions and limitations
1818
// under the License.
1919

20+
import ballerina/data.jsondata;
2021
import ballerina/http;
2122

2223
public isolated client class Client {
@@ -69,7 +70,7 @@ public isolated client class Client {
6970
}
7071
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
7172
http:Request request = new;
72-
json jsonBody = payload.toJson();
73+
json jsonBody = jsondata:toJson(payload);
7374
request.setPayload(jsonBody, "application/json");
7475
return self.clientEp->put(resourcePath, request, httpHeaders);
7576
}
@@ -121,7 +122,7 @@ public isolated client class Client {
121122
resourcePath = resourcePath + check getPathForQueryParam(queries);
122123
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
123124
http:Request request = new;
124-
json jsonBody = payload.toJson();
125+
json jsonBody = jsondata:toJson(payload);
125126
request.setPayload(jsonBody, "application/json");
126127
return self.clientEp->put(resourcePath, request, httpHeaders);
127128
}
@@ -138,7 +139,7 @@ public isolated client class Client {
138139
}
139140
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
140141
http:Request request = new;
141-
json jsonBody = payload.toJson();
142+
json jsonBody = jsondata:toJson(payload);
142143
request.setPayload(jsonBody, "application/json");
143144
return self.clientEp->post(resourcePath, request, httpHeaders);
144145
}
@@ -155,7 +156,7 @@ public isolated client class Client {
155156
}
156157
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
157158
http:Request request = new;
158-
json jsonBody = payload.toJson();
159+
json jsonBody = jsondata:toJson(payload);
159160
request.setPayload(jsonBody, "application/json");
160161
return self.clientEp->put(resourcePath, request, httpHeaders);
161162
}
@@ -173,7 +174,7 @@ public isolated client class Client {
173174
}
174175
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
175176
http:Request request = new;
176-
json jsonBody = payload.toJson();
177+
json jsonBody = jsondata:toJson(payload);
177178
request.setPayload(jsonBody, "application/json");
178179
return self.clientEp->put(resourcePath, request, httpHeaders);
179180
}
@@ -241,7 +242,7 @@ public isolated client class Client {
241242
}
242243
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
243244
http:Request request = new;
244-
json jsonBody = payload.toJson();
245+
json jsonBody = jsondata:toJson(payload);
245246
request.setPayload(jsonBody, "application/json");
246247
return self.clientEp->post(resourcePath, request, httpHeaders);
247248
}
@@ -359,7 +360,7 @@ public isolated client class Client {
359360
}
360361
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
361362
http:Request request = new;
362-
json jsonBody = payload.toJson();
363+
json jsonBody = jsondata:toJson(payload);
363364
request.setPayload(jsonBody, "application/json");
364365
return self.clientEp->post(resourcePath, request, httpHeaders);
365366
}
@@ -392,7 +393,7 @@ public isolated client class Client {
392393
}
393394
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
394395
http:Request request = new;
395-
json jsonBody = payload.toJson();
396+
json jsonBody = jsondata:toJson(payload);
396397
request.setPayload(jsonBody, "application/json");
397398
return self.clientEp->post(resourcePath, request, httpHeaders);
398399
}
@@ -457,7 +458,7 @@ public isolated client class Client {
457458
}
458459
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
459460
http:Request request = new;
460-
json jsonBody = payload.toJson();
461+
json jsonBody = jsondata:toJson(payload);
461462
request.setPayload(jsonBody, "application/json");
462463
return self.clientEp->put(resourcePath, request, httpHeaders);
463464
}

0 commit comments

Comments
 (0)