Skip to content

Instantly share code, notes, and snippets.

@alcoffeeocha
Last active February 7, 2025 01:53
Show Gist options
  • Save alcoffeeocha/3d4976da8a634abd842ad8f2b728f065 to your computer and use it in GitHub Desktop.
Save alcoffeeocha/3d4976da8a634abd842ad8f2b728f065 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyBCA Theme",
"type": "object",
"required": ["Theme", "Language", "Items", "Includes"],
"properties": {
"Theme": {
"type": "string",
"examples": ["MyBCA", "Default"]
},
"Language": {
"type": "string",
"enum": ["ID", "EN"]
},
"Items": {
"type": "array",
"items": {
"type": "object",
"required": ["ComponentType", "Id"],
"properties": {
"ComponentType": {
"type": "string",
"enum": [
"Banner",
"Overview",
"Feature",
"FeatureTabs",
"Tutorial",
"Info",
"FloatingAction",
"Modal"
]
},
"Id": {
"type": "string"
}
},
"oneOf": [
{
"properties": {
"ComponentType": {
"const": "Banner"
},
"Title": {
"type": "string"
},
"ImageSrc": {
"type": "string",
"format": "uri"
},
"ImageAlt": {
"type": "string"
},
"BackgroundImageSrc": {
"type": "string",
"format": "uri"
}
},
"required": ["Title", "ImageSrc", "ImageAlt", "BackgroundImageSrc"]
},
{
"properties": {
"ComponentType": {
"const": "Overview"
},
"Title": {
"type": "string"
},
"BodyHtml": {
"type": "string"
},
"Actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["Primary", "Secondary"]
},
"Text": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": ["Type", "Text", "Href"]
}
},
"IconSrc": {
"type": "string",
"format": "uri"
},
"IconAlt": {
"type": "string"
}
},
"required": ["Title", "BodyHtml", "Actions", "IconSrc", "IconAlt"]
},
{
"properties": {
"ComponentType": {
"const": "Feature"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "string"
},
"Title": {
"type": "string"
},
"Description": {
"type": "string"
},
"ActionHref": {
"type": "string",
"format": "uri"
},
"IconSrc": {
"type": "string",
"format": "uri"
}
},
"required": ["Title", "Description", "ActionHref", "IconSrc"]
}
}
},
"required": ["Items"]
},
{
"properties": {
"ComponentType": {
"const": "FeatureTabs"
},
"Title": {
"type": "string"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"SubtitleHtml": {
"type": "string"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"BodyHtml": {
"type": "string"
},
"ActionHref": {
"type": "string"
},
"IconSrc": {
"type": "string",
"format": "uri"
},
"ImageSrc": {
"type": "string",
"format": "uri"
}
},
"required": ["Title", "BodyHtml", "ActionHref"]
}
}
},
"required": ["Title", "Items"]
}
}
},
"required": ["Title", "Items"]
},
{
"properties": {
"ComponentType": {
"const": "Tutorial"
},
"Title": {
"type": "string"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "string"
},
"Title": {
"type": "string"
},
"ActionSlug": {
"type": "string"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"ImageSrc": {
"type": "string",
"format": "uri"
}
},
"required": ["Title", "ImageSrc"]
}
}
},
"required": ["Id", "Title", "Items"]
}
}
},
"required": ["Title", "Items"]
},
{
"properties": {
"ComponentType": {
"const": "Info"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"BodyHtml": {
"type": "string"
},
"IconSrc": {
"type": "string",
"format": "uri"
},
"IconAlt": {
"type": "string"
},
"ActionSlug": {
"type": "string"
}
},
"required": ["Title", "BodyHtml", "IconSrc", "ActionSlug"]
}
}
},
"required": ["Items"]
},
{
"properties": {
"ComponentType": {
"const": "FloatingAction"
},
"Title": {
"type": "string"
},
"ActionHref": {
"type": "string",
"format": "uri"
},
"IconSrc": {
"type": "string",
"format": "uri"
},
"IconAlt": {
"type": "string"
}
},
"required": ["Title", "ActionHref", "IconSrc", "IconAlt"]
},
{
"properties": {
"ComponentType": {
"const": "Modal"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"required": ["Type", "ActionSlug"],
"oneOf": [
{
"properties": {
"Type": {
"const": "Accordion"
},
"HeaderHtml": {
"type": "string"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"BodyHtml": {
"type": "string"
}
},
"required": ["Title", "BodyHtml"]
}
}
},
"required": ["HeaderHtml", "Items"]
},
{
"properties": {
"Type": {
"const": "Custom"
},
"HeaderHtml": {
"type": "string"
},
"BodyHtml": {
"type": "string"
}
},
"required": ["HeaderHtml", "BodyHtml"]
}
]
}
}
},
"required": ["Items"]
}
]
}
},
"Includes": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment