kibana/oas_docs/scripts/merge_ess_oas.js
Lisa Cawley d882e4b0d8
[8.x] [DOCS] Add minimal synthetic APIs (#214518) (#217901)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[DOCS] Add minimal synthetic APIs
(#214518)](https://github.com/elastic/kibana/pull/214518)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2025-04-10T17:26:49Z","message":"[DOCS]
Add minimal synthetic APIs (#214518)\n\nCo-authored-by: Colleen McGinnis
<colleen.j.mcginnis@gmail.com>","sha":"e00f013b62a42a2870be3b7a3e4cadab8ba191c4","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[DOCS]
Add minimal synthetic
APIs","number":214518,"url":"https://github.com/elastic/kibana/pull/214518","mergeCommit":{"message":"[DOCS]
Add minimal synthetic APIs (#214518)\n\nCo-authored-by: Colleen McGinnis
<colleen.j.mcginnis@gmail.com>","sha":"e00f013b62a42a2870be3b7a3e4cadab8ba191c4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214518","number":214518,"mergeCommit":{"message":"[DOCS]
Add minimal synthetic APIs (#214518)\n\nCo-authored-by: Colleen McGinnis
<colleen.j.mcginnis@gmail.com>","sha":"e00f013b62a42a2870be3b7a3e4cadab8ba191c4"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-11 10:53:09 -04:00

49 lines
2.9 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 { merge } = require('@kbn/openapi-bundler');
const { REPO_ROOT } = require('@kbn/repo-info');
(async () => {
await merge({
sourceGlobs: [
`${REPO_ROOT}/oas_docs/bundle.json`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/alerting/docs/openapi/bundled.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.yaml`,
`${REPO_ROOT}/src/platform/plugins/shared/data_views/docs/openapi/bundled.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/ml/common/openapi/ml_apis.yaml`,
`${REPO_ROOT}/src/core/packages/saved-objects/docs/openapi/bundled.yaml`,
`${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/private/upgrade_assistant/docs/openapi/upgrade_apis.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/security/docs/openapi/user_session_apis.yaml`,
`${REPO_ROOT}/src/platform/plugins/shared/share/docs/openapi/short_url_apis.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/private/logstash/docs/openapi/logstash_apis.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/task_manager/docs/openapi/bundled.yaml`,
// Observability Solution
`${REPO_ROOT}/x-pack/solutions/observability/plugins/apm/docs/openapi/apm/bundled.yaml`,
`${REPO_ROOT}/x-pack/solutions/observability/plugins/slo/docs/openapi/slo/bundled.yaml`,
`${REPO_ROOT}/x-pack/solutions/observability/plugins/uptime/docs/openapi/uptime_apis.yaml`,
`${REPO_ROOT}/x-pack/solutions/observability/plugins/synthetics/docs/openapi/synthetic_apis.yaml`,
// Security solution
`${REPO_ROOT}/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/packages/shared/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/ess/*.schema.yaml`,
],
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.yaml`,
options: {
prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.yaml`,
},
});
})();