Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a bundle #181992

Closed
Tracked by #180056
jloleysens opened this issue Apr 29, 2024 · 1 comment · Fixed by #183338
Closed
Tracked by #180056

Create a bundle #181992

jloleysens opened this issue Apr 29, 2024 · 1 comment · Fixed by #183338
Labels
Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@jloleysens
Copy link
Contributor

jloleysens commented Apr 29, 2024

We need a CI step that will:

(1) Create/update a single JSON bundle of all Kibana's OAS
(2) Provide a way to include/exclude certain paths or plugins (likely an extension to /api/oas), we should include only public APIs

Bonus: Possibly there are some post-bundle creation steps we should consider? Like Security solution's hand written OAS?

@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 29, 2024
@jloleysens jloleysens added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Apr 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 29, 2024
@jloleysens jloleysens added the Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS label May 6, 2024
@jloleysens jloleysens changed the title Create a bundle using the OAS bundler code that security solution has created (packages/kbn-openapi-bundler) Create a bundle May 13, 2024
jloleysens added a commit that referenced this issue May 30, 2024
Close #181992

## Summary

First iteration of a CLI to capture an OAS snapshot.

## How to test

Run `node ./scripts/capture_oas_snapshot.js --update --include-path
/api/status` and see result in `oas_docs/bundle.json`.

If you have the [bump CLI](https://www.npmjs.com/package/bump-cli)
installed you can preview the hosted output with `bump preview
./oas_docs/bundle.json`

## Notes
* Added ability to filter by `version`, `access` (public/internal) and
excluding paths explicitly to the OAS generation lib
* Follows the same general pattern as our other "capture" CLIs like
`packages/kbn-check-mappings-update-cli`
* Result includes only `/api/status` for now, waiting for other paths to
add missing parts

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants