put.json 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {
  2. "operationId": "updateSetting",
  3. "summary": "Update a setting",
  4. "tags": ["Settings"],
  5. "security": [
  6. {
  7. "BearerAuth": ["settings"]
  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. },
  39. "meta": {
  40. "type": "object",
  41. "additionalProperties": false,
  42. "properties": {
  43. "redirect": {
  44. "type": "string"
  45. },
  46. "html": {
  47. "type": "string"
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }
  55. },
  56. "responses": {
  57. "200": {
  58. "description": "200 response",
  59. "content": {
  60. "application/json": {
  61. "examples": {
  62. "default": {
  63. "value": {
  64. "id": "default-site",
  65. "name": "Default Site",
  66. "description": "What to show when Nginx is hit with an unknown Host",
  67. "value": "congratulations",
  68. "meta": {}
  69. }
  70. }
  71. },
  72. "schema": {
  73. "$ref": "../../../components/setting-object.json"
  74. }
  75. }
  76. }
  77. }
  78. }
  79. }