kibana/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js
natasha-moore-elastic cebcf01d35
[DOCS] Adds conceptual content to API docs (#202305)
## Summary

Resolves https://github.com/elastic/security-docs-internal/issues/49.

In order to retire asciidoc API docs, we first need to move over any
relevant content from those docs to the API reference site. This PR adds
the relevant conceptual information from:

-
https://www.elastic.co/guide/en/security/master/exceptions-api-overview.html
-
https://www.elastic.co/guide/en/security/master/lists-api-overview.html
- https://www.elastic.co/guide/en/security/master/rule-api-overview.html

### Previews:
Bump previews expire after 30min, so I'm providing screenshots below:

Detections preview:

![detections_preview](https://github.com/user-attachments/assets/c47b9d85-b5d0-4a32-8668-dc1ae2215681)

Exceptions preview:

![exceptions_preview](https://github.com/user-attachments/assets/b3fe9139-2162-4c56-bba9-751dffa11cb4)

Lists preview:

![lists_preview](https://github.com/user-attachments/assets/1c714f17-825d-45c7-8112-cc3d25c51047)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:53:29 +00:00

40 lines
1.3 KiB
JavaScript

/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", 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'],
prototypeDocument: join(ROOT, 'scripts/openapi_bundle_info/lists_serverless.info.yaml'),
},
});
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'],
prototypeDocument: join(ROOT, 'scripts/openapi_bundle_info/lists_ess.info.yaml'),
},
});
})();