definitions.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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": 8,
  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. "enabled": {
  183. "description": "Is Enabled",
  184. "example": true,
  185. "type": "boolean"
  186. },
  187. "ssl_enabled": {
  188. "description": "Is SSL Enabled",
  189. "example": true,
  190. "type": "boolean"
  191. },
  192. "ssl_forced": {
  193. "description": "Is SSL Forced",
  194. "example": false,
  195. "type": "boolean"
  196. },
  197. "hsts_enabled": {
  198. "description": "Is HSTS Enabled",
  199. "example": false,
  200. "type": "boolean"
  201. },
  202. "hsts_subdomains": {
  203. "description": "Is HSTS applicable to all subdomains",
  204. "example": false,
  205. "type": "boolean"
  206. },
  207. "ssl_provider": {
  208. "type": "string",
  209. "pattern": "^(letsencrypt|other)$"
  210. },
  211. "http2_support": {
  212. "description": "HTTP2 Protocol Support",
  213. "example": false,
  214. "type": "boolean"
  215. },
  216. "block_exploits": {
  217. "description": "Should we block common exploits",
  218. "example": true,
  219. "type": "boolean"
  220. },
  221. "caching_enabled": {
  222. "description": "Should we cache assets",
  223. "example": true,
  224. "type": "boolean"
  225. }
  226. }
  227. }