| { |
| "$schema": "http://json-schema.org/schema#", |
| "title": "Schema for `action_template` metadata file", |
| "definitions": { |
| "actionArray": { |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/action" |
| }, |
| "additionalItems": false, |
| "uniqueItems": true, |
| "minItems": 1 |
| }, |
| "action": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "parameters": { |
| "$ref": "#/definitions/parameterArray" |
| } |
| } |
| }, |
| "parameterArray": { |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/parameter" |
| }, |
| "additionalItems": false, |
| "uniqueItems": true, |
| "minItems": 1 |
| }, |
| "parameter": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "$ref": "#/definitions/alphaNumString" |
| }, |
| "type": { |
| "type": "string" |
| }, |
| "required": { |
| "type": "boolean" |
| } |
| }, |
| "required": [ |
| "name", |
| "type" |
| ], |
| "additionalProperties": false |
| }, |
| "alphaNumString": { |
| "type": "string", |
| "pattern": "^[a-zA-Z0-9_]+$" |
| }, |
| "compositionPattern": { |
| "type": "string", |
| "enum": [ |
| "ticker", |
| "comments-right" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "binary": { |
| "type": "string" |
| }, |
| "suggestion_headline": { |
| "type": "string" |
| }, |
| "action": { |
| "type": "string" |
| }, |
| "actions": { |
| "$ref": "#/definitions/actionArray" |
| }, |
| "parameters": { |
| "$ref": "#/definitions/parameterArray" |
| }, |
| "composition_pattern": { |
| "$ref": "#/definitions/compositionPattern" |
| } |
| }, |
| "required": [ |
| "binary", |
| "action" |
| ], |
| "additionalProperties": false |
| } |