Skip to content

Commit c93c757

Browse files
authored
Updated Json Schema which includes cache property (#2011)
## Why this change? This change follows up on #1865, which adds caching support. VSCode suggesting the new `cache` properties were errors when included in the config file. That is because the properties needed to be added to the json schema. Global `cache` property in the `runtime` section which adjacent to `rest`, `graphql`, and `host`. ```json { "runtime": { "cache": { "enabled": false, "ttl-seconds": 5 } } } ``` and per entity alongside `source`, `graphql`, `rest`, and `permissions` ```json { "myEntity": { "cache": { "enabled": false, "ttl-seconds": 5 } } } ```
1 parent 19afe75 commit c93c757

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

schemas/dab.draft.schema.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,22 @@
236236
}
237237
}
238238
}
239+
},
240+
"cache": {
241+
"type": "object",
242+
"additionalProperties": false,
243+
"properties": {
244+
"enabled": {
245+
"type": "boolean",
246+
"description": "Enable caching of responses globally.",
247+
"default": false
248+
},
249+
"ttl-seconds": {
250+
"type": "integer",
251+
"description": "Time to live in seconds",
252+
"default": 5
253+
}
254+
}
239255
}
240256
}
241257
},
@@ -465,6 +481,22 @@
465481
]
466482
}
467483
}
484+
},
485+
"cache": {
486+
"type": "object",
487+
"additionalProperties": false,
488+
"properties": {
489+
"enabled": {
490+
"type": "boolean",
491+
"description": "Enable caching of responses for this entity.",
492+
"default": false
493+
},
494+
"ttl-seconds": {
495+
"type": "integer",
496+
"description": "Time to live in seconds",
497+
"default": 5
498+
}
499+
}
468500
}
469501
},
470502
"if": {

0 commit comments

Comments
 (0)