definition-apiv3.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. const pkg = require('../../package.json');
  2. module.exports = {
  3. openapi: '3.0.1',
  4. info: {
  5. title: 'GROWI REST API v3',
  6. version: pkg.version,
  7. },
  8. servers: [
  9. {
  10. url: 'https://demo.growi.org/_api/v3',
  11. },
  12. ],
  13. security: [
  14. {
  15. bearer: [],
  16. accessTokenInQuery: [],
  17. },
  18. ],
  19. components: {
  20. securitySchemes: {
  21. bearer: {
  22. type: 'http',
  23. scheme: 'bearer',
  24. description: 'Access token generated by each GROWI users',
  25. },
  26. accessTokenInQuery: {
  27. type: 'apiKey',
  28. name: 'access_token',
  29. in: 'query',
  30. description: 'Access token generated by each GROWI users',
  31. },
  32. cookieAuth: {
  33. type: 'apiKey',
  34. in: 'cookie',
  35. name: 'connect.sid',
  36. },
  37. transferHeaderAuth: {
  38. type: 'apiKey',
  39. in: 'header',
  40. name: 'x-growi-transfer-key',
  41. },
  42. },
  43. },
  44. 'x-tagGroups': [
  45. {
  46. name: 'User API',
  47. tags: [
  48. 'Attachment',
  49. 'Bookmarks',
  50. 'BookmarkFolders',
  51. 'Page',
  52. 'Pages',
  53. 'PageListing',
  54. 'Revisions',
  55. 'ShareLinks',
  56. 'Users',
  57. 'UserUISettings',
  58. '',
  59. ],
  60. },
  61. {
  62. name: 'User Personal Settings API',
  63. tags: [
  64. 'GeneralSetting',
  65. 'EditorSetting',
  66. 'InAppNotificationSettings',
  67. '',
  68. '',
  69. '',
  70. '',
  71. '',
  72. ],
  73. },
  74. {
  75. name: 'System Management API',
  76. tags: [
  77. 'Home',
  78. 'Activity',
  79. 'AdminHome',
  80. 'AppSettings',
  81. 'ExternalUserGroups',
  82. 'SecuritySetting',
  83. 'MarkDownSetting',
  84. 'CustomizeSetting',
  85. 'Import',
  86. 'Export',
  87. 'GROWI to GROWI Transfer',
  88. 'MongoDB',
  89. 'NotificationSetting',
  90. 'Plugins',
  91. 'Questionnaire',
  92. 'QuestionnaireSetting',
  93. 'SlackIntegration',
  94. 'SlackIntegrationSettings',
  95. 'SlackIntegrationSettings (with proxy)',
  96. 'SlackIntegrationSettings (without proxy)',
  97. 'SlackIntegrationLegacySetting',
  98. 'ShareLink Management',
  99. 'Templates',
  100. 'Staff',
  101. 'UserGroupRelations',
  102. 'UserGroups',
  103. 'Users Management',
  104. 'FullTextSearch Management',
  105. 'Install',
  106. ],
  107. },
  108. {
  109. name: 'Public API',
  110. tags: [
  111. 'Healthcheck',
  112. 'Statistics',
  113. '',
  114. '',
  115. '',
  116. '',
  117. '',
  118. '',
  119. ],
  120. },
  121. ],
  122. };