feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374)

This commit is contained in:
Daniel Jimenez
2025-05-22 19:26:44 +12:00
committed by GitHub
parent 8697a30dc5
commit 4b417ce9e7
189 changed files with 10098 additions and 5847 deletions

View File

@@ -0,0 +1,14 @@
type: array
description: 'Array of account users'
items:
type: object
properties:
account_id:
type: integer
description: The ID of the account
user_id:
type: integer
description: The ID of the user
role:
type: string
description: whether user is an administrator or agent

View File

@@ -19,14 +19,13 @@ properties:
enum: ['agent', 'administrator']
confirmed:
type: boolean
availability_status:
availability_status:
type: string
enum: ['available', 'busy', 'offline']
description: The availability status of the agent computed by Chatwoot.
auto_offline:
type: boolean
description: Whether the availability status of agent is configured to go offline automatically when away.
custom_attributes:
custom_attributes:
type: object
description: Available for users who are created through platform APIs and has custom attributes associated.

View File

@@ -24,8 +24,9 @@ properties:
custom_attributes:
type: object
description: The object to save custom attributes for contact, accepts custom attributes key and value
example: { attribute_key: attribute_value, signed_up_at: dd/mm/yyyy }
example:
{ attribute_key: attribute_value, signed_up_at: dd/mm/yyyy }
contact_inboxes:
type: array
items:
$ref: '#/definitions/contact_inboxes'
$ref: '#/components/schemas/contact_inboxes'

View File

@@ -5,4 +5,4 @@ properties:
description: Contact Inbox Source Id
inbox:
type: object
$ref: '#/definitions/inbox'
$ref: '#/components/schemas/inbox'

View File

@@ -5,4 +5,4 @@ properties:
description: Contact Inbox Source Id
inbox:
type: object
$ref: '#/definitions/inbox'
$ref: '#/components/schemas/inbox'

View File

@@ -6,7 +6,7 @@ properties:
messages:
type: array
items:
$ref: '#/definitions/message'
$ref: '#/components/schemas/message'
account_id:
type: number
description: Account Id

View File

@@ -19,4 +19,4 @@ properties:
type: string
description: Channel Type
assignee:
$ref: '#/definitions/user'
$ref: '#/components/schemas/user'

View File

@@ -19,6 +19,6 @@ properties:
description: 'array of conversations'
items:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/conversation'
- $ref: '#/components/schemas/generic_id'
- $ref: '#/components/schemas/conversation'
- $ref: '../contact/conversation.yml'

View File

@@ -1,4 +1,4 @@
type: object
allOf:
- $ref: '#/definitions/conversation'
- $ref: '#/components/schemas/conversation'
- $ref: '../contact/conversation.yml'

View File

@@ -27,8 +27,8 @@ properties:
categories:
type: array
items:
$ref: '#/definitions/category'
$ref: '#/components/schemas/category'
articles:
type: array
items:
$ref: '#/definitions/article'
$ref: '#/components/schemas/article'

View File

@@ -1,5 +1,5 @@
type: object
properties:
properties:
id:
type: integer
description: Id of the contact
@@ -14,4 +14,4 @@ properties:
description: Email of the contact
pubsub_token:
type: string
description: The token to be used to connect to chatwoot websocket
description: The token to be used to connect to chatwoot websocket

View File

@@ -9,7 +9,7 @@ properties:
messages:
type: array
items:
$ref: '#/definitions/message'
$ref: '#/components/schemas/message'
description: Messages in the conversation
contact:
type: object

View File

@@ -19,10 +19,10 @@ properties:
enum: ['agent', 'administrator']
confirmed:
type: boolean
custom_attributes:
custom_attributes:
type: object
description: Available for users who are created through platform APIs and has custom attributes associated.
accounts:
type: array
items:
$ref: '#/definitions/account'
$ref: '#/components/schemas/account'