Skip to content

Commit 147d218

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.32.0
1 parent 503c6ca commit 147d218

File tree

7 files changed

+30
-18
lines changed

7 files changed

+30
-18
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,12 @@ Based on:
446446
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
447447
- Speakeasy CLI 1.31.1 (2.27.0) https://github.com/speakeasy-api/speakeasy
448448
### Releases
449-
- [NPM v1.24.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.24.0 - .
449+
- [NPM v1.24.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.24.0 - .
450+
451+
## 2023-05-16 00:10:52
452+
### Changes
453+
Based on:
454+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
455+
- Speakeasy CLI 1.32.0 (2.28.0) https://github.com/speakeasy-api/speakeasy
456+
### Releases
457+
- [NPM v1.25.0] https://www.npmjs.com/package/@speakeasy-api/speakeasy-client-sdk-typescript/v/1.25.0 - .

gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 2bba3b8f9d211b02569b3f9aff0d34b4
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.31.1
6-
generationVersion: 2.27.0
5+
speakeasyVersion: 1.32.0
6+
generationVersion: 2.28.0
77
generation:
8-
telemetryEnabled: true
98
sdkClassName: speakeasy
109
singleTagPerOp: false
10+
telemetryEnabled: true
1111
typescript:
12-
version: 1.24.0
12+
version: 1.25.0
1313
author: Speakeasy
1414
maxMethodParams: 0
1515
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.24.0",
3+
"version": "1.25.0",
44
"author": "Speakeasy",
55
"scripts": {
66
"prepare": "tsc --build"

src/internal/utils/queryparams.ts

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

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

77
import {requestMetadataKey} from "./requestbody";
88

@@ -102,7 +102,7 @@ function noExplodeSerializer(params: Record<string, any>, delimiter = ","): stri
102102
const query: string[] = [];
103103

104104
Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
105-
if (!value) return;
105+
if (!shouldQueryParamSerialize(value)) return;
106106
if (value !== Object(value))
107107
query.push(`${key}=${encodeURIComponent(valToString(value))}`);
108108
else if (Array.isArray(value)) {
@@ -141,7 +141,7 @@ function formSerializerExplode(params: Record<string, any>): string {
141141
const query: string[] = [];
142142

143143
Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
144-
if (!value) return;
144+
if (!shouldQueryParamSerialize(value)) return;
145145
if (value !== Object(value))
146146
query.push(`${key}=${encodeURIComponent(value)}`);
147147
else if (Array.isArray(value)) {
@@ -184,7 +184,7 @@ function deepObjectSerializer(params: Record<string, any>): string {
184184
const query: string[] = [];
185185

186186
Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
187-
if (!value) return;
187+
if (!shouldQueryParamSerialize(value)) return;
188188
if (value !== Object(value))
189189
query.push(`${key}=${encodeURIComponent(value)}`);
190190
else if (Array.isArray(value)) {

src/internal/utils/utils.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
import "reflect-metadata";
66

7-
import { getSimplePathParams, ppMetadataKey } from "./pathparams";
7+
import {getSimplePathParams, ppMetadataKey} from "./pathparams";
88

9-
import { plainToInstance } from "class-transformer";
10-
import { RFCDate } from "../../sdk/types";
11-
import { requestMetadataKey } from "./requestbody";
9+
import {plainToInstance} from "class-transformer";
10+
import {RFCDate} from "../../sdk/types";
11+
import {requestMetadataKey} from "./requestbody";
1212

1313
export const SerializationMethodToContentType: Record<string, string> = {
1414
json: "application/json",
@@ -396,3 +396,7 @@ export function valToString(value: any): string {
396396

397397
return value.toString();
398398
}
399+
400+
export function shouldQueryParamSerialize(value: any): boolean {
401+
return !(value === undefined || value === null || value === "")
402+
}

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.24.0";
85-
private _genVersion = "2.27.0";
84+
private _sdkVersion = "1.25.0";
85+
private _genVersion = "2.28.0";
8686
private _globals: any;
8787

8888
constructor(props?: SDKProps) {

0 commit comments

Comments
 (0)