settings.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "endpoints/settings",
  4. "title": "Settings",
  5. "description": "Endpoints relating to Settings",
  6. "stability": "stable",
  7. "type": "object",
  8. "definitions": {
  9. "id": {
  10. "$ref": "../definitions.json#/definitions/setting_id"
  11. },
  12. "name": {
  13. "description": "Name",
  14. "example": "Default Site",
  15. "type": "string",
  16. "minLength": 2,
  17. "maxLength": 100
  18. },
  19. "description": {
  20. "description": "Description",
  21. "example": "Default Site",
  22. "type": "string",
  23. "minLength": 2,
  24. "maxLength": 255
  25. },
  26. "value": {
  27. "description": "Value",
  28. "example": "404",
  29. "type": "string",
  30. "maxLength": 255
  31. },
  32. "meta": {
  33. "type": "object"
  34. }
  35. },
  36. "links": [
  37. {
  38. "title": "List",
  39. "description": "Returns a list of Settings",
  40. "href": "/settings",
  41. "access": "private",
  42. "method": "GET",
  43. "rel": "self",
  44. "http_header": {
  45. "$ref": "../examples.json#/definitions/auth_header"
  46. },
  47. "targetSchema": {
  48. "type": "array",
  49. "items": {
  50. "$ref": "#/properties"
  51. }
  52. }
  53. },
  54. {
  55. "title": "Update",
  56. "description": "Updates a existing Setting",
  57. "href": "/settings/{definitions.identity.example}",
  58. "access": "private",
  59. "method": "PUT",
  60. "rel": "update",
  61. "http_header": {
  62. "$ref": "../examples.json#/definitions/auth_header"
  63. },
  64. "schema": {
  65. "type": "object",
  66. "properties": {
  67. "value": {
  68. "$ref": "#/definitions/value"
  69. },
  70. "meta": {
  71. "$ref": "#/definitions/meta"
  72. }
  73. }
  74. },
  75. "targetSchema": {
  76. "properties": {
  77. "$ref": "#/properties"
  78. }
  79. }
  80. }
  81. ],
  82. "properties": {
  83. "id": {
  84. "$ref": "#/definitions/id"
  85. },
  86. "name": {
  87. "$ref": "#/definitions/description"
  88. },
  89. "description": {
  90. "$ref": "#/definitions/description"
  91. },
  92. "value": {
  93. "$ref": "#/definitions/value"
  94. },
  95. "meta": {
  96. "$ref": "#/definitions/meta"
  97. }
  98. }
  99. }