mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[8.x][OpenAPI] Remove staging and serverless files and commands (#198623)
## Summary Relates to https://github.com/elastic/kibana/pull/197455 Some of the staging and serverless OpenAPI files persist in 8.x and earlier branches, so this PR removes them to hopefully reduce merge conflicts.
This commit is contained in:
parent
cca3e27468
commit
8f4e766153
9 changed files with 3 additions and 53090 deletions
|
@ -1,51 +0,0 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Kibana Serverless APIs
|
||||
description: |
|
||||
**Technical preview**
|
||||
This functionality is in technical preview and may be changed or removed in a future release.
|
||||
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
|
||||
|
||||
The Kibana REST APIs for Elastic serverless enable you to manage resources
|
||||
such as connectors, data views, and saved objects. The API calls are
|
||||
stateless. Each request that you make happens in isolation from other calls
|
||||
and must include all of the necessary information for Kibana to fulfill the
|
||||
request. API requests return JSON output, which is a format that is
|
||||
machine-readable and works well for automation.
|
||||
|
||||
To interact with Kibana APIs, use the following operations:
|
||||
|
||||
- GET: Fetches the information.
|
||||
- POST: Adds new information.
|
||||
- PUT: Updates the existing information.
|
||||
- DELETE: Removes the information.
|
||||
|
||||
You can prepend any Kibana API endpoint with `kbn:` and run the request in
|
||||
**Dev Tools → Console**. For example:
|
||||
|
||||
```
|
||||
GET kbn:/api/data_views
|
||||
```
|
||||
|
||||
## Documentation source and versions
|
||||
|
||||
This documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.
|
||||
It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).
|
||||
version: "1.0.2"
|
||||
x-doc-license:
|
||||
name: Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
url: https://creativecommons.org/licenses/by-nc-nd/4.0/
|
||||
contact:
|
||||
name: Kibana Team
|
||||
x-feedbackLink:
|
||||
label: Feedback
|
||||
url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
|
||||
security:
|
||||
- apiKeyAuth: []
|
||||
components:
|
||||
securitySchemes:
|
||||
apiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: Authorization
|
||||
description: You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).
|
|
@ -21,10 +21,6 @@ api-docs: ## Generate ESS Kibana OpenAPI bundles with kbn-openapi-bundler
|
|||
api-docs-stateful: ## Generate only kibana.yaml
|
||||
@node scripts/merge_ess_oas.js
|
||||
|
||||
.PHONY: api-docs-serverless
|
||||
api-docs-serverless: ## Generate only kibana.serverless.yaml
|
||||
@node scripts/merge_serverless_oas.js
|
||||
|
||||
.PHONY: api-docs-lint
|
||||
api-docs-lint: ## Run spectral API docs linter
|
||||
@npx @stoplight/spectral-cli lint "output/*.yaml" --ruleset ".spectral.yaml"
|
||||
|
@ -37,34 +33,22 @@ api-docs-lint-errs: ## Run spectral API docs linter and return only errors
|
|||
api-docs-lint-stateful: ## Run spectral API docs linter on kibana.yaml
|
||||
@npx @stoplight/spectral-cli lint "output/kibana.yaml" --ruleset ".spectral.yaml"
|
||||
|
||||
.PHONY: api-docs-lint-serverless
|
||||
api-docs-lint-serverless: ## Run spectral API docs linter on kibana.serverless.yaml
|
||||
@npx @stoplight/spectral-cli lint "output/kibana.serverless.yaml" --ruleset ".spectral.yaml"
|
||||
|
||||
.PHONY: api-docs-overlay
|
||||
api-docs-overlay: ## Run spectral API docs linter on kibana.serverless.yaml
|
||||
@npx bump overlay "output/kibana.serverless.yaml" "overlays/kibana.overlays.serverless.yaml" > "output/kibana.serverless.tmp1.yaml"
|
||||
@npx bump overlay "output/kibana.serverless.tmp1.yaml" "overlays/alerting.overlays.yaml" > "output/kibana.serverless.tmp2.yaml"
|
||||
@npx bump overlay "output/kibana.serverless.tmp2.yaml" "overlays/connectors.overlays.yaml" > "output/kibana.serverless.tmp3.yaml"
|
||||
@npx bump overlay "output/kibana.serverless.tmp3.yaml" "overlays/kibana.overlays.shared.yaml" > "output/kibana.serverless.tmp4.yaml"
|
||||
api-docs-overlay: ## Run spectral API docs linter
|
||||
@npx bump overlay "output/kibana.yaml" "overlays/kibana.overlays.yaml" > "output/kibana.tmp1.yaml"
|
||||
@npx bump overlay "output/kibana.tmp1.yaml" "overlays/alerting.overlays.yaml" > "output/kibana.tmp2.yaml"
|
||||
@npx bump overlay "output/kibana.tmp2.yaml" "overlays/connectors.overlays.yaml" > "output/kibana.tmp3.yaml"
|
||||
@npx bump overlay "output/kibana.tmp3.yaml" "overlays/kibana.overlays.shared.yaml" > "output/kibana.tmp4.yaml"
|
||||
@npx @redocly/cli bundle output/kibana.serverless.tmp4.yaml --ext yaml -o output/kibana.serverless.new.yaml
|
||||
@npx @redocly/cli bundle output/kibana.tmp4.yaml --ext yaml -o output/kibana.new.yaml
|
||||
rm output/kibana.tmp*.yaml
|
||||
rm output/kibana.serverless.tmp*.yaml
|
||||
|
||||
.PHONY: api-docs-preview
|
||||
api-docs-preview: ## Generate a preview for kibana.yaml and kibana.serverless.yaml
|
||||
api-docs-preview: ## Generate a preview for kibana.yaml
|
||||
@npx bump preview "output/kibana.yaml"
|
||||
@npx bump preview "output/kibana.serverless.yaml"
|
||||
|
||||
.PHONY: api-docs-overlay-preview
|
||||
api-docs-overlay-preview: ## Generate a preview for kibana.new.yaml and kibana.serverless.new.yaml
|
||||
api-docs-overlay-preview: ## Generate a preview for kibana.new.yaml
|
||||
@npx bump preview "output/kibana.new.yaml"
|
||||
@npx bump preview "output/kibana.serverless.new.yaml"
|
||||
|
||||
help: ## Display help
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,71 +0,0 @@
|
|||
# overlays.yaml
|
||||
overlay: 1.0.0
|
||||
info:
|
||||
title: Overlays for the Kibana API document
|
||||
version: 0.0.1
|
||||
actions:
|
||||
# Clean up server definitions
|
||||
- target: '$.servers.*'
|
||||
description: Remove all servers so we can add our own.
|
||||
remove: true
|
||||
- target: '$.servers'
|
||||
description: Add server into the now empty server array.
|
||||
update:
|
||||
- url: https://{kibana_url}
|
||||
variables:
|
||||
kibana_url:
|
||||
default: localhost:5601
|
||||
# Mark all operations as beta
|
||||
- target: "$.paths[*]['get','put','post','delete','options','head','patch','trace']"
|
||||
description: Add x-beta
|
||||
update:
|
||||
x-beta: true
|
||||
# Add some tag descriptions and displayNames
|
||||
- target: '$.tags[?(@.name=="alerting")]'
|
||||
description: Change tag description and displayName
|
||||
update:
|
||||
description: >
|
||||
Alerting enables you to define rules, which detect complex conditions within your data.
|
||||
When a condition is met, the rule tracks it as an alert and runs the actions that are defined in the rule.
|
||||
Actions typically involve the use of connectors to interact with Kibana services or third party integrations.
|
||||
externalDocs:
|
||||
description: Alerting documentation
|
||||
url: https://www.elastic.co/docs/8.x/serverless/rules
|
||||
x-displayName: "Alerting"
|
||||
- target: '$.tags[?(@.name=="connectors")]'
|
||||
description: Change tag description and displayName
|
||||
update:
|
||||
description: >
|
||||
Connectors provide a central place to store connection information for services and integrations with Elastic or third party systems.
|
||||
Alerting rules can use connectors to run actions when rule conditions are met.
|
||||
externalDocs:
|
||||
description: Connector documentation
|
||||
url: https://www.elastic.co/docs/8.x/serverless/action-connectors
|
||||
x-displayName: "Connectors"
|
||||
- target: '$.tags[?(@.name=="data views")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Data views"
|
||||
- target: '$.tags[?(@.name=="ml")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Machine learning"
|
||||
- target: '$.tags[?(@.name=="slo")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Service level objectives"
|
||||
- target: '$.tags[?(@.name=="spaces")]'
|
||||
description: Change displayName
|
||||
update:
|
||||
x-displayName: "Spaces"
|
||||
description: Manage your Kibana spaces.
|
||||
- target: '$.tags[?(@.name=="system")]'
|
||||
description: Change displayName and description
|
||||
update:
|
||||
x-displayName: "System"
|
||||
description: >
|
||||
Get information about the system status, resource usage, and installed plugins.
|
||||
# Remove extra tags from operations
|
||||
- target: "$.paths[*][*].tags[1:]"
|
||||
description: Remove all but first tag from operations
|
||||
remove: true
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* 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/plugins/alerting/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/cases/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis.yaml`,
|
||||
`${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`,
|
||||
|
||||
// Observability Solution
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
|
||||
|
||||
// Security solution
|
||||
`${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/ess/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/ess/*.schema.yaml`,
|
||||
],
|
||||
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.staging.yaml`,
|
||||
options: {
|
||||
prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.yaml`,
|
||||
},
|
||||
});
|
||||
})();
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* 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.serverless.json`,
|
||||
`${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml`,
|
||||
`${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`,
|
||||
|
||||
// Observability Solution
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
|
||||
|
||||
// Security solution
|
||||
`${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/serverless/*.schema.yaml`,
|
||||
],
|
||||
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.yaml`,
|
||||
options: {
|
||||
prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.serverless.yaml`,
|
||||
},
|
||||
});
|
||||
})();
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* 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.serverless.json`,
|
||||
`${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml`,
|
||||
`${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`,
|
||||
|
||||
// Observability Solution
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
|
||||
|
||||
// Security solution
|
||||
`${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`,
|
||||
`${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/serverless/*.schema.yaml`,
|
||||
],
|
||||
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.staging.yaml`,
|
||||
options: {
|
||||
prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.serverless.yaml`,
|
||||
},
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue