widgetsTemplateSchema.json 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. "copyright": "Licensed Materials - Property of IBM. IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019, 2020. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.",
  3. "$id": "widgetsTemplateSchema.json",
  4. "$schema": "http://json-schema.org/draft-07/schema#",
  5. "title": "widget set",
  6. "description": "The widget of the dashboard specification, representing ...",
  7. "definitions": {
  8. "visTypeLocked": { "type": "boolean" },
  9. "properties": {
  10. "type": "array",
  11. "items": {
  12. "type": "object",
  13. "properties": {
  14. "id": { "$ref": "schemaDefs.json#/definitions/name" },
  15. "value": {
  16. "anyOf": [
  17. { "type": "string" },
  18. { "type": "integer" },
  19. { "type": "boolean" },
  20. { "type": "null" },
  21. {
  22. "type": "object",
  23. "properties": {
  24. "r": { "type": "integer" },
  25. "g": { "type": "integer" },
  26. "b": { "type": "integer" },
  27. "a": { "type": "number" },
  28. "name": { "$ref": "schemaDefs.json#/definitions/name" },
  29. "caption": { "type": "string" },
  30. "description": {
  31. "type": ["null", "string"]
  32. }
  33. }
  34. }
  35. ]
  36. }
  37. }
  38. }
  39. },
  40. "titleAlign": {
  41. "type": "string",
  42. "enum": ["align_left", "align_center", "align_right"]
  43. },
  44. "widgetType": {
  45. "type": "string",
  46. "enum": ["live", "text", "shape", "webpage", "media", "image", "filter"]
  47. },
  48. "content": { "type": "string" },
  49. "widget": {
  50. "type": "object",
  51. "properties": {
  52. "id": { "$ref": "schemaDefs.json#/definitions/modelId" },
  53. "type": { "$ref": "#/definitions/widgetType" },
  54. "visId": { "type": "string" },
  55. "isResponsive": { "type" : "boolean"},
  56. "visTypeLocked": { "$ref": "#/definitions/visTypeLocked" },
  57. "properties": { "$ref": "#/definitions/properties" },
  58. "borderColor": { "$ref": "schemaDefs.json#/definitions/name" },
  59. "title": { "$ref": "schemaDefs.json#/definitions/name" },
  60. "titleAlign": { "$ref": "#/definitions/titleAlign" },
  61. "titleState": { "$ref": "schemaDefs.json#/definitions/name" },
  62. "titleHtml": { "$ref": "schemaDefs.json#/definitions/name" },
  63. "altText": { "type": "string" },
  64. "content": { "$ref": "#/definitions/content" },
  65. "imageLink": { "type": "string" },
  66. "fillColor" : { "type": "string" },
  67. "showTitle" : { "type": "boolean" },
  68. "placeholder": {
  69. "type": "object",
  70. "properties" : {
  71. "showIcon": { "type": "boolean" },
  72. "text": { "type": "string" }
  73. }
  74. },
  75. "params": {
  76. "type": "object",
  77. "properties": {
  78. "notebookId": {"type": "string" },
  79. "notebookSelectedCellIndex": {"type": "number" },
  80. "showTimestamp": {"type": "boolean" }
  81. }
  82. },
  83. "mediaLink": { "type": "string" },
  84. "mediaType": { "type": "string" },
  85. "url": { "type": "string" },
  86. "name": { "$ref": "schemaDefs.json#/definitions/name" }
  87. }
  88. }
  89. },
  90. "type": "object",
  91. "patternProperties": {
  92. "[0-9,a-z,-,_]*": { "$ref": "#/definitions/widget" }
  93. }
  94. }