Chatwoot/swagger/paths/application/contacts/crud.yml
Jan-David e500d1216b
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
2021-11-17 18:55:15 +05:30

58 lines
1.2 KiB
YAML

parameters:
- $ref: '#/parameters/account_id'
- name: id
in: path
type: number
description: ID of the contact
required: true
get:
tags:
- Contact
operationId: contactDetails
summary: Show Contact
description: Get a contact belonging to the account using ID
responses:
200:
description: Success
schema:
$ref: '#/definitions/extended_contact'
404:
description: Contact not found
403:
description: Access denied
put:
tags:
- Contact
operationId: contactUpdate
summary: Update Contact
description: Update a contact belonging to the account using ID
parameters:
- 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
delete:
tags:
- Contact
operationId: contactDelete
summary: Delete Contact
responses:
200:
description: Success
401:
description: Unauthorized
404:
description: Contact not found