RustyCMS: file-based headless CMS — API, Admin UI (content, types, assets), Docker/Caddy, image transform; only demo type and demo content in version control
Made-with: Cursor
This commit is contained in:
67
schemas/campaign.schema.json
Normal file
67
schemas/campaign.schema.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"_slug": {
|
||||
"description": "Entry identifier (URL slug / filename without extension)",
|
||||
"type": "string"
|
||||
},
|
||||
"campaignName": {
|
||||
"description": "Campaign name",
|
||||
"type": "string"
|
||||
},
|
||||
"css": {
|
||||
"description": "Optional CSS",
|
||||
"type": "string"
|
||||
},
|
||||
"html": {
|
||||
"description": "HTML content",
|
||||
"type": "string"
|
||||
},
|
||||
"insertHtml": {
|
||||
"default": "beforeend",
|
||||
"description": "Position relative to selector",
|
||||
"enum": [
|
||||
"afterbegin",
|
||||
"beforeend",
|
||||
"afterend",
|
||||
"beforebegin",
|
||||
"replace"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"javascript": {
|
||||
"description": "Optional JavaScript",
|
||||
"type": "string"
|
||||
},
|
||||
"medias": {
|
||||
"description": "Media (images)",
|
||||
"items": {
|
||||
"description": "Reference (slug) to collection 'img'",
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"selector": {
|
||||
"description": "CSS selector where content is inserted",
|
||||
"type": "string"
|
||||
},
|
||||
"timeUntil": {
|
||||
"description": "Time limit (until when the campaign runs)",
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"urlPattern": {
|
||||
"description": "URL pattern (e.g. regex) for campaign usage",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"_slug",
|
||||
"campaignName",
|
||||
"urlPattern",
|
||||
"selector",
|
||||
"insertHtml"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
Reference in New Issue
Block a user