0.47.0

(feat): Add support for nullable properties. Users can now specify explicit null values for types that specify nullable properties like so:

1await client.users.update({ username: "john.doe", metadata: null });

0.46.11

(fix): Don’t double check whether an optional string literal alias (see example below) is a string when using serializer to build query string parameters.

1types:
2 LiteralAliasExample: literal<"MyLiteralValue">
3
4service:
5 endpoints:
6 foo:
7 path: /bar
8 method: POST
9 request:
10 name: FooBarRequest
11 query-parameters:
12 optional_alias_literal: optional<LiteralAliasExample>
1// before
2if (optionalAliasLiteral != null) {
3 _queryParams["optional_alias_literal"] = typeof serializers.LiteralAliasExample.jsonOrThrow(optionalAliasLiteral, {
4 unrecognizedObjectKeys: "strip",
5 }) === "string" ? serializers.LiteralAliasExample.jsonOrThrow(optionalAliasLiteral, {
6 unrecognizedObjectKeys: "strip",
7 }) : JSON.stringify(serializers.LiteralAliasExample.jsonOrThrow(optionalAliasLiteral, {
8 unrecognizedObjectKeys: "strip",
9 }));
10}
11
12// after
13if (optionalAliasLiteral != null) {
14 _queryParams["optional_alias_literal"] = serializers.LiteralAliasExample.jsonOrThrow(optionalAliasLiteral, {
15 unrecognizedObjectKeys: "strip",
16 });
17}

0.46.10

(fix): Use serialization layer to convert types to JSON strings when enabled.