-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Entity Analytics] Add return types to all our routes #189726
Conversation
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
/ci |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @hop-dev |
x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/enable.ts
Show resolved
Hide resolved
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.
LGTM, just a small question
Summary
Add return types to all of our route handlers.
Before we did things like this in some APIs:
And I have moved to this style:
This keeps the API docs in sync, I saw that this is how they do it in the elastic assistant plugin and liked it. I think it is clearer to have this stuff in the route definition, near the URL and request validation.