user-object.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {
  2. "type": "object",
  3. "description": "User object",
  4. "required": ["id", "created_on", "modified_on", "is_disabled", "email", "name", "nickname", "avatar", "roles"],
  5. "additionalProperties": false,
  6. "properties": {
  7. "id": {
  8. "type": "integer",
  9. "description": "User ID",
  10. "minimum": 1,
  11. "example": 1
  12. },
  13. "created_on": {
  14. "type": "string",
  15. "description": "Created Date",
  16. "example": "2020-01-30T09:36:08.000Z"
  17. },
  18. "modified_on": {
  19. "type": "string",
  20. "description": "Modified Date",
  21. "example": "2020-01-30T09:41:04.000Z"
  22. },
  23. "is_disabled": {
  24. "type": "boolean",
  25. "description": "Is user Disabled",
  26. "example": true
  27. },
  28. "email": {
  29. "type": "string",
  30. "description": "Email",
  31. "minLength": 3,
  32. "example": "[email protected]"
  33. },
  34. "name": {
  35. "type": "string",
  36. "description": "Name",
  37. "minLength": 1,
  38. "example": "Jamie Curnow"
  39. },
  40. "nickname": {
  41. "type": "string",
  42. "description": "Nickname",
  43. "example": "James"
  44. },
  45. "avatar": {
  46. "type": "string",
  47. "description": "Gravatar URL based on email, without scheme",
  48. "example": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm"
  49. },
  50. "roles": {
  51. "description": "Roles applied",
  52. "example": ["admin"],
  53. "type": "array",
  54. "items": {
  55. "type": "string"
  56. }
  57. },
  58. "permissions": {
  59. "type": "object",
  60. "description": "Permissions if expanded in request",
  61. "required": [
  62. "visibility",
  63. "proxy_hosts",
  64. "redirection_hosts",
  65. "dead_hosts",
  66. "streams",
  67. "access_lists",
  68. "certificates"
  69. ],
  70. "properties": {
  71. "visibility": {
  72. "type": "string",
  73. "description": "Visibility level",
  74. "example": "all",
  75. "pattern": "^(all|user)$"
  76. },
  77. "proxy_hosts": {
  78. "type": "string",
  79. "description": "Proxy Hosts access level",
  80. "example": "manage",
  81. "pattern": "^(manage|view|hidden)$"
  82. },
  83. "redirection_hosts": {
  84. "type": "string",
  85. "description": "Redirection Hosts access level",
  86. "example": "manage",
  87. "pattern": "^(manage|view|hidden)$"
  88. },
  89. "dead_hosts": {
  90. "type": "string",
  91. "description": "Dead Hosts access level",
  92. "example": "manage",
  93. "pattern": "^(manage|view|hidden)$"
  94. },
  95. "streams": {
  96. "type": "string",
  97. "description": "Streams access level",
  98. "example": "manage",
  99. "pattern": "^(manage|view|hidden)$"
  100. },
  101. "access_lists": {
  102. "type": "string",
  103. "description": "Access Lists access level",
  104. "example": "hidden",
  105. "pattern": "^(manage|view|hidden)$"
  106. },
  107. "certificates": {
  108. "type": "string",
  109. "description": "Certificates access level",
  110. "example": "view",
  111. "pattern": "^(manage|view|hidden)$"
  112. }
  113. }
  114. }
  115. }
  116. }