Skip to content

Commit caad894

Browse files
janmonschkekibanamachineelasticmachine
authored
[Threat Hunting Investigations] Use OpenAPI types in more timeline routes (#189977)
## Summary Fixes: elastic/security-team#10133 Migrates some timeline routes to use the newly generated OpenAPI types. The changes mostly affect pinned event and note routes to keep the changes small. Routes that actually accept and return timeline objects will come in a next step. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
1 parent 80f938e commit caad894

File tree

45 files changed

+675
-560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+675
-560
lines changed

oas_docs/output/kibana.serverless.staging.yaml

Lines changed: 87 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15090,7 +15090,8 @@ paths:
1509015090
type: string
1509115091
required:
1509215092
- noteId
15093-
- type: object
15093+
- nullable: true
15094+
type: object
1509415095
properties:
1509515096
noteIds:
1509615097
items:
@@ -15121,19 +15122,18 @@ paths:
1512115122
parameters:
1512215123
- in: query
1512315124
name: documentIds
15124-
required: true
1512515125
schema:
1512615126
$ref: '#/components/schemas/Security_Solution_Timeline_API_DocumentIds'
1512715127
- in: query
1512815128
name: page
1512915129
schema:
1513015130
nullable: true
15131-
type: number
15131+
type: string
1513215132
- in: query
1513315133
name: perPage
1513415134
schema:
1513515135
nullable: true
15136-
type: number
15136+
type: string
1513715137
- in: query
1513815138
name: search
1513915139
schema:
@@ -15156,6 +15156,13 @@ paths:
1515615156
type: string
1515715157
responses:
1515815158
'200':
15159+
content:
15160+
application/json; Elastic-Api-Version=2023-10-31:
15161+
schema:
15162+
oneOf:
15163+
- $ref: >-
15164+
#/components/schemas/Security_Solution_Timeline_API_GetNotesResult
15165+
- type: object
1515915166
description: Indicates the requested notes were returned.
1516015167
summary: Get notes
1516115168
tags:
@@ -15205,19 +15212,8 @@ paths:
1520515212
type: object
1520615213
properties:
1520715214
persistNote:
15208-
type: object
15209-
properties:
15210-
code:
15211-
type: number
15212-
message:
15213-
type: string
15214-
note:
15215-
$ref: >-
15216-
#/components/schemas/Security_Solution_Timeline_API_Note
15217-
required:
15218-
- code
15219-
- message
15220-
- note
15215+
$ref: >-
15216+
#/components/schemas/Security_Solution_Timeline_API_ResponseNote
1522115217
required:
1522215218
- persistNote
1522315219
required:
@@ -15589,15 +15585,8 @@ paths:
1558915585
type: object
1559015586
properties:
1559115587
persistPinnedEventOnTimeline:
15592-
allOf:
15593-
- $ref: >-
15594-
#/components/schemas/Security_Solution_Timeline_API_PinnedEvent
15595-
- type: object
15596-
properties:
15597-
code:
15598-
type: number
15599-
message:
15600-
type: string
15588+
$ref: >-
15589+
#/components/schemas/Security_Solution_Timeline_API_PersistPinnedEventResponse
1560115590
required:
1560215591
- persistPinnedEventOnTimeline
1560315592
required:
@@ -32400,15 +32389,36 @@ components:
3240032389
nullable: true
3240132390
type: string
3240232391
timelineId:
32392+
type: string
32393+
updated:
32394+
nullable: true
32395+
type: number
32396+
updatedBy:
32397+
nullable: true
32398+
type: string
32399+
required:
32400+
- timelineId
32401+
Security_Solution_Timeline_API_BarePinnedEvent:
32402+
type: object
32403+
properties:
32404+
created:
32405+
nullable: true
32406+
type: number
32407+
createdBy:
3240332408
nullable: true
3240432409
type: string
32410+
eventId:
32411+
type: string
32412+
timelineId:
32413+
type: string
3240532414
updated:
3240632415
nullable: true
3240732416
type: number
3240832417
updatedBy:
3240932418
nullable: true
3241032419
type: string
3241132420
required:
32421+
- eventId
3241232422
- timelineId
3241332423
Security_Solution_Timeline_API_ColumnHeaderResult:
3241432424
type: object
@@ -32584,6 +32594,18 @@ components:
3258432594
type: string
3258532595
script:
3258632596
type: string
32597+
Security_Solution_Timeline_API_GetNotesResult:
32598+
type: object
32599+
properties:
32600+
notes:
32601+
items:
32602+
$ref: '#/components/schemas/Security_Solution_Timeline_API_Note'
32603+
type: array
32604+
totalCount:
32605+
type: number
32606+
required:
32607+
- totalCount
32608+
- notes
3258732609
Security_Solution_Timeline_API_ImportTimelineResult:
3258832610
type: object
3258932611
properties:
@@ -32644,34 +32666,38 @@ components:
3264432666
type: string
3264532667
version:
3264632668
type: string
32669+
required:
32670+
- noteId
32671+
- version
32672+
Security_Solution_Timeline_API_PersistPinnedEventResponse:
32673+
oneOf:
32674+
- allOf:
32675+
- $ref: '#/components/schemas/Security_Solution_Timeline_API_PinnedEvent'
32676+
- $ref: >-
32677+
#/components/schemas/Security_Solution_Timeline_API_PinnedEventBaseResponseBody
32678+
- nullable: true
32679+
type: object
3264732680
Security_Solution_Timeline_API_PinnedEvent:
32681+
allOf:
32682+
- $ref: '#/components/schemas/Security_Solution_Timeline_API_BarePinnedEvent'
32683+
- type: object
32684+
properties:
32685+
pinnedEventId:
32686+
type: string
32687+
version:
32688+
type: string
32689+
required:
32690+
- pinnedEventId
32691+
- version
32692+
Security_Solution_Timeline_API_PinnedEventBaseResponseBody:
3264832693
type: object
3264932694
properties:
32650-
created:
32651-
nullable: true
32652-
type: number
32653-
createdBy:
32654-
nullable: true
32655-
type: string
32656-
eventId:
32657-
type: string
32658-
pinnedEventId:
32659-
type: string
32660-
timelineId:
32661-
type: string
32662-
updated:
32663-
nullable: true
32695+
code:
3266432696
type: number
32665-
updatedBy:
32666-
nullable: true
32667-
type: string
32668-
version:
32697+
message:
3266932698
type: string
3267032699
required:
32671-
- eventId
32672-
- pinnedEventId
32673-
- timelineId
32674-
- version
32700+
- code
3267532701
Security_Solution_Timeline_API_QueryMatchResult:
3267632702
type: object
3267732703
properties:
@@ -32716,6 +32742,19 @@ components:
3271632742
type: object
3271732743
readable:
3271832744
type: boolean
32745+
Security_Solution_Timeline_API_ResponseNote:
32746+
type: object
32747+
properties:
32748+
code:
32749+
type: number
32750+
message:
32751+
type: string
32752+
note:
32753+
$ref: '#/components/schemas/Security_Solution_Timeline_API_Note'
32754+
required:
32755+
- code
32756+
- message
32757+
- note
3271932758
Security_Solution_Timeline_API_RowRendererId:
3272032759
enum:
3272132760
- alert

0 commit comments

Comments
 (0)