kibana/packages/kbn-securitysolution-es-utils
Dmitrii Shevchenko 2171ecc719
[Security Solution] Initial migration of API endpoints to OpenAPI and code generation (#164482)
**Part of: https://github.com/elastic/security-team/issues/6726**

## Summary

Migrates the prebuilt rules and timelines status API route schema to
OpenAPI. This is exploratory work to assess the level of effort required
to migrate API route schemas from `io-ts` to `zod` generated by OpenAPI
codegen.

**Summary of the changes:**

- Added a CI job that runs code generation in Security Solution and
comments change if there are any.
- Migrated the `/api/detection_engine/rules/prepackaged/_status` route
to use generated `zod` schemas
- Updated schema tests
- Adjusted the code generator templates to handle `strict` schemas,
i.e., schemas that do not allow any extra params
- Updated the error transformation code to work with zod errors.
Validation errors are converted to string representations, like the
following:
<img width="627" alt="image"
src="93002573-972f-42e1-901d-01a19937f568">
2023-08-25 20:01:31 +02:00
..
src [Security Solution] Initial migration of API endpoints to OpenAPI and code generation (#164482) 2023-08-25 20:01:31 +02:00
index.ts [Security Solution][Detection Engine] move lists to data stream (#162508) 2023-08-23 19:42:57 +01:00
jest.config.js [Security Solutions] Removes circular dependencies and introduces kbn-security-solution-es-utils package (#99828) 2021-05-12 15:55:37 -06:00
kibana.jsonc [Security Solution] Clean up CODEOWNERS and other files for the Detection Engine team (#159729) 2023-06-14 10:39:50 -07:00
package.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
README.md [Security Solutions] Removes circular dependencies and introduces kbn-security-solution-es-utils package (#99828) 2021-05-12 15:55:37 -06:00
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00

kbn-securitysolution-es-utils

This is the shared security solution elastic search utilities among plugins. This was originally created to remove the dependencies between security_solution and other projects such as lists. This should only be used within server side code and not client side code since it is all elastic search utilities and packages.