From d7989b0de840074d596fc1784e14e57467cf8a99 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh <rahultesnik@gmail.com> Date: Fri, 2 Aug 2024 14:02:03 +0530 Subject: [PATCH] fix(docs): show `additionalProperties` in json notation (#30549) --- tools/docs/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/docs/config.ts b/tools/docs/config.ts index cac650c710..ef900be70a 100644 --- a/tools/docs/config.ts +++ b/tools/docs/config.ts @@ -121,7 +121,10 @@ function genTable(obj: [string, string][], type: string, def: any): string { el[1] = `<code>${el[1]}</code>`; } // objects and arrays should be printed in JSON notation - if ((type === 'object' || type === 'array') && el[0] === 'default') { + if ( + (type === 'object' || type === 'array') && + (el[0] === 'default' || el[0] === 'additionalProperties') + ) { // only show array and object defaults if they are not null and are not empty if (Object.keys(el[1] ?? []).length === 0) { return; -- GitLab