rsi-schema.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. {
  2. "$schema":"http://json-schema.org/draft-07/schema",
  3. "default":{
  4. },
  5. "description":"JSON Schema for SS14 RSI validation.",
  6. "examples":[
  7. {
  8. "version":1,
  9. "license":"CC-BY-SA-3.0",
  10. "copyright":"Taken from CODEBASE at COMMIT LINK",
  11. "size":{
  12. "x":32,
  13. "y":32
  14. },
  15. "states":[
  16. {
  17. "name":"basic"
  18. },
  19. {
  20. "name":"basic-directions",
  21. "directions":4
  22. },
  23. {
  24. "name":"basic-delays",
  25. "delays":[
  26. [
  27. 0.1,
  28. 0.1
  29. ]
  30. ]
  31. },
  32. {
  33. "name":"basic-delays-directions",
  34. "directions":4,
  35. "delays":[
  36. [
  37. 0.1,
  38. 0.1
  39. ],
  40. [
  41. 0.1,
  42. 0.1
  43. ],
  44. [
  45. 0.1,
  46. 0.1
  47. ],
  48. [
  49. 0.1,
  50. 0.1
  51. ]
  52. ]
  53. }
  54. ]
  55. }
  56. ],
  57. "required":[
  58. "version",
  59. "license",
  60. "copyright",
  61. "size",
  62. "states"
  63. ],
  64. "title":"RSI Schema",
  65. "type":"object",
  66. "properties":{
  67. "version":{
  68. "$id":"#/properties/version",
  69. "default":"",
  70. "description":"RSI version integer.",
  71. "title":"The version schema",
  72. "type":"integer"
  73. },
  74. "license":{
  75. "$id":"#/properties/license",
  76. "default":"",
  77. "description":"The license for the associated icon states. Restricted to SS14-compatible asset licenses.",
  78. "enum":[
  79. "CC-BY-SA-3.0",
  80. "CC-BY-SA-4.0",
  81. "CC-BY-NC-3.0",
  82. "CC-BY-NC-4.0",
  83. "CC-BY-NC-SA-3.0",
  84. "CC-BY-NC-SA-4.0",
  85. "CC0-1.0"
  86. ],
  87. "examples":[
  88. "CC-BY-SA-3.0"
  89. ],
  90. "title":"License",
  91. "type":"string"
  92. },
  93. "copyright":{
  94. "$id":"#/properties/copyright",
  95. "type":"string",
  96. "title":"Copyright Info",
  97. "description":"The copyright holder. This is typically a link to the commit of the codebase that the icon is pulled from.",
  98. "default":"",
  99. "examples":[
  100. "Taken from CODEBASE at COMMIT LINK"
  101. ]
  102. },
  103. "size":{
  104. "$id":"#/properties/size",
  105. "default":{
  106. },
  107. "description":"The dimensions of the sprites inside the RSI. This is not the size of the PNG files that store the sprite sheet.",
  108. "examples":[
  109. {
  110. "x":32,
  111. "y":32
  112. }
  113. ],
  114. "title":"Sprite Dimensions",
  115. "required":[
  116. "x",
  117. "y"
  118. ],
  119. "type":"object",
  120. "properties":{
  121. "x":{
  122. "$id":"#/properties/size/properties/x",
  123. "type":"integer",
  124. "default":32,
  125. "examples":[
  126. 32
  127. ]
  128. },
  129. "y":{
  130. "$id":"#/properties/size/properties/y",
  131. "type":"integer",
  132. "default":32,
  133. "examples":[
  134. 32
  135. ]
  136. }
  137. },
  138. "additionalProperties":true
  139. },
  140. "states":{
  141. "$id":"#/properties/states",
  142. "type":"array",
  143. "title":"Icon States",
  144. "description":"Metadata for icon states. Includes name, directions, delays, etc.",
  145. "default":[
  146. ],
  147. "examples":[
  148. [
  149. {
  150. "name":"basic"
  151. },
  152. {
  153. "name":"basic-directions",
  154. "directions":4
  155. }
  156. ]
  157. ],
  158. "additionalItems":true,
  159. "items":{
  160. "$id":"#/properties/states/items",
  161. "type":"object",
  162. "required":[
  163. "name"
  164. ],
  165. "properties":{
  166. "name":{
  167. "type":"string"
  168. },
  169. "directions":{
  170. "type":"integer",
  171. "enum":[
  172. 1,
  173. 4,
  174. 8
  175. ]
  176. }
  177. }
  178. }
  179. }
  180. },
  181. "additionalProperties":true
  182. }