definition-apiv1.js 975 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const pkg = require('../../package.json');
  2. module.exports = {
  3. openapi: '3.0.1',
  4. info: {
  5. title: 'GROWI REST API v1',
  6. version: pkg.version,
  7. },
  8. servers: [
  9. {
  10. url: '{server}/_api',
  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). This can be set to your GROWI instance URL.',
  16. },
  17. },
  18. },
  19. {
  20. url: 'https://demo.growi.org/_api',
  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. },
  43. },
  44. };