chore(schema): update definitions

This commit is contained in:
L. Yeung 2024-11-07 10:26:26 +08:00 committed by Jan De Dobbeleer
parent 86291dc6bc
commit 9100d702c4

View file

@ -141,6 +141,12 @@
"description": "Custom glyph/text for specific branches", "description": "Custom glyph/text for specific branches",
"default": {} "default": {}
}, },
"cache_duration": {
"type": "string",
"title": "Cache duration",
"description": "The duration for which the segment will be cached. This is parsed using the `time.ParseDuration` function from the Go standard library (see https://pkg.go.dev/time#ParseDuration for details).",
"pattern": "^(infinite|([0-9]+(h|m|s))+)$"
},
"extra_prompt": { "extra_prompt": {
"type": "object", "type": "object",
"default": {}, "default": {},
@ -489,9 +495,7 @@
"default": {}, "default": {},
"properties": { "properties": {
"duration": { "duration": {
"type": "string", "$ref": "#/definitions/cache_duration"
"title": "Cache duration",
"pattern": "^(infinite)|([0-9])+(s|m|h)$"
}, },
"strategy": { "strategy": {
"type": "string", "type": "string",
@ -3902,7 +3906,17 @@
}, },
"then": { "then": {
"title": "Upgrade Segment", "title": "Upgrade Segment",
"description": "https://ohmyposh.dev/docs/segments/system/upgrade" "description": "https://ohmyposh.dev/docs/segments/system/upgrade",
"properties": {
"properties": {
"properties": {
"cache_duration": {
"$ref": "#/definitions/cache_duration",
"default": "168h"
}
}
}
}
} }
}, },
{ {