Commit graph

19 commits

Author SHA1 Message Date
Jean-Louis Leysens
8278b0650a
[OAS] Publish OAS bundles to bump.sh (#197482)
## Summary

Publish OAS docs to bump.sh on merge to `main` or `8.x`

## To reviewers
* For now actual publication requires a manual step on bump.sh (so
things aren't going live immediately)
* Will get to serverless OAS docs next!

## Blockers

* Address vulnerable deps before merging:
https://github.com/bump-sh/cli/issues/583

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-14 09:15:47 +01:00
Nick Peihl
fcc939281d
[OAS][Docs] Use correct bump dependency in makefile (#199876)
## Summary

Updates the Open API docs make targets to use the correct bump.sh
dependency.

Unless I'm missing something obvious in my local configuration, `@npx
bump ...` uses [node-bump](https://www.npmjs.com/package/bump) not the
[bump.sh library](https://www.npmjs.com/package/bump-cli). I discovered
this while trying to run the make targets locally.
2024-11-13 08:13:54 -05:00
Lisa Cawley
907d19b7b8
[OpenAPI] Add redocly lint configuration (#199360) 2024-11-08 14:07:55 -06:00
Jean-Louis Leysens
77ce0fcbcf
[OAS] Removing staging files (#197455)
## Summary

Removing staging files for now. We can always revert this if it turns
out we need them.

## Reviewers

* I might be missing something in removing these, but right now I think
they are making commit noise and not really serving a purpose
* I moved the `final_merge` step to after the OAS snapshot capture
2024-10-24 09:52:13 -05:00
Lisa Cawley
2656e5a4ff
[DOCS][OpenAPI] Add descriptions, examples, tags, responses for space APIs (#195333)
Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2024-10-18 14:03:06 -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