Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions projects/ngx-json-schema-viewer/src/lib/services/jsv-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ export type JSVOptions = {
* @default ["nullable","deprecated","readOnly","writeOnly","enum","stringLength","objectProperties","no-extra-properties","arrayItems","arrayContains","no-extra-items","number-range","pattern","multipleOf","uniqueItems","contentEncoding","contentMediaType","contentSchema","default","const","examples"]
*/
qualifierMessagesOrder: CheckKey[]
/**
* Defines how deep the schema should be expanded by default
* Examples:
* - 0: only the root level is expanded
* - 1: root level and its direct children are expanded
* - Infinity: expand all levels
* @default 0
* @min 0
*/
defaultExpandDepth: number
}

// Define an InjectionToken for JSVOptions
Expand Down Expand Up @@ -72,7 +82,8 @@ export class JSVOptionsService {
"default",
"const",
"examples"
]
],
defaultExpandDepth: 0
}
// Apply user provided options
this.setOptions(userOptions);
Expand All @@ -89,4 +100,4 @@ export class JSVOptionsService {
return this.options;
}

}
}