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,24 +1,27 @@
parameters:
- $ref: '#/parameters/account_id'
get:
tags:
- Conversation
operationId: conversationSearch
description: Search for conversations containing a messages with the query string
summary: Conversations Search
operationId: conversationList
description: List all the conversations with pagination
summary: Conversations List
parameters:
- name: q
in: query
type: string
- name: assignee_type
in: query
type: string
enum: ['me', 'unassigned', 'all', 'assigned']
required: true
- name: status
in: query
type: string
enum: ['open', 'resolved', 'pending', 'all']
enum: ['open', 'resolved', 'pending']
required: true
- name: page
in: query
type: integer
required: true
- name: inbox_id
in: query
type: integer
@@ -27,7 +30,6 @@ get:
type: array
items:
type: string
- $ref: '#/parameters/account_id'
responses:
200:
@@ -38,8 +40,6 @@ get:
description: Bad Request Error
schema:
$ref: '#/definitions/bad_request_error'
description: Access denied
post:
tags:
@@ -51,7 +51,6 @@ post:
- userApiKey: []
- agentBotApiKey: []
parameters:
- $ref: '#/parameters/account_id'
- name: data
in: body
required: true
@@ -59,7 +58,8 @@ post:
type: object
properties:
source_id:
$ref: '#/parameters/source_id'
type: string
description: Conversation source id
inbox_id:
type: string
description: "Id of inbox in which the conversation is created <br/> Allowed Inbox Types: Website, Phone, Api, Email "