Skip to content

Commit

Permalink
update Detections API bundling script
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Jul 29, 2024
1 parent 4f4986d commit 7ef3714
Showing 1 changed file with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,36 @@ const { join, resolve } = require('path');

const ROOT = resolve(__dirname, '../..');

bundle({
sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'),
outputFilePath: join(
ROOT,
'docs/openapi/serverless/security_solution_detections_api_{version}.bundled.schema.yaml'
),
options: {
includeLabels: ['serverless'],
specInfo: {
title: 'Security Solution Detections API (Elastic Cloud Serverless)',
description:
'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.',
(async () => {
await bundle({
sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'),
outputFilePath: join(
ROOT,
'docs/openapi/serverless/security_solution_detections_api_{version}.bundled.schema.yaml'
),
options: {
includeLabels: ['serverless'],
specInfo: {
title: 'Security Solution Detections API (Elastic Cloud Serverless)',
description:
'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.',
},
},
},
});
});

bundle({
sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'),
outputFilePath: join(
ROOT,
'docs/openapi/ess/security_solution_detections_api_{version}.bundled.schema.yaml'
),
options: {
includeLabels: ['ess'],
specInfo: {
title: 'Security Solution Detections API (Elastic Cloud and self-hosted)',
description:
'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.',
await bundle({
sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'),
outputFilePath: join(
ROOT,
'docs/openapi/ess/security_solution_detections_api_{version}.bundled.schema.yaml'
),
options: {
includeLabels: ['ess'],
specInfo: {
title: 'Security Solution Detections API (Elastic Cloud and self-hosted)',
description:
'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.',
},
},
},
});
});
})();

0 comments on commit 7ef3714

Please sign in to comment.