Skip to content

Commit

Permalink
fix(docs): show additionalProperties in json notation (#30549)
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh authored Aug 2, 2024
1 parent 7143d6d commit d7989b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/docs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d7989b0

Please sign in to comment.