Skip to content

Commit

Permalink
[Security Assistant] Fix Knowledge Base API (#211367)
Browse files Browse the repository at this point in the history
## Summary

Fixes bugs related to Security Assistant Knowledge Base API

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Hannah Mudge <[email protected]>
Co-authored-by: Marta Bondyra <[email protected]>
Co-authored-by: Davis Plumlee <[email protected]>
Co-authored-by: Jatin Kathuria <[email protected]>
Co-authored-by: Chris Cowan <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Arturo Lidueña <[email protected]>
Co-authored-by: Jon <[email protected]>
Co-authored-by: Rodney Norris <[email protected]>
Co-authored-by: Elena Shostak <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Irene Blanco <[email protected]>
Co-authored-by: Cauê Marcondes <[email protected]>
Co-authored-by: Carlos Crespo <[email protected]>
(cherry picked from commit c822109)
  • Loading branch information
patrykkopycinski committed Feb 25, 2025
1 parent d72c24c commit 8522d9c
Show file tree
Hide file tree
Showing 82 changed files with 1,085 additions and 178 deletions.
37 changes: 34 additions & 3 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37999,7 +37999,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -44302,6 +44302,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -44316,13 +44319,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields'
Security_AI_Assistant_API_DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -44350,8 +44357,7 @@ components:
type: object
properties:
kbResource:
description: Knowledge Base resource name for grouping entries, e.g. 'esql', 'lens-docs', etc
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -44376,6 +44382,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -44456,6 +44465,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -44470,13 +44482,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields'
Security_AI_Assistant_API_IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -44536,6 +44552,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -44715,6 +44734,18 @@ components:
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseResource:
description: Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc
enum:
- security_labs
- user
type: string
Security_AI_Assistant_API_KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
37 changes: 34 additions & 3 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40544,7 +40544,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -50879,6 +50879,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -50893,13 +50896,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields'
Security_AI_Assistant_API_DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -50927,8 +50934,7 @@ components:
type: object
properties:
kbResource:
description: Knowledge Base resource name for grouping entries, e.g. 'esql', 'lens-docs', etc
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -50953,6 +50959,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -51033,6 +51042,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -51047,13 +51059,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields'
Security_AI_Assistant_API_IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -51113,6 +51129,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -51292,6 +51311,18 @@ components:
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseResource:
description: Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc
enum:
- security_labs
- user
type: string
Security_AI_Assistant_API_KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -1301,6 +1301,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -1317,13 +1320,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/ResponseFields'
- $ref: '#/components/schemas/DocumentEntryResponseFields'
DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -1353,10 +1360,7 @@ components:
type: object
properties:
kbResource:
description: >-
Knowledge Base resource name for grouping entries, e.g. 'esql',
'lens-docs', etc
type: string
$ref: '#/components/schemas/KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -1381,6 +1385,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/NonEmptyString'
name:
Expand Down Expand Up @@ -1463,6 +1470,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -1479,13 +1489,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/ResponseFields'
- $ref: '#/components/schemas/IndexEntryResponseFields'
IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -1553,6 +1567,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/NonEmptyString'
name:
Expand Down Expand Up @@ -1736,6 +1753,20 @@ components:
- $ref: '#/components/schemas/IndexEntryUpdateFields'
discriminator:
propertyName: type
KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/DocumentEntryCreateFields'
- $ref: '#/components/schemas/IndexEntryCreateFields'
discriminator:
propertyName: type
KnowledgeBaseResource:
description: >-
Knowledge Base resource name for grouping entries, e.g. 'security_labs',
'user', etc
enum:
- security_labs
- user
type: string
KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
Loading

0 comments on commit 8522d9c

Please sign in to comment.