From f1827c82fd0e81153840bc1de61cdb338aa15b81 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Wed, 1 Mar 2023 20:24:21 +0530 Subject: [PATCH] Update contact create swagger (#6576) --- swagger/definitions/resource/contact.yml | 50 ++++++++-------- swagger/swagger.json | 72 ++++++++++++++---------- 2 files changed, 69 insertions(+), 53 deletions(-) diff --git a/swagger/definitions/resource/contact.yml b/swagger/definitions/resource/contact.yml index 2e72a9834..bbb82e14c 100644 --- a/swagger/definitions/resource/contact.yml +++ b/swagger/definitions/resource/contact.yml @@ -1,25 +1,31 @@ type: object properties: - email: - type: string - description: Email address of the contact - name: - type: string - description: The name of the contact - phone_number: - type: string - description: Phone number of the contact - thumbnail: - type: string - description: Avatar URL of the contact - additional_attributes: + payload: type: object - description: The object containing additional attributes related to the contact - custom_attributes: - type: object - description: The object to save custom attributes for contact, accepts custom attributes key and value - example: { attribute_key: attribute_value, signed_up_at: dd/mm/yyyy } - contact_inboxes: - type: array - items: - $ref: '#/definitions/contact_inboxes' + properties: + contact: + type: object + properties: + email: + type: string + description: Email address of the contact + name: + type: string + description: The name of the contact + phone_number: + type: string + description: Phone number of the contact + thumbnail: + type: string + description: Avatar URL of the contact + additional_attributes: + type: object + description: The object containing additional attributes related to the contact + custom_attributes: + type: object + description: The object to save custom attributes for contact, accepts custom attributes key and value + example: { attribute_key: attribute_value, signed_up_at: dd/mm/yyyy } + contact_inboxes: + type: array + items: + $ref: '#/definitions/contact_inboxes' diff --git a/swagger/swagger.json b/swagger/swagger.json index a49aa4f96..55b95fb22 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -4857,38 +4857,48 @@ "contact": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "Email address of the contact" - }, - "name": { - "type": "string", - "description": "The name of the contact" - }, - "phone_number": { - "type": "string", - "description": "Phone number of the contact" - }, - "thumbnail": { - "type": "string", - "description": "Avatar URL of the contact" - }, - "additional_attributes": { + "payload": { "type": "object", - "description": "The object containing additional attributes related to the contact" - }, - "custom_attributes": { - "type": "object", - "description": "The object to save custom attributes for contact, accepts custom attributes key and value", - "example": { - "attribute_key": "attribute_value", - "signed_up_at": "dd/mm/yyyy" - } - }, - "contact_inboxes": { - "type": "array", - "items": { - "$ref": "#/definitions/contact_inboxes" + "properties": { + "contact": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address of the contact" + }, + "name": { + "type": "string", + "description": "The name of the contact" + }, + "phone_number": { + "type": "string", + "description": "Phone number of the contact" + }, + "thumbnail": { + "type": "string", + "description": "Avatar URL of the contact" + }, + "additional_attributes": { + "type": "object", + "description": "The object containing additional attributes related to the contact" + }, + "custom_attributes": { + "type": "object", + "description": "The object to save custom attributes for contact, accepts custom attributes key and value", + "example": { + "attribute_key": "attribute_value", + "signed_up_at": "dd/mm/yyyy" + } + }, + "contact_inboxes": { + "type": "array", + "items": { + "$ref": "#/definitions/contact_inboxes" + } + } + } + } } } }