123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- {
- "copyright": "Licensed Materials - Property of IBM. IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018, 2020. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.",
- "$id": "widgetsSchema.json",
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "widget set",
- "description": "The widget of the dashboard specification, representing ...",
- "definitions": {
- "widgetData": {
- "type": "object",
- "properties": {
- "id": { "$ref": "schemaDefs.json#/definitions/modelId" },
- "itemId": { "$ref": "schemaDefs.json#/definitions/queryId" },
- "itemLabel": { "$ref": "schemaDefs.json#/definitions/name" },
- "selection": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "operation": {
- "type": "string",
- "enum": ["add", "remove", "order", "keep"]
- },
- "selectDepth": { "type": "string"},
- "set": { "$ref": "schemaDefs.json#/definitions/strArray" },
- "filter": {
- "type": "object",
- "properties": {
- "not": { "$ref": "#/definitions/filterEntry" },
- "or": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": { "$ref": "#/definitions/filterEntry" },
- "not": { "$ref": "#/definitions/filterEntry" }
- }
- }
- }
- }
- },
- "children": { "$ref": "schemaDefs.json#/definitions/strArray" },
- "sort": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["asc", "desc"]
- },
- "priority": { "type": "number" },
- "by": {
- "type": "string",
- "enum": ["caption"]
- }
- }
- },
- "topBottom": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["topcount", "bottomcount", "toppercent", "bottompercent"]
- },
- "value": { "type": "number" }
- }
- },
- "context": {
- "type": "array",
- "items": {
- "itemId": { "$ref": "schemaDefs.json#/definitions/id" }
- }
- }
- }
- }
- },
- "format": {
- "type": "object",
- "properties": {
- "formatSpec": {
- "type": "object",
- "properties": {
- "local": { "type": "boolean" },
- "type": {
- "type": "string",
- "enum": ["number","percent","currency"]
- },
- "timezone": { "type": "string" },
- "locale": { "type": "string" },
- "convertPercent": { "type": "boolean" },
- "currencyCode": { "type": "string" },
- "currencyDisplay": {
- "type": "string",
- "enum": ["symbol", "code"]
- },
- "maximumFractionDigits": { "type": "number" },
- "minimumFractionDigits": { "type": "number" },
- "dateStyle": {
- "type": "string",
- "enum": ["short", "medium", "full", "long"]
- },
- "timeStyle": {
- "type": "string",
- "enum": ["short", "full", "long"]
- }
- }
- }
- }
- },
- "aggregate": { "$ref": "#/definitions/aggregationType" }
- }
- },
- "filterEntry": {
- "type": "object",
- "properties": {
- "id": { "$ref": "schemaDefs.json#/definitions/modelId" },
- "columnId": { "$ref": "schemaDefs.json#/definitions/id" },
- "operator": { "$ref": "#/definitions/operatorType" },
- "values": { "$ref": "#/definitions/values" },
- "excludedValues": {
- "type": "array",
- "items": { "$ref": "#/definitions/values" }
- },
- "idSuffix": { "type": "integer" },
- "valueDataItem": { "$ref": "schemaDefs.json#/definitions/modelId" },
- "aggregationType": { "$ref": "#/definitions/aggregationType" },
- "preOrPost": {
- "type": "string",
- "enum": ["pre", "post"]
- },
- "conditions": {
- "type": "object",
- "properties": {
- "operator": { "$ref": "#/definitions/operatorType" },
- "itemId": { "$ref": "schemaDefs.json#/definitions/queryId" },
- "ignoreCase": { "type": "boolean" },
- "values": { "$ref": "#/definitions/values" },
- "valueType": {
- "type": "string",
- "enum": ["display"]
- },
- "and" : {
- "type": "array",
- "minItems": 2,
- "items": {
- "operator": { "$ref": "#/definitions/operatorType" },
- "itemId": { "$ref": "schemaDefs.json#/definitions/queryId" },
- "ignoreCase": { "type": "boolean" },
- "values": { "$ref": "#/definitions/values" },
- "valueType": {
- "type": "string",
- "enum": ["display"]
- }
- }
- },
- "or" : {
- "type": "array",
- "minItems": 2,
- "items": {
- "operator": { "$ref": "#/definitions/operatorType" },
- "itemId": { "$ref": "schemaDefs.json#/definitions/queryId" },
- "ignoreCase": { "type": "boolean" },
- "values": { "$ref": "#/definitions/values" },
- "valueType": {
- "type": "string",
- "enum": ["display"]
- }
- }
- }
- }
- },
- "overrideHierarchyDefaultSelection": { "type": "boolean" },
- "visualizationId": { "$ref": "schemaDefs.json#/definitions/id" }
- }
- },
- "slotmapping": {
- "type": "object",
- "properties": {
- "slots": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": { "$ref": "schemaDefs.json#/definitions/name" },
- "caption": { "$ref": "schemaDefs.json#/definitions/name" },
- "id": { "$ref": "schemaDefs.json#/definitions/name" },
- "layerId": { "$ref": "schemaDefs.json#/definitions/name" },
- "dataItems": {
- "type": "array",
- "items": { "$ref": "schemaDefs.json#/definitions/modelId" }
- },
- "type": {
- "type": "string",
- "enum": ["categorical", "ordinal", "any"]
- }
- }
- }
- }
- }
- },
- "possibleKeyDrivers": {
- "type": "array",
- "items": {
- "$ref": "schemaDefs.json#/definitions/queryId"
- }
- },
- "localFilters": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/filterEntry"
- }
- },
- "aggregationType": {
- "type": "string",
- "enum": ["avg", "sum", "min", "max", "count", "countdistinct"]
- },
- "operatorType": {
- "type": "string",
- "enum": ["containsignorecase", "eq", "beginswith", "endswith", "in", "notin", "between", "notbetween", "or", "not", "gt", "lt"]
- },
- "values": {
- "anyOf": [ {
- "$ref": "schemaDefs.json#/definitions/strArray"
- },
- {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "u": {"type": ["string", "number"] },
- "d": {"type": ["string", "number"] }
- }
- }
- } ]
- },
- "data" :{
- "type": "object",
- "properties": {
- "dataViews": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": { "$ref": "schemaDefs.json#/definitions/modelId" },
- "modelRef": { "$ref": "schemaDefs.json#/definitions/modelId" },
- "dataItems": {
- "type": "array",
- "items": { "$ref": "#/definitions/widgetData" }
- }
- }
- }
- }
- }
- }
- },
- "type": "object",
- "patternProperties": {
- "[0-9,a-z,-,_]*": {
- "type": "object",
- "allOf": [
- { "$ref": "widgetsTemplateSchema.json#/definitions/widget" },
- {
- "properties": {
- "data": { "$ref": "#/definitions/data" },
- "slotmapping": { "$ref": "#/definitions/slotmapping" },
- "possibleKeyDrivers": { "$ref": "#/definitions/possibleKeyDrivers" },
- "localFilters": { "$ref": "#/definitions/localFilters" }
- }
- }
- ]
- }
- }
- }
|