Skip to content

Commit

Permalink
feat: Beginnings of Cardscript JSON-schema/docs refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Needham committed Mar 17, 2019
1 parent c8015cd commit 31f97b0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
30 changes: 25 additions & 5 deletions lib/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@
"version"
],
"definitions": {
"CardscriptField": {
"additionalProperties": true,
"description": "Adds various properties to extend base Input types.",
"properties": {
"icon": {
"type": "string",
"description": "Name of an icon to display alongside this element."
},
"title": {
"type": "string",
"description": "Strong text to clearly identify the intent of the element.",
"examples": [
"Your date of birth"
]
}
},
"type": "object"
},
"Action": {
"anyOf": [
{
Expand Down Expand Up @@ -525,7 +543,7 @@
},
"icon": {
"type": "string",
"description": "Name of an icon to display for the ChoiceSet as a whole, not an individual value."
"description": "Name of an icon to display for the choice."
},
"value": {
"type": "string",
Expand Down Expand Up @@ -1145,6 +1163,9 @@
"allOf": [
{
"$ref": "#/definitions/CardElement"
},
{
"$ref": "#/definitions/CardscriptField"
}
],
"properties": {
Expand Down Expand Up @@ -1347,6 +1368,9 @@
"allOf": [
{
"$ref": "#/definitions/CardElement"
},
{
"$ref": "#/definitions/CardscriptField"
}
],
"properties": {
Expand All @@ -1364,10 +1388,6 @@
"icon": {
"type": "string",
"description": "Name of an icon to prefix email input with."
},
"placeholder": {
"type": "string",
"description": "Description of the input desired. Displayed when no text has been input."
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/get-simple-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function getSimpleManifest () {
)

let toSkip = ['Action', 'Actions', 'CardElement', 'CardElements', 'ChoiceInputStyle', 'HorizontalAlignment',
'ImageSize', 'ImageStyle', 'SeparatorStyle', 'SpacingStyle', 'TextInputStyle']
'ImageSize', 'ImageStyle', 'SeparatorStyle', 'SpacingStyle', 'TextInputStyle', 'CardscriptField']

let containerElements = ['Container', 'Column', 'ColumnSet', 'TabSet', 'Tab', 'Collapsible', 'ActionSet', 'ImageSet']

Expand Down

0 comments on commit 31f97b0

Please sign in to comment.