-
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] Add missing Exceptions API OpenAPI specifications #185951
[Security Solution] Add missing Exceptions API OpenAPI specifications #185951
Conversation
22d2fc8
to
61ad063
Compare
d4d7cd8
to
09f4a03
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
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.
Looks mostly good, just a couple schemas that I don't see used anywhere?
export type CreateExceptionListItemRequestBodyCamelCase = z.infer< | ||
typeof CreateExceptionListItemRequestBodyCamelCase | ||
>; | ||
export const CreateExceptionListItemRequestBodyCamelCase = z.object({ |
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.
What's this camel case schema for? I don't see it used in the API routes
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.
Initially I had an idea to replace existing type CreateExceptionListItemOptions
in x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts
with CreateExceptionListItemRequestBodyCamelCase
but rolled back the changes due to a number of changes required.
I removed the schema. We can add it back if needed.
export type UpdateExceptionListItemRequestBodyCamelCase = z.infer< | ||
typeof UpdateExceptionListItemRequestBodyCamelCase | ||
>; | ||
export const UpdateExceptionListItemRequestBodyCamelCase = z.object({ |
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.
where do we use this camel case schema?
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.
Initially I had an idea to replace existing type UpdateExceptionListItemOptions
in x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts
with UpdateExceptionListItemRequestBodyCamelCase
but rolled back the changes due to a number of changes required.
I removed the schema. We can add it back if needed.
- name: list_id | ||
in: query | ||
required: true | ||
description: List's ide |
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.
description: List's ide | |
description: List's id |
b7a273b
to
c9a716e
Compare
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.
Thank you @maximpn, overall and code owners changes LGTM 👍
.buildkite/scripts/steps/code_generation/security_solution_codegen.sh
Outdated
Show resolved
Hide resolved
c9a716e
to
cd6d3ac
Compare
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Unknown metric groupsAPI count
History
cc @maximpn |
cd6d3ac
to
33a1a17
Compare
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.
Thanks for addressing the feedback! LGTM
33a1a17
to
a93fe4e
Compare
Resolves: #183837
Summary
This PR adds missing OpenAPI specifications for Exceptions API which are the following
POST /api/exception_lists/_export
POST /api/exception_lists/_import
POST /api/exception_lists
GET /api/exception_lists
PUT /api/exception_lists
DELETE /api/exception_lists
GET /api/exception_lists/_find
POST /api/exception_lists/_duplicate
POST /api/exception_lists/items
GET /api/exception_lists/items
PUT /api/exception_lists/items
DELETE /api/exception_lists/items
GET /api/exception_lists/items/_find
GET /api/exception_lists/summary
POST /api/exceptions/shared
POST /api/detection_engine/rules/{id}/exceptions