diff --git a/packages/cli/cli/CHANGELOG.md b/packages/cli/cli/CHANGELOG.md index df3988a479a..4aa03661f1d 100644 --- a/packages/cli/cli/CHANGELOG.md +++ b/packages/cli/cli/CHANGELOG.md @@ -5,6 +5,28 @@ 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.39.17] - 2024-08-21 + +- Fix: Previously, object declarations with extends and no properties did not have examples + propagating in the Docs and SDKs. The core issue was in IR generation which has now + been resolved. + + The following will now work as expected: + + ```yaml + types: + + ObjectWithNoProperties: + extends: + - ParentA + - ParentB + examples: + - name: Default + value: + propertyFromParentA: foo + propertyFromParentB: bar + ``` + ## [0.39.16] - 2024-08-21 - Chore: Support running 0.2.x versions of the Postman Generator with IR V53 or above. diff --git a/packages/cli/cli/VERSION b/packages/cli/cli/VERSION index 669d120867a..1ec2611ef75 100644 --- a/packages/cli/cli/VERSION +++ b/packages/cli/cli/VERSION @@ -1 +1 @@ -0.39.16 +0.39.17 diff --git a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertExampleType.ts b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertExampleType.ts index b0b4d55b49f..3321b050d2d 100644 --- a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertExampleType.ts +++ b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertExampleType.ts @@ -478,7 +478,7 @@ function convertObject({ } return ExampleTypeShape.object({ properties: - rawObject.properties != null + rawObject.properties != null || rawObject.extends != null ? Object.entries(example).reduce( (exampleProperties, [wireKey, propertyExample]) => { const originalTypeDeclaration = getOriginalTypeDeclarationForProperty({ diff --git a/seed/ts-sdk/seed.yml b/seed/ts-sdk/seed.yml index 8303e6561fa..4417d42883c 100644 --- a/seed/ts-sdk/seed.yml +++ b/seed/ts-sdk/seed.yml @@ -13,7 +13,8 @@ local: env: NODE_ENV: test customFixtureConfig: - generateWireTests: true + customConfig: + generateWireTests: true fixtures: imdb: - customConfig: null