mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
[Security Solution] Auto-bundle Lists API OpenAPI specs (#188407)
**Addresses**: https://github.com/elastic/kibana/issues/184428 ## Summary This PR adds scripts for automatic bundling of Lists API OpenAPI specs as a part of PR pipeline. Corresponding resulting bundles are automatically committed in the Lists common package `kbn-securitysolution-lists-common` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to https://github.com/elastic/kibana/pull/186384).
This commit is contained in:
parent
9d4c061247
commit
c76f68e55c
10 changed files with 3102 additions and 5 deletions
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
require('../../../src/setup_node_env');
|
||||
const { join, resolve } = require('path');
|
||||
const { bundle } = require('@kbn/openapi-bundler');
|
||||
|
||||
const ROOT = resolve(__dirname, '..');
|
||||
|
||||
(async () => {
|
||||
await bundle({
|
||||
sourceGlob: join(ROOT, 'api/**/*.schema.yaml'),
|
||||
outputFilePath: join(
|
||||
ROOT,
|
||||
'docs/openapi/serverless/security_solution_lists_api_{version}.bundled.schema.yaml'
|
||||
),
|
||||
options: {
|
||||
includeLabels: ['serverless'],
|
||||
specInfo: {
|
||||
title: 'Security Solution Lists API (Elastic Cloud Serverless)',
|
||||
description: 'Lists API allows you to manage lists of keywords, IPs or IP ranges items.',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await bundle({
|
||||
sourceGlob: join(ROOT, 'api/**/*.schema.yaml'),
|
||||
outputFilePath: join(
|
||||
ROOT,
|
||||
'docs/openapi/ess/security_solution_lists_api_{version}.bundled.schema.yaml'
|
||||
),
|
||||
options: {
|
||||
includeLabels: ['ess'],
|
||||
specInfo: {
|
||||
title: 'Security Solution Lists API (Elastic Cloud and self-hosted)',
|
||||
description: 'Lists API allows you to manage lists of keywords, IPs or IP ranges items.',
|
||||
},
|
||||
},
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue