Fix: Make swagger doc compliant to OpenAPI (#3394)

This fixes issues in the swagger.json file. The motivation to do so is to be able to generate API clients using https://openapi-generator.tech Doing so will require further changes to the api spec, but this seems like a good first step since it is now "valid" according to editor.swagger.io and openapi-generator validate.

Fixes #2806
This commit is contained in:
Jan-David
2021-11-17 14:25:15 +01:00
committed by GitHub
parent d227a56747
commit e500d1216b
55 changed files with 527 additions and 695 deletions

View File

@@ -1,8 +1,9 @@
type: object
required:
- inbox_id
properties:
inbox_id:
type: number
required: true
name:
type: string
description: name of the contact
@@ -12,7 +13,7 @@ properties:
phone_number:
type: string
description: phone number of the contact
identifier:
identifier:
type: string
description: A unique identifier for the contact in external system
custom_attributes:

View File

@@ -1,9 +1,10 @@
type: object
required:
- content
properties:
content:
type: string
description: The content of the message
required: true
message_type:
type: string
enum: ['outgoing', 'incoming']
@@ -18,4 +19,3 @@ properties:
content_attributes:
type: object
description: attributes based on your content type

View File

@@ -5,6 +5,8 @@ properties:
description: ID of the conversation
messages:
type: array
items:
$ref: '#/definitions/message'
account_id:
type: number
description: Account Id
@@ -21,7 +23,7 @@ properties:
contact_last_seen_at:
type: string
agent_last_seen_at:
type: agent_last_seen_at
type: string
unread_count:
type: number
description: The number of unread messages

View File

@@ -14,8 +14,10 @@ properties:
type: object
description: A query that needs to be saved as a custom filter
created_at:
type: datetime
type: string
format: date-time
description: The time at which the custom filter was created
updated_at:
type: datetime
type: string
format: date-time
description: The time at which the custom filter was updated

View File

@@ -20,4 +20,6 @@ properties:
description: Whether multiple hooks can be created for the integration
hooks:
type: array
items:
type: object
description: If there are any hooks created for this integration

View File

@@ -1,5 +1,5 @@
type: object
properties:
properties:
id:
type: integer
description: Id of the conversation
@@ -8,7 +8,9 @@ properties:
description: The inbox id of the conversation
messages:
type: array
items:
$ref: '#/definitions/message'
description: Messages in the conversation
contact:
type: object
description: The contact information associated to the conversation
description: The contact information associated to the conversation

View File

@@ -1,5 +1,5 @@
type: object
properties:
properties:
id:
type: string
description: Id of the message
@@ -23,6 +23,8 @@ properties:
description: Conversation Id of the message
attachments:
type: array
items:
type: object
description: Attachments if any
sender:
type: object