chore: move default value to config.schema.yaml

This commit is contained in:
Lei Nelissen 2023-07-12 22:38:00 +02:00
parent cd92c46f31
commit 5f7212c769
2 changed files with 15 additions and 1 deletions

View File

@ -50,7 +50,6 @@ const config: Partial<MermaidConfig> = {
...defaultConfigJson.gantt,
tickInterval: undefined,
useWidth: undefined, // can probably be removed since `configKeys` already includes this
weekday: 'sunday', // the sane default is a monday, but it's set to sunday for legacy reasons
},
c4: {
...defaultConfigJson.c4,

View File

@ -1455,6 +1455,7 @@ $defs: # JSON Schema definition (maybe we should move these to a seperate file)
- axisFormat
- useMaxWidth
- topAxis
- weekday
properties:
titleTopMargin:
$ref: '#/$defs/GitGraphDiagramConfig/properties/titleTopMargin'
@ -1544,6 +1545,20 @@ $defs: # JSON Schema definition (maybe we should move these to a seperate file)
default: ''
# Allow any string for typescript backwards compatibility (fix in Mermaid v10)
tsType: 'string | "compact"'
weekday:
description: |
On which day a week-based interval should start
type: string
enum:
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
# the sane default is a monday, but it's set to sunday for legacy reasons
default: sunday
SequenceDiagramConfig:
title: Sequence Diagram Config