From ef3b60f71234cddc13e594744708812f31246390 Mon Sep 17 00:00:00 2001 From: dsinghvi Date: Thu, 29 Feb 2024 09:41:32 -0500 Subject: [PATCH] (chore): support undiscriminated union example generation --- .../GeneratedUndiscriminatedUnionTypeImpl.ts | 2 ++ generators/typescript/sdk/CHANGELOG.md | 6 ++++++ generators/typescript/sdk/VERSION | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts b/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts index e30e9b7c202..5b3e5d6f906 100644 --- a/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts @@ -26,6 +26,8 @@ export class GeneratedUndiscriminatedUnionTypeImpl } public buildExample(): ts.Expression { + + throw new Error("Examples are not supported for undiscriminated unions"); } } diff --git a/generators/typescript/sdk/CHANGELOG.md b/generators/typescript/sdk/CHANGELOG.md index 6492c13553f..ed4ded5ac05 100644 --- a/generators/typescript/sdk/CHANGELOG.md +++ b/generators/typescript/sdk/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.12.3-rc0] - 2024-02-27 + +- Fix: Previously SDK code snippets would not support generation with undiscriminated + unions. Now, it does. + + ## [0.12.2] - 2024-02-27 - Fix: Previously SDK code snippets would not take into account default parameter values diff --git a/generators/typescript/sdk/VERSION b/generators/typescript/sdk/VERSION index 26acbf080be..420b4fc2591 100644 --- a/generators/typescript/sdk/VERSION +++ b/generators/typescript/sdk/VERSION @@ -1 +1 @@ -0.12.2 +0.12.3-rc0