put.json 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. "operationId": "updateSetting",
  3. "summary": "Update a setting",
  4. "tags": ["settings"],
  5. "security": [
  6. {
  7. "bearerAuth": ["admin"]
  8. }
  9. ],
  10. "parameters": [
  11. {
  12. "in": "path",
  13. "name": "settingID",
  14. "schema": {
  15. "type": "string",
  16. "minLength": 1,
  17. "enum": ["default-site"]
  18. },
  19. "required": true,
  20. "description": "Setting ID",
  21. "example": "default-site"
  22. }
  23. ],
  24. "requestBody": {
  25. "description": "Setting Payload",
  26. "required": true,
  27. "content": {
  28. "application/json": {
  29. "schema": {
  30. "type": "object",
  31. "additionalProperties": false,
  32. "minProperties": 1,
  33. "properties": {
  34. "value": {
  35. "type": "string",
  36. "minLength": 1,
  37. "enum": ["congratulations", "404", "444", "redirect", "html"],
  38. "example": "html"
  39. },
  40. "meta": {
  41. "type": "object",
  42. "additionalProperties": false,
  43. "properties": {
  44. "redirect": {
  45. "type": "string"
  46. },
  47. "html": {
  48. "type": "string"
  49. }
  50. },
  51. "example": {
  52. "html": "<p>hello world</p>"
  53. }
  54. }
  55. }
  56. },
  57. "example": {
  58. "value": "congratulations",
  59. "meta": {}
  60. }
  61. }
  62. }
  63. },
  64. "responses": {
  65. "200": {
  66. "description": "200 response",
  67. "content": {
  68. "application/json": {
  69. "examples": {
  70. "default": {
  71. "value": {
  72. "id": "default-site",
  73. "name": "Default Site",
  74. "description": "What to show when Nginx is hit with an unknown Host",
  75. "value": "congratulations",
  76. "meta": {}
  77. }
  78. }
  79. },
  80. "schema": {
  81. "$ref": "../../../components/setting-object.json"
  82. }
  83. }
  84. }
  85. }
  86. }
  87. }