From bff080447eeb7e2d1d884029afc298eb03074d8a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Oct 2026 03:21:55 +0000 Subject: [PATCH] test(downgrader): cover a plain branch in a tagged union beside a discriminator Adds a branch holding only annotations, with no `$ref`, to the tagged union test, so the `ref !== undefined` check in `convertTaggedBranch` is tested. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VVaw7RX2ewSBmP9PHTZdKD --- packages/downgrader/tests/v3.1-to-v3.0.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/downgrader/tests/v3.1-to-v3.0.test.ts b/packages/downgrader/tests/v3.1-to-v3.0.test.ts index 059404b..aeb43eb 100644 --- a/packages/downgrader/tests/v3.1-to-v3.0.test.ts +++ b/packages/downgrader/tests/v3.1-to-v3.0.test.ts @@ -1805,11 +1805,16 @@ describe('downgradeSchemaV31ToV30', () => { 'x-kind': 'a', }, { $ref: image, type: 'object' }, + { description: 'Any other block' }, ], discriminator, } as OpenAPIV3_1.SchemaObject), ).toEqual({ - [key]: [{ $ref: text }, { type: 'object', allOf: [{ $ref: image }] }], + [key]: [ + { $ref: text }, + { type: 'object', allOf: [{ $ref: image }] }, + { description: 'Any other block' }, + ], discriminator, }) }