definition-apiv3.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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: '{server}/_api/v3',
  11. variables: {
  12. server: {
  13. default: 'https://demo.growi.org',
  14. description:
  15. 'The base URL for the GROWI API except for the version path (/_api/v3). This can be set to your GROWI instance URL.',
  16. },
  17. },
  18. },
  19. {
  20. url: 'https://demo.growi.org/_api/v3',
  21. },
  22. ],
  23. security: [
  24. {
  25. bearer: [],
  26. accessTokenInQuery: [],
  27. },
  28. ],
  29. components: {
  30. securitySchemes: {
  31. bearer: {
  32. type: 'http',
  33. scheme: 'bearer',
  34. description: 'Access token generated by each GROWI users',
  35. },
  36. accessTokenInQuery: {
  37. type: 'apiKey',
  38. name: 'access_token',
  39. in: 'query',
  40. description: 'Access token generated by each GROWI users',
  41. },
  42. cookieAuth: {
  43. type: 'apiKey',
  44. in: 'cookie',
  45. name: 'connect.sid',
  46. },
  47. transferHeaderAuth: {
  48. type: 'apiKey',
  49. in: 'header',
  50. name: 'x-growi-transfer-key',
  51. },
  52. },
  53. parameters: {
  54. MimeTypePathParam: {
  55. name: 'mimeType',
  56. in: 'path',
  57. required: true,
  58. description: 'The MIME type to configure.',
  59. schema: {
  60. type: 'string',
  61. example: 'image/png',
  62. },
  63. },
  64. },
  65. },
  66. 'x-tagGroups': [
  67. {
  68. name: 'User API',
  69. tags: [
  70. 'Attachment',
  71. 'Bookmarks',
  72. 'BookmarkFolders',
  73. 'Page',
  74. 'Pages',
  75. 'PageListing',
  76. 'Revisions',
  77. 'ShareLinks',
  78. 'Users',
  79. 'UserUISettings',
  80. ],
  81. },
  82. {
  83. name: 'User Personal Settings API',
  84. tags: ['GeneralSetting', 'EditorSetting', 'InAppNotificationSettings'],
  85. },
  86. {
  87. name: 'System Management API',
  88. tags: [
  89. 'Home',
  90. 'Activity',
  91. 'AdminHome',
  92. 'AppSettings',
  93. 'ExternalUserGroups',
  94. 'SecuritySetting',
  95. 'MarkDownSetting',
  96. 'CustomizeSetting',
  97. 'Import',
  98. 'Export',
  99. 'GROWI to GROWI Transfer',
  100. 'MongoDB',
  101. 'NotificationSetting',
  102. 'Plugins',
  103. 'SlackIntegration',
  104. 'SlackIntegrationSettings',
  105. 'SlackIntegrationSettings (with proxy)',
  106. 'SlackIntegrationSettings (without proxy)',
  107. 'SlackIntegrationLegacySetting',
  108. 'ShareLink Management',
  109. 'Templates',
  110. 'Staff',
  111. 'UserGroupRelations',
  112. 'UserGroups',
  113. 'Users Management',
  114. 'FullTextSearch Management',
  115. 'Install',
  116. ],
  117. },
  118. {
  119. name: 'Public API',
  120. tags: ['Healthcheck', 'Statistics', '', '', '', '', '', ''],
  121. },
  122. ],
  123. };