Chore: Document Conversation APIs in swagger (#552)

* Added the documentation for the conversation APIs - 8 endpoints
* Added descriptions for the existing endpoints
* Added new resource models and updated some parts of the contact API
This commit is contained in:
Sony Mathew
2020-02-24 00:51:31 +05:30
committed by GitHub
parent c7a4550477
commit fc1fa579e9
25 changed files with 909 additions and 40 deletions

View File

@@ -5,35 +5,68 @@ request_error:
$ref: ./error/request.yml
# RESOURCE
generic_id:
$ref: ./resource/extension/generic.yml
contact:
$ref: ./resource/contact.yml
conversation:
$ref: ./resource/conversation.yml
message:
$ref: ./resource/message.yml
user:
$ref: ./resource/user.yml
# RESPONSE
## contact
extended_contact:
allOf:
- $ref: '#/definitions/contact'
- $ref: ./resource/extension/contact/show.yml
contact_base:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/contact'
- $ref: ./resource/extension/generic.yml
contact_list:
type: array
description: 'array of contacts'
items:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/contact'
- $ref: ./resource/extension/generic.yml
contact_conversations:
type: array
description: 'array of conversations'
items:
allOf:
- $ref: '#/definitions/conversation'
- $ref: ./resource/extension/contact/conversation.yml
- $ref: ./resource/extension/conversation/with_display_id.yml
## conversation
conversation_list:
$ref: ./resource/extension/conversation/list.yml
conversation_show:
$ref: ./resource/extension/conversation/show.yml
conversation_status_toggle:
$ref: ./resource/extension/conversation/status_toggle.yml
conversation_labels:
$ref: ./resource/extension/conversation/labels.yml
## message
extended_message:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/message'
- $ref: ./resource/extension/message/with_source_sender.yml
# REQUEST
## contact
contact_create:
$ref: ./request/contact/create.yml
contact_update:
$ref: ./request/contact/update.yml
## conversation
conversation_message_create:
$ref: ./request/conversation/create_message.yml