swagger-definition-apiv3.js 717 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const path = require('node:path');
  2. const pkg = require('../../package.json');
  3. const apisBasePath = path.resolve(process.env.WORKSPACE_ROOT ?? '../../', 'apps/app');
  4. console.log(`apisBasePath: ${apisBasePath}`);
  5. module.exports = {
  6. openapi: '3.0.1',
  7. info: {
  8. title: 'GROWI REST API v3',
  9. version: pkg.version,
  10. },
  11. servers: [
  12. {
  13. url: 'https://demo.growi.org/_api/v3',
  14. },
  15. ],
  16. apis: [
  17. './src/server/routes/apiv3/**/*.{js,ts}',
  18. './src/server/models/openapi/**/*.{js,ts}',
  19. ],
  20. security: [
  21. {
  22. api_key: [],
  23. },
  24. ],
  25. components: {
  26. securitySchemes: {
  27. api_key: {
  28. type: 'apiKey',
  29. name: 'access_token',
  30. in: 'query',
  31. },
  32. },
  33. },
  34. };