VideoEntity.schema.json 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "https://joystream.org/VideoEntity.schema.json",
  4. "title": "VideoEntity",
  5. "description": "JSON schema for entities based on Video runtime schema",
  6. "type": "object",
  7. "additionalProperties": false,
  8. "required": [
  9. "channel",
  10. "category",
  11. "title",
  12. "description",
  13. "duration",
  14. "thumbnailURL",
  15. "media",
  16. "isPublic",
  17. "isCurated",
  18. "isExplicit",
  19. "license"
  20. ],
  21. "properties": {
  22. "channel": {
  23. "oneOf": [
  24. {
  25. "type": "object",
  26. "additionalProperties": false,
  27. "required": [
  28. "new"
  29. ],
  30. "properties": {
  31. "new": {
  32. "$ref": "./ChannelEntity.schema.json"
  33. }
  34. }
  35. },
  36. {
  37. "type": "object",
  38. "additionalProperties": false,
  39. "required": [
  40. "existing"
  41. ],
  42. "properties": {
  43. "existing": {
  44. "$ref": "../entityReferences/ChannelRef.schema.json"
  45. }
  46. }
  47. }
  48. ],
  49. "description": "Reference to member's channel"
  50. },
  51. "category": {
  52. "oneOf": [
  53. {
  54. "type": "object",
  55. "additionalProperties": false,
  56. "required": [
  57. "new"
  58. ],
  59. "properties": {
  60. "new": {
  61. "$ref": "./ContentCategoryEntity.schema.json"
  62. }
  63. }
  64. },
  65. {
  66. "type": "object",
  67. "additionalProperties": false,
  68. "required": [
  69. "existing"
  70. ],
  71. "properties": {
  72. "existing": {
  73. "$ref": "../entityReferences/ContentCategoryRef.schema.json"
  74. }
  75. }
  76. }
  77. ],
  78. "description": "Reference to a video category"
  79. },
  80. "title": {
  81. "type": "string",
  82. "maxLength": 64,
  83. "description": "The title of the video"
  84. },
  85. "description": {
  86. "type": "string",
  87. "maxLength": 1024,
  88. "description": "The description of the Video"
  89. },
  90. "duration": {
  91. "type": "integer",
  92. "minimum": 0,
  93. "maximum": 4294967295,
  94. "description": "Video duration in seconds"
  95. },
  96. "skippableIntroDuration": {
  97. "type": "integer",
  98. "minimum": 0,
  99. "maximum": 65535,
  100. "description": "Video's kippable intro duration in seconds"
  101. },
  102. "thumbnailURL": {
  103. "type": "string",
  104. "maxLength": 256,
  105. "description": "Video thumbnail url (recommended ratio: 16:9)"
  106. },
  107. "language": {
  108. "oneOf": [
  109. {
  110. "type": "object",
  111. "additionalProperties": false,
  112. "required": [
  113. "new"
  114. ],
  115. "properties": {
  116. "new": {
  117. "$ref": "./LanguageEntity.schema.json"
  118. }
  119. }
  120. },
  121. {
  122. "type": "object",
  123. "additionalProperties": false,
  124. "required": [
  125. "existing"
  126. ],
  127. "properties": {
  128. "existing": {
  129. "$ref": "../entityReferences/LanguageRef.schema.json"
  130. }
  131. }
  132. }
  133. ],
  134. "description": "Video's main langauge"
  135. },
  136. "media": {
  137. "oneOf": [
  138. {
  139. "type": "object",
  140. "additionalProperties": false,
  141. "required": [
  142. "new"
  143. ],
  144. "properties": {
  145. "new": {
  146. "$ref": "./VideoMediaEntity.schema.json"
  147. }
  148. }
  149. },
  150. {
  151. "type": "object",
  152. "additionalProperties": false,
  153. "required": [
  154. "existing"
  155. ],
  156. "properties": {
  157. "existing": {
  158. "$ref": "../entityReferences/VideoMediaRef.schema.json"
  159. }
  160. }
  161. }
  162. ],
  163. "description": "Reference to VideoMedia"
  164. },
  165. "hasMarketing": {
  166. "type": "boolean",
  167. "description": "Whether or not Video contains marketing"
  168. },
  169. "publishedBeforeJoystream": {
  170. "type": "integer",
  171. "minimum": 0,
  172. "maximum": 4294967295,
  173. "description": "If the Video was published on other platform before beeing published on Joystream - the original publication date"
  174. },
  175. "isPublic": {
  176. "type": "boolean",
  177. "description": "Whether the Video is supposed to be publically displayed"
  178. },
  179. "isCurated": {
  180. "type": "boolean",
  181. "description": "Whether the Video has been curated (verified) by a Curator"
  182. },
  183. "isExplicit": {
  184. "type": "boolean",
  185. "description": "Whether the Video contains explicit material."
  186. },
  187. "license": {
  188. "oneOf": [
  189. {
  190. "type": "object",
  191. "additionalProperties": false,
  192. "required": [
  193. "new"
  194. ],
  195. "properties": {
  196. "new": {
  197. "$ref": "./LicenseEntity.schema.json"
  198. }
  199. }
  200. },
  201. {
  202. "type": "object",
  203. "additionalProperties": false,
  204. "required": [
  205. "existing"
  206. ],
  207. "properties": {
  208. "existing": {
  209. "$ref": "../entityReferences/LicenseRef.schema.json"
  210. }
  211. }
  212. }
  213. ],
  214. "description": "A License the Video is published under"
  215. }
  216. }
  217. }