put.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {
  2. "operationId": "updateUserAuth",
  3. "summary": "Update a User's Authentication",
  4. "tags": ["users"],
  5. "security": [
  6. {
  7. "bearerAuth": ["admin"]
  8. }
  9. ],
  10. "parameters": [
  11. {
  12. "in": "path",
  13. "name": "userID",
  14. "schema": {
  15. "oneOf": [
  16. {
  17. "type": "string",
  18. "pattern": "^me$"
  19. },
  20. {
  21. "type": "integer",
  22. "minimum": 1
  23. }
  24. ]
  25. },
  26. "required": true,
  27. "description": "User ID or 'me' for yourself",
  28. "example": 2
  29. }
  30. ],
  31. "requestBody": {
  32. "description": "Auth Payload",
  33. "required": true,
  34. "content": {
  35. "application/json": {
  36. "schema": {
  37. "type": "object",
  38. "required": ["type", "secret"],
  39. "properties": {
  40. "type": {
  41. "type": "string",
  42. "pattern": "^password$",
  43. "example": "password"
  44. },
  45. "current": {
  46. "type": "string",
  47. "minLength": 1,
  48. "maxLength": 64,
  49. "example": "changeme"
  50. },
  51. "secret": {
  52. "type": "string",
  53. "minLength": 8,
  54. "maxLength": 64,
  55. "example": "mySuperN3wP@ssword!"
  56. }
  57. }
  58. }
  59. }
  60. }
  61. },
  62. "responses": {
  63. "200": {
  64. "description": "200 response",
  65. "content": {
  66. "application/json": {
  67. "examples": {
  68. "default": {
  69. "value": true
  70. }
  71. },
  72. "schema": {
  73. "type": "boolean"
  74. }
  75. }
  76. }
  77. }
  78. }
  79. }