definitions.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "definitions",
  4. "definitions": {
  5. "id": {
  6. "description": "Unique identifier",
  7. "example": 123456,
  8. "readOnly": true,
  9. "type": "integer",
  10. "minimum": 1
  11. },
  12. "setting_id": {
  13. "description": "Unique identifier for a Setting",
  14. "example": "default-site",
  15. "readOnly": true,
  16. "type": "string",
  17. "minLength": 2
  18. },
  19. "token": {
  20. "type": "string",
  21. "minLength": 10
  22. },
  23. "expand": {
  24. "anyOf": [
  25. {
  26. "type": "null"
  27. },
  28. {
  29. "type": "array",
  30. "minItems": 1,
  31. "items": {
  32. "type": "string"
  33. }
  34. }
  35. ]
  36. },
  37. "sort": {
  38. "type": "array",
  39. "minItems": 1,
  40. "items": {
  41. "type": "object",
  42. "required": [
  43. "field",
  44. "dir"
  45. ],
  46. "additionalProperties": false,
  47. "properties": {
  48. "field": {
  49. "type": "string"
  50. },
  51. "dir": {
  52. "type": "string",
  53. "pattern": "^(asc|desc)$"
  54. }
  55. }
  56. }
  57. },
  58. "query": {
  59. "anyOf": [
  60. {
  61. "type": "null"
  62. },
  63. {
  64. "type": "string",
  65. "minLength": 1,
  66. "maxLength": 255
  67. }
  68. ]
  69. },
  70. "criteria": {
  71. "anyOf": [
  72. {
  73. "type": "null"
  74. },
  75. {
  76. "type": "object"
  77. }
  78. ]
  79. },
  80. "fields": {
  81. "anyOf": [
  82. {
  83. "type": "null"
  84. },
  85. {
  86. "type": "array",
  87. "minItems": 1,
  88. "items": {
  89. "type": "string"
  90. }
  91. }
  92. ]
  93. },
  94. "omit": {
  95. "anyOf": [
  96. {
  97. "type": "null"
  98. },
  99. {
  100. "type": "array",
  101. "minItems": 1,
  102. "items": {
  103. "type": "string"
  104. }
  105. }
  106. ]
  107. },
  108. "created_on": {
  109. "description": "Date and time of creation",
  110. "format": "date-time",
  111. "readOnly": true,
  112. "type": "string"
  113. },
  114. "modified_on": {
  115. "description": "Date and time of last update",
  116. "format": "date-time",
  117. "readOnly": true,
  118. "type": "string"
  119. },
  120. "user_id": {
  121. "description": "User ID",
  122. "example": 1234,
  123. "type": "integer",
  124. "minimum": 1
  125. },
  126. "certificate_id": {
  127. "description": "Certificate ID",
  128. "example": 1234,
  129. "anyOf": [
  130. {
  131. "type": "integer",
  132. "minimum": 0
  133. },
  134. {
  135. "type": "string",
  136. "pattern": "^new$"
  137. }
  138. ]
  139. },
  140. "access_list_id": {
  141. "description": "Access List ID",
  142. "example": 1234,
  143. "type": "integer",
  144. "minimum": 0
  145. },
  146. "name": {
  147. "type": "string",
  148. "minLength": 1,
  149. "maxLength": 255
  150. },
  151. "email": {
  152. "description": "Email Address",
  153. "example": "[email protected]",
  154. "format": "email",
  155. "type": "string",
  156. "minLength": 6,
  157. "maxLength": 100
  158. },
  159. "password": {
  160. "description": "Password",
  161. "type": "string",
  162. "minLength": 8,
  163. "maxLength": 255
  164. },
  165. "domain_name": {
  166. "description": "Domain Name",
  167. "example": "jc21.com",
  168. "type": "string",
  169. "pattern": "^(?:[^.*]+\\.?)+[^.]$"
  170. },
  171. "domain_names": {
  172. "description": "Domain Names separated by a comma",
  173. "example": "*.jc21.com,blog.jc21.com",
  174. "type": "array",
  175. "maxItems": 15,
  176. "uniqueItems": true,
  177. "items": {
  178. "type": "string",
  179. "pattern": "^(?:\\*\\.)?(?:[^.*]+\\.?)+[^.]$"
  180. }
  181. },
  182. "http_code": {
  183. "description": "Redirect HTTP Status Code",
  184. "example": 302,
  185. "type": "integer",
  186. "minimum": 300,
  187. "maximum": 308
  188. },
  189. "scheme": {
  190. "description": "RFC Protocol",
  191. "example": "HTTPS or $scheme",
  192. "type": "string",
  193. "minLength": 4
  194. },
  195. "enabled": {
  196. "description": "Is Enabled",
  197. "example": true,
  198. "type": "boolean"
  199. },
  200. "ssl_enabled": {
  201. "description": "Is SSL Enabled",
  202. "example": true,
  203. "type": "boolean"
  204. },
  205. "ssl_forced": {
  206. "description": "Is SSL Forced",
  207. "example": false,
  208. "type": "boolean"
  209. },
  210. "hsts_enabled": {
  211. "description": "Is HSTS Enabled",
  212. "example": false,
  213. "type": "boolean"
  214. },
  215. "hsts_subdomains": {
  216. "description": "Is HSTS applicable to all subdomains",
  217. "example": false,
  218. "type": "boolean"
  219. },
  220. "ssl_provider": {
  221. "type": "string",
  222. "pattern": "^(letsencrypt|other)$"
  223. },
  224. "http2_support": {
  225. "description": "HTTP2 Protocol Support",
  226. "example": false,
  227. "type": "boolean"
  228. },
  229. "block_exploits": {
  230. "description": "Should we block common exploits",
  231. "example": true,
  232. "type": "boolean"
  233. },
  234. "caching_enabled": {
  235. "description": "Should we cache assets",
  236. "example": true,
  237. "type": "boolean"
  238. }
  239. }
  240. }