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,6 +1,5 @@
in: path
name: account_id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the account

View File

@@ -1,6 +1,5 @@
in: path
name: id
schema:
type: integer
type: integer
required: true
description: The ID of the agentbot to be updated

View File

@@ -1,15 +1,14 @@
in: query
name: sort
schema:
type: string
enum:
- name
- email
- phone_number
- last_activity_at
- -name
- -email
- -phone_number
- -last_activity_at
type: string
enum:
- name
- email
- phone_number
- last_activity_at
- -name
- -email
- -phone_number
- -last_activity_at
required: false
description: The attribute by which list should be sorted

View File

@@ -1,6 +1,5 @@
in: path
name: conversation_id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the conversation

View File

@@ -1,6 +1,5 @@
in: path
name: custom_filter_id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the custom filter

View File

@@ -1,6 +1,5 @@
in: path
name: hook_id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the integration hook

View File

@@ -1,6 +1,5 @@
in: path
name: inbox_id
schema:
type: integer
type: integer
required: true
description: The ID of the Inbox

View File

@@ -1,6 +1,5 @@
in: path
name: message_id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the message

View File

@@ -1,7 +1,6 @@
in: query
name: page
schema:
type: integer
default: 1
type: integer
default: 1
required: false
description: The page parameter

View File

@@ -1,6 +1,5 @@
in: path
name: id
schema:
type: integer
type: integer
required: true
description: The numeric ID of the user on the platform

View File

@@ -1,6 +1,5 @@
in: path
name: contact_identifier
schema:
type: string
type: string
required: true
description: The source id of contact obtained on contact create

View File

@@ -1,6 +1,5 @@
in: path
name: inbox_identifier
schema:
type: string
type: string
required: true
description: The identifier obtained from API inbox channel

View File

@@ -1,7 +1,12 @@
in: query
name: metric
schema:
type: string
enum: [conversations_count, incoming_messages_count, outgoing_messages_count, avg_first_response_time, avg_resolution_time, resolutions_count]
type: string
enum:
- conversations_count
- incoming_messages_count
- outgoing_messages_count
- avg_first_response_time
- avg_resolution_time
- resolutions_count
required: true
description: The type of metric

View File

@@ -1,7 +1,11 @@
in: query
name: report_type
schema:
type: string
enum: [account,agent,inbox,label,team]
type: string
enum:
- account
- agent
- inbox
- label
- team
required: true
description: Type of report
description: Type of report

View File

@@ -1,2 +1,5 @@
in: path
name: source_id
required: true
type: string
description: "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.<br/><br/>Website: Chatwoot generated string which can be obtained from webhook events. <br/> Phone Channels(Twilio): Phone number in e164 format <br/> Email Channels: Contact Email address <br/> API Channel: Any Random String"
description: "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.<br/><br/>Website: Chatwoot generated string which can be obtained from webhook events. <br/> Phone Channels(Twilio): Phone number in e164 format <br/> Email Channels: Contact Email address <br/> API Channel: Any Random String"

View File

@@ -1,6 +1,5 @@
in: path
name: id
schema:
type: integer
type: integer
required: true
description: The ID of the team to be updated