Skip to content

Commit 4a4b8bc

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.29.0
1 parent dac062e commit 4a4b8bc

File tree

6 files changed

+39
-20
lines changed

6 files changed

+39
-20
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,12 @@ Based on:
398398
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
399399
- Speakeasy CLI 1.27.0 (2.24.0) https://github.com/speakeasy-api/speakeasy
400400
### Releases
401-
- [NPM v1.22.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.22.0 - .
401+
- [NPM v1.22.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.22.0 - .
402+
403+
## 2023-05-05 00:10:23
404+
### Changes
405+
Based on:
406+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
407+
- Speakeasy CLI 1.29.0 (2.26.0) https://github.com/speakeasy-api/speakeasy
408+
### Releases
409+
- [NPM v1.23.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.23.0 - .

gen.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 2bba3b8f9d211b02569b3f9aff0d34b4
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.27.0
6-
generationVersion: 2.24.0
5+
speakeasyVersion: 1.29.0
6+
generationVersion: 2.26.0
77
generation:
88
telemetryEnabled: true
99
sdkClassName: speakeasy
1010
singleTagPerOp: false
1111
typescript:
12-
version: 1.22.0
12+
version: 1.23.0
1313
author: Speakeasy
14+
maxMethodParams: 0
1415
packageName: '@speakeasy-api/speakeasy-client-sdk-typescript'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@speakeasy-api/speakeasy-client-sdk-typescript",
3-
"version": "1.22.0",
3+
"version": "1.23.0",
44
"author": "Speakeasy",
55
"scripts": {
66
"prepare": "tsc --build"

src/internal/utils/queryparams.ts

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
import { parseParamDecorator, populateFromGlobals, valToString } from "./utils";
5+
import {ParamDecorator, parseParamDecorator, populateFromGlobals, valToString} from "./utils";
66

7-
import { requestMetadataKey } from "./requestbody";
8-
import { ParamDecorator } from "./utils";
7+
import {requestMetadataKey} from "./requestbody";
98

109
export const qpMetadataKey = "queryParam";
1110
const queryStringPrefix = "?";
@@ -34,7 +33,7 @@ export function serializeQueryParams(queryParams: any, globals?: any): string {
3433
fname
3534
);
3635

37-
if (!qpAnn) return { serialize: () => "" };
36+
if (!qpAnn) return {serialize: () => ""};
3837

3938
const qpDecorator: ParamDecorator = parseParamDecorator(
4039
qpAnn,
@@ -49,27 +48,38 @@ export function serializeQueryParams(queryParams: any, globals?: any): string {
4948
value = populateFromGlobals(value, fname, "queryParam", globals);
5049

5150
if (qpDecorator.Serialization === "json")
52-
queryStringParts.push(jsonSerializer({ [qpDecorator.ParamName]: value }));
51+
queryStringParts.push(jsonSerializer({[qpDecorator.ParamName]: value}));
5352
else {
5453
switch (qpDecorator.Style) {
5554
case "deepObject":
5655
queryStringParts.push(
57-
deepObjectSerializer({ [qpDecorator.ParamName]: value })
56+
deepObjectSerializer({[qpDecorator.ParamName]: value})
5857
);
5958
return;
6059
case "form":
6160
if (!qpDecorator.Explode)
6261
queryStringParts.push(
63-
formSerializer({ [qpDecorator.ParamName]: value })
62+
noExplodeSerializer({[qpDecorator.ParamName]: value})
6463
);
6564
else
6665
queryStringParts.push(
67-
formSerializerExplode({ [qpDecorator.ParamName]: value })
66+
formSerializerExplode({[qpDecorator.ParamName]: value})
6867
);
6968
return;
69+
case "pipeDelimited":
70+
if (!qpDecorator.Explode) {
71+
queryStringParts.push(
72+
noExplodeSerializer({[qpDecorator.ParamName]: value}, "|")
73+
);
74+
} else {
75+
queryStringParts.push(
76+
formSerializerExplode({[qpDecorator.ParamName]: value})
77+
);
78+
}
79+
return;
7080
default:
7181
queryStringParts.push(
72-
formSerializerExplode({ [qpDecorator.ParamName]: value })
82+
formSerializerExplode({[qpDecorator.ParamName]: value})
7383
);
7484
}
7585
}
@@ -88,15 +98,15 @@ function jsonSerializer(params: Record<string, any>): string {
8898
}
8999

90100
// TODO: Add support for disabling percent encoding for reserved characters
91-
function formSerializer(params: Record<string, any>): string {
101+
function noExplodeSerializer(params: Record<string, any>, delimiter = ","): string {
92102
const query: string[] = [];
93103

94104
Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
95105
if (!value) return;
96106
if (value !== Object(value))
97107
query.push(`${key}=${encodeURIComponent(valToString(value))}`);
98108
else if (Array.isArray(value)) {
99-
const values: string = value.map((aValue) => aValue).join(",");
109+
const values: string = value.map((aValue) => aValue).join(delimiter);
100110

101111
query.push(`${key}=${encodeURIComponent(values)}`);
102112
} else {

src/sdk/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export class Speakeasy {
8181
public _securityClient: AxiosInstance;
8282
public _serverURL: string;
8383
private _language = "typescript";
84-
private _sdkVersion = "1.22.0";
85-
private _genVersion = "2.24.0";
84+
private _sdkVersion = "1.23.0";
85+
private _genVersion = "2.26.0";
8686
private _globals: any;
8787

8888
constructor(props?: SDKProps) {

0 commit comments

Comments
 (0)