Commit graph

20 commits

Author SHA1 Message Date
Jean-Louis Leysens
b3d1d7a89c
[8.16] [OAS] Publish OAS bundles to bump.sh (#197482) (#200136)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[OAS] Publish OAS bundles to bump.sh
(#197482)](https://github.com/elastic/kibana/pull/197482)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-11-14T08:15:47Z","message":"[OAS]
Publish OAS bundles to bump.sh (#197482)\n\n## Summary\r\n\r\nPublish
OAS docs to bump.sh on merge to `main` or `8.x`\r\n\r\n## To
reviewers\r\n* For now actual publication requires a manual step on
bump.sh (so\r\nthings aren't going live immediately)\r\n* Will get to
serverless OAS docs next!\r\n\r\n## Blockers\r\n\r\n* Address vulnerable
deps before
merging:\r\nhttps://github.com/bump-sh/cli/issues/583\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8278b0650ad4bb35e1a702889afad1f96eae2cd6","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:OAS","v8.16.0","backport:version","v8.17.0"],"number":197482,"url":"https://github.com/elastic/kibana/pull/197482","mergeCommit":{"message":"[OAS]
Publish OAS bundles to bump.sh (#197482)\n\n## Summary\r\n\r\nPublish
OAS docs to bump.sh on merge to `main` or `8.x`\r\n\r\n## To
reviewers\r\n* For now actual publication requires a manual step on
bump.sh (so\r\nthings aren't going live immediately)\r\n* Will get to
serverless OAS docs next!\r\n\r\n## Blockers\r\n\r\n* Address vulnerable
deps before
merging:\r\nhttps://github.com/bump-sh/cli/issues/583\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8278b0650ad4bb35e1a702889afad1f96eae2cd6"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197482","number":197482,"mergeCommit":{"message":"[OAS]
Publish OAS bundles to bump.sh (#197482)\n\n## Summary\r\n\r\nPublish
OAS docs to bump.sh on merge to `main` or `8.x`\r\n\r\n## To
reviewers\r\n* For now actual publication requires a manual step on
bump.sh (so\r\nthings aren't going live immediately)\r\n* Will get to
serverless OAS docs next!\r\n\r\n## Blockers\r\n\r\n* Address vulnerable
deps before
merging:\r\nhttps://github.com/bump-sh/cli/issues/583\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8278b0650ad4bb35e1a702889afad1f96eae2cd6"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-11-27 15:58:38 +01:00
Nick Peihl
b56e6c857f
[8.16] [OAS][Docs] Use correct bump dependency in makefile (#199876) (#200002)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[OAS][Docs] Use correct bump dependency in makefile
(#199876)](https://github.com/elastic/kibana/pull/199876)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Nick
Peihl","email":"nick.peihl@elastic.co"},"sourceCommit":{"committedDate":"2024-11-13T13:13:54Z","message":"[OAS][Docs]
Use correct bump dependency in makefile (#199876)\n\n##
Summary\r\n\r\nUpdates the Open API docs make targets to use the correct
bump.sh\r\ndependency.\r\n\r\nUnless I'm missing something obvious in my
local configuration, `@npx\r\nbump ...` uses
[node-bump](https://www.npmjs.com/package/bump) not the\r\n[bump.sh
library](https://www.npmjs.com/package/bump-cli). I discovered\r\nthis
while trying to run the make targets
locally.","sha":"fcc939281d504a368f96c89d302c860ccb7c4dfe","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:OAS","backport:version","v8.17.0","v8.16.1"],"number":199876,"url":"https://github.com/elastic/kibana/pull/199876","mergeCommit":{"message":"[OAS][Docs]
Use correct bump dependency in makefile (#199876)\n\n##
Summary\r\n\r\nUpdates the Open API docs make targets to use the correct
bump.sh\r\ndependency.\r\n\r\nUnless I'm missing something obvious in my
local configuration, `@npx\r\nbump ...` uses
[node-bump](https://www.npmjs.com/package/bump) not the\r\n[bump.sh
library](https://www.npmjs.com/package/bump-cli). I discovered\r\nthis
while trying to run the make targets
locally.","sha":"fcc939281d504a368f96c89d302c860ccb7c4dfe"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199876","number":199876,"mergeCommit":{"message":"[OAS][Docs]
Use correct bump dependency in makefile (#199876)\n\n##
Summary\r\n\r\nUpdates the Open API docs make targets to use the correct
bump.sh\r\ndependency.\r\n\r\nUnless I'm missing something obvious in my
local configuration, `@npx\r\nbump ...` uses
[node-bump](https://www.npmjs.com/package/bump) not the\r\n[bump.sh
library](https://www.npmjs.com/package/bump-cli). I discovered\r\nthis
while trying to run the make targets
locally.","sha":"fcc939281d504a368f96c89d302c860ccb7c4dfe"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2024-11-13 07:58:02 -08:00
Lisa Cawley
df500bddb7
[8.16][OpenAPI] Update branch detail in API introduction (#199883) 2024-11-12 17:44:41 -06:00
Lisa Cawley
41a7e61855
[8.16] [OpenAPI] Add redocly lint configuration (#199360) (#199555)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[OpenAPI] Add redocly lint configuration
(#199360)](https://github.com/elastic/kibana/pull/199360)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2024-11-08T20:07:55Z","message":"[OpenAPI]
Add redocly lint configuration
(#199360)","sha":"907d19b7b82598ab070901f772323b71b583bc65","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:OAS","v8.16.0","backport:version","v8.17.0"],"number":199360,"url":"https://github.com/elastic/kibana/pull/199360","mergeCommit":{"message":"[OpenAPI]
Add redocly lint configuration
(#199360)","sha":"907d19b7b82598ab070901f772323b71b583bc65"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199360","number":199360,"mergeCommit":{"message":"[OpenAPI]
Add redocly lint configuration
(#199360)","sha":"907d19b7b82598ab070901f772323b71b583bc65"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

NOTE: I've also removed the serverless commands from the makefile, since
they're not relevant to this branch.

This PR will encounter CI failures until
https://github.com/elastic/kibana/pull/199571 is merged.
2024-11-08 21:35:17 -06:00
Lisa Cawley
02079f6024
[8.16] [OAS] Removing staging files (#197455) (#199571)
# Backport

This will backport the following commits from `main` to `8.16`:
 - [OAS] Removing staging files (#197455) (77ce0fcb)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T14:52:13Z","message":"[OAS]
Removing staging files (#197455)\n\n## Summary\r\n\r\nRemoving staging
files for now. We can always revert this if it turns\r\nout we need
them.\r\n\r\n## Reviewers\r\n\r\n* I might be missing something in
removing these, but right now I think\r\nthey are making commit noise
and not really serving a purpose\r\n* I moved the `final_merge` step to
after the OAS snapshot
capture","sha":"77ce0fcbcf18805d2ae1ac2d21a449c03deec022"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->

Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2024-11-08 19:17:32 -06:00
Kibana Machine
689c847dfe
[8.16] [DOCS][OpenAPI] Add descriptions, examples, tags, responses for space APIs (#195333) (#196943)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[DOCS][OpenAPI] Add descriptions, examples, tags, responses for space
APIs (#195333)](https://github.com/elastic/kibana/pull/195333)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2024-10-18T19:03:06Z","message":"[DOCS][OpenAPI]
Add descriptions, examples, tags, responses for space APIs
(#195333)\n\nCo-authored-by: Elena Shostak
<165678770+elena-shostak@users.noreply.github.com>","sha":"2656e5a4ff79277c9a370ee24d6692ccb1d3142c","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Security/Spaces","release_note:skip","v9.0.0","docs","v8.16.0","backport:version","v8.17.0"],"title":"[DOCS][OpenAPI]
Add descriptions, examples, tags, responses for space
APIs","number":195333,"url":"https://github.com/elastic/kibana/pull/195333","mergeCommit":{"message":"[DOCS][OpenAPI]
Add descriptions, examples, tags, responses for space APIs
(#195333)\n\nCo-authored-by: Elena Shostak
<165678770+elena-shostak@users.noreply.github.com>","sha":"2656e5a4ff79277c9a370ee24d6692ccb1d3142c"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195333","number":195333,"mergeCommit":{"message":"[DOCS][OpenAPI]
Add descriptions, examples, tags, responses for space APIs
(#195333)\n\nCo-authored-by: Elena Shostak
<165678770+elena-shostak@users.noreply.github.com>","sha":"2656e5a4ff79277c9a370ee24d6692ccb1d3142c"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-10-18 15:43:40 -05:00
Lisa Cawley
86f9af8243
[OAS][DOCS] Add overlays for connector config and examples (#191791) 2024-09-05 11:19:52 -05:00
natasha-moore-elastic
9babac00ee
[OAS][DOCS] Adds linting rule for missing property descriptions (#191594)
## Summary

Resolves https://github.com/elastic/docs-projects/issues/237 by adding a
custom linting rule for missing property descriptions.

---------

Co-authored-by: lcawl <lcawley@elastic.co>
2024-08-29 09:44:29 +01:00
Lisa Cawley
e429b73e5a
[OAS][DOCS] Use automated alerting rule API documentation (#190205)
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2024-08-15 17:07:56 -05:00
Lisa Cawley
1144c0cea7
[OAS][DOCS] Temporarily omit security APIs from docs (#190467) 2024-08-14 11:52:18 -05:00
Maxim Palenov
7a2e7bef96
[HTTP/OAS] Merge OpenAPI specs by using kbn-openapi-bundler (#189262)
**Addresses:** https://github.com/elastic/kibana/issues/186356
**Relates to:** https://github.com/elastic/kibana/issues/184428

## Summary

This PR adds a merging JS script based on the utility implemented in https://github.com/elastic/kibana/issues/186356. Resulted OpenAPI bundle as committed in `oas_docs/output/kibana.serverless.bundled.yaml`.

## Details

https://github.com/elastic/kibana/pull/188110 implements and exposes `merge` utility design to merge source OpenAPI specs without processing. It's has only a programmatic API. To merge OpenAPI specs it's required to add a JS script like below

```js
const { merge } = require('@kbn/openapi-bundler');

(async () => {
  await merge({
   sourceGlobs: [/* a list of source globs goes here */],
   outputFilePath: 'path/to/the/output/file.yaml',
  });
})();
```

The JS script added in this PR includes source OpenAPI specs presented in `oas_docs/makefile` plus Security Solution OpenAPI specs based on https://github.com/elastic/kibana/issues/184428.

**To run** the script use the following command from Kibana root folder

```bash
node ./oas_docs/scripts/merge_serverless_oas.js 
```

## Known linting issues with Security Solution OpenAPI specs

Running Spectral OpenAPI linter on the result bundle shows a number of errors caused by `no-$ref-siblings` rule. This caused by the current code generator implementation which requires `default` property to be set next to `$ref` though it's not correct for OpenAPI `3.0.3` while it's allowed in `3.1`. It seems that Bump.sh handles such cases properly though by properly showing a default value.

We need to analyze the problem and decide if/when we should fix it.

The rest of warnings look fixable and will be addressed in the next stage after setting up linter rules.

## Next steps

Since `@kbn/openapi-bundler` package is tailored specifically for Kibana it should replace Redocly currently used to merge OpenAPI specs. It also means `oas_docs/makefile` should be superseded by JS script(s) using `merge` utility form `@kbn/openapi-bundler` package.

`@kbn/openapi-bundler` SHOULD NOT replace OpenAPI linters since it doesn't perform thorough linting. It's good if we continue adopting `spectral-cli` for linting purposes.
2024-08-13 12:45:35 +02:00
Lisa Cawley
d323898483
[OAS][DOCS] Add tag x-displayName in overlays (#189842) 2024-08-06 11:13:31 -07:00
Lisa Cawley
176a2210d7
[OAS][DOCS] Add temporary overlays for Kibana API documents (#189322) 2024-08-01 09:38:01 -07:00
Lisa Cawley
8a26557491
[DOCS][OAS] Add alerting to Kibana API bundle (#188885) 2024-07-30 17:59:47 -05:00
Lisa Cawley
d86e139343
[DOCS][OAS] Add cases to Kibana API bundle (#189020) 2024-07-30 07:48:04 -07:00
Lisa Cawley
42c5d918d3
[OAS][DOCS] Add x-topics info about running APIs in spaces (#189144) 2024-07-25 13:23:52 -05:00
Lisa Cawley
17181e6ba5
[OAS] Combine manual and automated OpenAPI documents (#188702) 2024-07-22 16:20:03 -05:00
Lisa Cawley
15401de051
[OAS] Generate OpenAPI document for Kibana APIs (#188613) 2024-07-19 07:26:40 +10:00
Lisa Cawley
cd96a10529
[DOCS] Add SLO APIs to bundled OpenAPI document (#186575) 2024-06-20 19:49:05 -07:00
Lisa Cawley
bdef3aed2b
[HTTP/OAS] Add makefile to oas_docs (#185911) 2024-06-19 08:57:00 -07:00