{"version":3,"file":"index.mjs","sources":["../../../../../src/cli/commands/openapi/index.ts"],"sourcesContent":["import { createCommand } from 'commander';\n\nimport type { StrapiCommand } from '../../types';\nimport { runAction } from '../../utils/helpers';\nimport { action as generate } from './generate';\n\n/**\n * `$ strapi openapi`\n */\nconst command: StrapiCommand = () => {\n  const openapi = createCommand('openapi').description(\n    'Manage OpenAPI specifications for your Strapi application'\n  );\n\n  // `$ strapi openapi generate [-o, --output <path>]`\n  openapi\n    .command('generate')\n    .description('Generate an OpenAPI specification for the current Strapi application')\n    .option('-o, --output <path>', 'Output file path for the OpenAPI specification')\n    .action(runAction('openapi:generate', generate));\n\n  return openapi;\n};\n\nexport { command };\n"],"names":["command","openapi","createCommand","description","option","action","runAction","generate"],"mappings":";;;;AAMA;;AAEC,UACKA,OAAAA,GAAyB,IAAA;AAC7B,IAAA,MAAMC,OAAAA,GAAUC,aAAAA,CAAc,SAAA,CAAA,CAAWC,WAAW,CAClD,2DAAA,CAAA;;AAIFF,IAAAA,OAAAA,CACGD,OAAO,CAAC,UAAA,CAAA,CACRG,WAAW,CAAC,sEAAA,CAAA,CACZC,MAAM,CAAC,qBAAA,EAAuB,gDAAA,CAAA,CAC9BC,MAAM,CAACC,UAAU,kBAAA,EAAoBC,MAAAA,CAAAA,CAAAA;IAExC,OAAON,OAAAA;AACT;;;;"}