Skip to content

Commit

Permalink
Merge pull request #94 from HO-COOH/chore/control-info-json-schema
Browse files Browse the repository at this point in the history
Chore/control info json schema
  • Loading branch information
NotYoojun authored Oct 9, 2024
2 parents e3e0500 + ae69156 commit ae075c7
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "ControlInfoDataSchema.json",
"Groups": [
{
"UniqueId": "NewControls",
Expand Down Expand Up @@ -2158,8 +2159,7 @@
"Uri": "https://docs.microsoft.com/windows/apps/design/style/reveal-focus"
}
],
"RelatedControls": [
]
"RelatedControls": []
},
{
"UniqueId": "ColorPaletteResources",
Expand Down Expand Up @@ -2223,8 +2223,7 @@
"Uri": "https://docs.microsoft.com/windows/winui/api/microsoft.ui.composition.systembackdrops.desktopacryliccontroller"
}
],
"RelatedControls": [
]
"RelatedControls": []
}
]
},
Expand Down Expand Up @@ -2674,8 +2673,7 @@
"Uri": "https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.window?view=winui-3.0-preview"
}
],
"RelatedControls": [
]
"RelatedControls": []
},
{
"UniqueId": "TitleBar",
Expand All @@ -2697,8 +2695,7 @@
"Uri": "https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.window?view=winui-3.0-preview"
}
],
"RelatedControls": [
]
"RelatedControls": []
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"UniqueId": {
"type": "string",
"description": "Globally unique id of this group",
"uniqueItems": true
},
"Title": {
"type": "string",
"description": "Title appears on the overview card and control page"
},
"Subtitle": {
"type": "string",
"description": "Subtitle appears on the overview card of a specific control"
},
"ImagePath": {
"type": "string",
"description": "Not used."
},
"ImageIconPath": {
"type": "string",
"description": "ImageIconPath appears as an icon of this control group on the NavigationViewItem. Should be a Unicode glyph of the icon"
},
"Description": {
"type": "string",
"description": "Not used. Leave empty"
},
"Items": {
"type": "array",
"description": "Individual control info",
"items": {
"type": "object",
"properties": {
"UniqueId": {
"type": "string",
"description": "Globally unique id of this control",
"uniqueItems": true
},
"Title": {
"type": "string",
"description": "Title appears on the overview card and control page of this control"
},
"Subtitle": {
"type": "string",
"description": "Subtitle appears on the overview card of this control"
},
"ImagePath": {
"type": "string",
"description": "Appears as the image of this control on the overriew card. Should be a uri starts with ms-appx:///Assets/ControlImages/..."
},
"ImageIconPath": {
"type": "string",
"description": "Appears as the icon image of this control on the NavigationViewItem. Should be a uri starts with ms-appx:///Assets/ControlIcons/..."
},
"Description": {
"type": "string",
"description": "Appears on the control page"
},
"Content": {
"type": "string",
"description": "Not used. Leave empty"
},
"IsNew": {
"type": "boolean",
"default": true,
"description": "Show on the Recently Added Sample section on the main page and will add a dot on the overview card of this control"
},
"IsUpdated": {
"type": "boolean",
"default": false,
"description": "Show on the Recently Updated Sample section on the main page and will add a dot on the overview card of this control"
},
"Docs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string",
"description": "Link name that appears in the Documentation dropdown"
},
"Uri": {
"type": "string",
"description": "Documentation link url"
}
},
"required": [ "Title", "Uri" ]
},
"description": "Add a link to the doc in the Documentation dropdown on the detail page of this control"
},
"RelatedControls": {
"type": "array",
"items": {
"type": "string",
"description": "Name of the related control"
},
"description": "Array of names of the related control"
}
},
"required": [ "UniqueId", "Title", "Subtitle", "ImagePath", "ImageIconPath", "Description", "Content" ]
}
}
},
"required": [ "UniqueId", "Title", "Subtitle", "ImagePath", "ImageIconPath", "Description", "Items" ]
}
}
}
}

0 comments on commit ae075c7

Please sign in to comment.