page.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * @swagger
  3. *
  4. * components:
  5. * schemas:
  6. * PagePath:
  7. * description: Page path
  8. * type: string
  9. * example: /path/to/page
  10. * PageGrant:
  11. * description: Grant for page
  12. * type: number
  13. * example: 1
  14. * Page:
  15. * description: Page
  16. * type: object
  17. * properties:
  18. * _id:
  19. * $ref: '#/components/schemas/ObjectId'
  20. * __v:
  21. * type: number
  22. * description: DB record version
  23. * example: 0
  24. * commentCount:
  25. * type: number
  26. * description: count of comments
  27. * example: 3
  28. * createdAt:
  29. * type: string
  30. * description: date created at
  31. * example: 2010-01-01T00:00:00.000Z
  32. * creator:
  33. * $ref: '#/components/schemas/User'
  34. * extended:
  35. * type: object
  36. * description: extend data
  37. * example: {}
  38. * grant:
  39. * $ref: '#/components/schemas/PageGrant'
  40. * grantedUsers:
  41. * type: array
  42. * description: granted users
  43. * items:
  44. * type: string
  45. * description: user ID
  46. * example: ["5ae5fccfc5577b0004dbd8ab"]
  47. * lastUpdateUser:
  48. * $ref: '#/components/schemas/User'
  49. * liker:
  50. * type: array
  51. * description: granted users
  52. * items:
  53. * type: string
  54. * description: user ID
  55. * example: []
  56. * path:
  57. * $ref: '#/components/schemas/PagePath'
  58. * revision:
  59. * type: string
  60. * description: page revision
  61. * seenUsers:
  62. * type: array
  63. * description: granted users
  64. * items:
  65. * type: string
  66. * description: user ID
  67. * example: ["5ae5fccfc5577b0004dbd8ab"]
  68. * status:
  69. * type: string
  70. * description: status
  71. * enum:
  72. * - 'wip'
  73. * - 'published'
  74. * - 'deleted'
  75. * - 'deprecated'
  76. * example: published
  77. * updatedAt:
  78. * type: string
  79. * description: date updated at
  80. * example: 2010-01-01T00:00:00.000Z
  81. */