refactor(status-page): apply review feedback on theme-fields backend
- StatusPage Mongoose model: import DEFAULT_STATUS_PAGE_THEME / DEFAULT_STATUS_PAGE_THEME_MODE from types/statusPage so the four sources of the default literal stay locked together - openapi.json: add explicit "default" alongside the enum on StatusPageTheme and StatusPageThemeMode component schemas; documentation already mentioned the defaults but the JSON didn't carry them - statusPageController: add JSDoc-style comments above withoutThemeFields and applyDefaultTheme spelling out the asymmetric strip-on-write / force-on-read semantics so the next reviewer doesn't have to re-derive the design
This commit is contained in:
1 parent
ad964446de
commit
5874efff3c
3 files changed
+18
-3
No files matched your search
@@ -3354,11 +3354,13 @@
|
||||
"StatusPageTheme": {
|
||||
"type": "string",
|
||||
"enum": ["refined", "modern", "bold", "editorial"],
|
||||
"default": "refined",
|
||||
"description": "Visual theme for the public status page. Defaults to 'refined'."
|
||||
},
|
||||
"StatusPageThemeMode": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "light", "dark"],
|
||||
"default": "auto",
|
||||
"description": "Forces a light/dark mode on the public page. 'auto' follows the visitor's OS preference. Defaults to 'auto'."
|
||||
},
|
||||
"SuccessResponse": {
|
||||
|
||||
Reference in new issue
Block a user