-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Initial migration of API endpoints to OpenAPI and code generation #164482
Conversation
fa986d3
to
e268bd6
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
@@ -31,7 +31,7 @@ check_for_changed_files() { | |||
|
|||
SHOULD_AUTO_COMMIT_CHANGES="${2:-}" | |||
CUSTOM_FIX_MESSAGE="${3:-}" | |||
GIT_CHANGES="$(git ls-files --modified -- . ':!:.bazelrc')" | |||
GIT_CHANGES="$(git status --porcelain -- . ':!:.bazelrc')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line had to be changed to support detecting files added or removed by code generation scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If auto committing docs ends up causing too many changes on pull requests and there's interest in an alternative daily build feel free to reach out.
We run the jsdoc API builds daily and auto commit those changes to the repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the PR together with @xcrzx over Zoom. It looks awesome! There were a few comments and action items that Dmitrii will post as comments and address within the PR.
...et_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.test.ts
Outdated
Show resolved
Hide resolved
e268bd6
to
de960ef
Compare
de960ef
to
62a5efd
Compare
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @xcrzx |
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
tozod
generated by OpenAPI codegen.Summary of the changes:
/api/detection_engine/rules/prepackaged/_status
route to use generatedzod
schemasstrict
schemas, i.e., schemas that do not allow any extra params