Chore: Swagger Docs V1 (#546)
This commit is contained in:
18
swagger/paths/contact/conversations.yml
Normal file
18
swagger/paths/contact/conversations.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
get:
|
||||
tags: [Contact]
|
||||
summary: Conversations
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of contact
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/contact_conversations'
|
||||
404:
|
||||
description: Contact not found
|
||||
403:
|
||||
description: Access denied
|
||||
42
swagger/paths/contact/crud.yml
Normal file
42
swagger/paths/contact/crud.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
get:
|
||||
tags: [Contact]
|
||||
summary: Show Contact
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of contact
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/extended_contact'
|
||||
404:
|
||||
description: Contact not found
|
||||
403:
|
||||
description: Access denied
|
||||
|
||||
put:
|
||||
tags: [Contact]
|
||||
summary: Update Contact
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the contact
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/contact_update'
|
||||
responses:
|
||||
204:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/contact_base'
|
||||
404:
|
||||
description: Contact not found
|
||||
403:
|
||||
description: Access denied
|
||||
36
swagger/paths/contact/list_create.yml
Normal file
36
swagger/paths/contact/list_create.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
get:
|
||||
tags: [Contact]
|
||||
description: Listing all contacts with pagination
|
||||
summary: List contacts
|
||||
parameters:
|
||||
- name: query_hash
|
||||
in: query
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/contact_list'
|
||||
400:
|
||||
description: Bad Request Error
|
||||
schema:
|
||||
$ref: '#/definitions/bad_request_error'
|
||||
|
||||
post:
|
||||
tags: [Contact]
|
||||
description: Create a contact
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/contact_create'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/extended_contact'
|
||||
400:
|
||||
description: Bad Request Error
|
||||
schema:
|
||||
$ref: '#/definitions/bad_request_error'
|
||||
7
swagger/paths/index.yml
Normal file
7
swagger/paths/index.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# Contacts
|
||||
/contacts:
|
||||
$ref: ./contact/list_create.yml
|
||||
/contacts/{id}:
|
||||
$ref: ./contact/crud.yml
|
||||
/contacts/{id}/conversations:
|
||||
$ref: ./contact/conversations.yml
|
||||
Reference in New Issue
Block a user