From 8f00632ece1c1d995e79af1165f751b13649b702 Mon Sep 17 00:00:00 2001 From: eden wang <64514273+eyw520@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:53:30 -0500 Subject: [PATCH] fix(cli): Increase max recursive depth allowed during example validation. (#5237) * Increase `MAX_RECURSION_DEPTH` from 16 -> 64. * Update changelog. * chore: update changelog * amend to 128 --------- Co-authored-by: eyw520 --- fern/pages/changelogs/cli/2024-11-21.mdx | 4 ++++ packages/cli/cli/versions.yml | 8 ++++++++ .../src/examples/validateTypeReferenceExample.ts | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 fern/pages/changelogs/cli/2024-11-21.mdx diff --git a/fern/pages/changelogs/cli/2024-11-21.mdx b/fern/pages/changelogs/cli/2024-11-21.mdx new file mode 100644 index 00000000000..fc091e87642 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-11-21.mdx @@ -0,0 +1,4 @@ +## 0.45.0-rc50 +**`(fix):`** Increase max recursive depth allowed for example validation. + + diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index 4f664baa3e9..b483a63bbdc 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,9 +1,17 @@ +- changelogEntry: + - summary: | + Increase max recursive depth allowed for example validation. + type: fix + irVersion: 53 + version: 0.45.0-rc50 + - changelogEntry: - summary: | Add 'list' to reserved keywords for use in PHP generator. type: fix irVersion: 53 version: 0.45.0-rc49 + - changelogEntry: - summary: | OAuth Client Credential Auth Scheme now supports the ability to optionally diff --git a/packages/cli/generation/ir-generator/src/examples/validateTypeReferenceExample.ts b/packages/cli/generation/ir-generator/src/examples/validateTypeReferenceExample.ts index 1c164a78e41..b2579b705e2 100644 --- a/packages/cli/generation/ir-generator/src/examples/validateTypeReferenceExample.ts +++ b/packages/cli/generation/ir-generator/src/examples/validateTypeReferenceExample.ts @@ -27,7 +27,7 @@ const UUID_REGEX = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA const RFC_3339_DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/; -const MAX_RECURSION_DEPTH = 16; +const MAX_RECURSION_DEPTH = 128; export function validateTypeReferenceExample({ rawTypeReference,