Skip to content

Commit

Permalink
update client/openapi/trustd.yaml (#312)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
Co-authored-by: github-merge-queue[bot] <github-merge-queue[bot]@users.noreply.github.com>
  • Loading branch information
carlosthe19916 and github-merge-queue[bot] authored Jan 16, 2025
1 parent d0abd4b commit 8d9e5fa
Show file tree
Hide file tree
Showing 4 changed files with 543 additions and 10 deletions.
254 changes: 250 additions & 4 deletions client/openapi/trustd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,159 @@ paths:
type: object
version:
type: string
/api/v1/ai/conversations:
get:
tags:
- ai
operationId: listConversations
parameters:
- name: q
in: query
required: false
schema:
type: string
- name: sort
in: query
required: false
schema:
type: string
- name: offset
in: query
description: |-
The first item to return, skipping all that come before it.
NOTE: The order of items is defined by the API being called.
required: false
schema:
type: integer
format: int64
minimum: 0
- name: limit
in: query
description: |-
The maximum number of entries to return.
Zero means: no limit
required: false
schema:
type: integer
format: int64
minimum: 0
responses:
'200':
description: The resulting list of conversation summaries
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResults_ConversationSummary'
'404':
description: The AI service is not enabled
post:
tags:
- ai
operationId: createConversation
responses:
'200':
description: The resulting conversation
content:
application/json:
schema:
$ref: '#/components/schemas/Conversation'
'400':
description: The request was invalid
'404':
description: The AI service is not enabled
/api/v1/ai/conversations/{id}:
get:
tags:
- ai
operationId: getConversation
parameters:
- name: id
in: path
description: Opaque ID of the conversation
required: true
schema:
type: string
format: uuid
responses:
'200':
description: The resulting conversation
headers:
etag:
schema:
type: string
description: Sequence ID
content:
application/json:
schema:
$ref: '#/components/schemas/Conversation'
'400':
description: The request was invalid
'404':
description: The AI service is not enabled
put:
tags:
- ai
operationId: updateConversation
parameters:
- name: id
in: path
description: Opaque ID of the conversation
required: true
schema:
type: string
format: uuid
- name: if-match
in: header
description: The revision to update
required: false
schema:
type:
- string
- 'null'
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ChatMessage'
required: true
responses:
'200':
description: The resulting conversation
content:
application/json:
schema:
$ref: '#/components/schemas/Conversation'
'400':
description: The request was invalid
'404':
description: The AI service is not enabled or the conversation was not found
delete:
tags:
- ai
operationId: deleteConversation
parameters:
- name: id
in: path
description: Opaque ID of the conversation
required: true
schema:
type: string
format: uuid
responses:
'200':
description: The resulting conversation
content:
application/json:
schema:
$ref: '#/components/schemas/Conversation'
'400':
description: The request was invalid
'404':
description: The AI service is not enabled or the conversation was not found
/api/v2/advisory:
get:
tags:
Expand Down Expand Up @@ -2334,20 +2487,24 @@ components:
required:
- message_type
- content
- timestamp
properties:
content:
type: string
internal_state:
type:
- string
- 'null'
message_type:
$ref: '#/components/schemas/MessageType'
timestamp:
type: string
format: date-time
ChatState:
type: object
required:
- messages
properties:
internal_state:
type:
- string
- 'null'
messages:
type: array
items:
Expand Down Expand Up @@ -2409,6 +2566,42 @@ components:
period:
type: string
description: The period the importer should be run.
Conversation:
type: object
required:
- id
- messages
- updated_at
- seq
properties:
id:
type: string
format: uuid
messages:
type: array
items:
$ref: '#/components/schemas/ChatMessage'
seq:
type: integer
format: int32
updated_at:
type: string
format: date-time
ConversationSummary:
type: object
required:
- id
- updated_at
- summary
properties:
id:
type: string
format: uuid
summary:
type: string
updated_at:
type: string
format: date-time
CsafImporter:
allOf:
- $ref: '#/components/schemas/CommonImporter'
Expand Down Expand Up @@ -2842,6 +3035,33 @@ components:
type: integer
format: int64
minimum: 0
PaginatedResults_ConversationSummary:
type: object
required:
- items
- total
properties:
items:
type: array
items:
type: object
required:
- id
- updated_at
- summary
properties:
id:
type: string
format: uuid
summary:
type: string
updated_at:
type: string
format: date-time
total:
type: integer
format: int64
minimum: 0
PaginatedResults_ImporterReport:
type: object
required:
Expand Down Expand Up @@ -3266,6 +3486,7 @@ components:
- base
- advisories
- licenses
- relationships
properties:
advisories:
type: array
Expand All @@ -3277,6 +3498,31 @@ components:
type: array
items:
$ref: '#/components/schemas/PurlLicenseSummary'
relationships:
type: object
additionalProperties:
type: array
items:
type: string
propertyNames:
type: string
enum:
- contained_by
- dependency_of
- dev_dependency_of
- optional_dependency_of
- provided_dependency_of
- test_dependency_of
- runtime_dependency_of
- example_of
- generated_from
- ancestor_of
- variant_of
- build_tool_of
- dev_tool_of
- described_by
- package_of
- undefined
version:
$ref: '#/components/schemas/VersionedPurlHead'
PurlHead:
Expand Down
Loading

0 comments on commit 8d9e5fa

Please sign in to comment.