diff --git a/packages/twenty-server/src/engine/core-modules/open-api/utils/__tests__/components.utils.spec.ts b/packages/twenty-server/src/engine/core-modules/open-api/utils/__tests__/components.utils.spec.ts index ca960dfd9f..d8a0e6e78c 100644 --- a/packages/twenty-server/src/engine/core-modules/open-api/utils/__tests__/components.utils.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/open-api/utils/__tests__/components.utils.spec.ts @@ -259,7 +259,18 @@ describe('computeSchemaComponents', () => { "properties": { "additionalPhones": { "items": { - "type": "string", + "properties": { + "callingCode": { + "type": "string", + }, + "countryCode": { + "type": "string", + }, + "number": { + "type": "string", + }, + }, + "type": "object", }, "type": "array", }, @@ -491,7 +502,18 @@ describe('computeSchemaComponents', () => { "properties": { "additionalPhones": { "items": { - "type": "string", + "properties": { + "callingCode": { + "type": "string", + }, + "countryCode": { + "type": "string", + }, + "number": { + "type": "string", + }, + }, + "type": "object", }, "type": "array", }, @@ -752,7 +774,18 @@ describe('computeSchemaComponents', () => { "properties": { "additionalPhones": { "items": { - "type": "string", + "properties": { + "callingCode": { + "type": "string", + }, + "countryCode": { + "type": "string", + }, + "number": { + "type": "string", + }, + }, + "type": "object", }, "type": "array", }, diff --git a/packages/twenty-server/src/engine/utils/convert-object-metadata-to-schema-properties.util.ts b/packages/twenty-server/src/engine/utils/convert-object-metadata-to-schema-properties.util.ts index b98ee47054..98ab50ef75 100644 --- a/packages/twenty-server/src/engine/utils/convert-object-metadata-to-schema-properties.util.ts +++ b/packages/twenty-server/src/engine/utils/convert-object-metadata-to-schema-properties.util.ts @@ -308,7 +308,18 @@ export const convertObjectMetadataToSchemaProperties = ({ additionalPhones: { type: 'array', items: { - type: 'string', + type: 'object', + properties: { + number: { + type: 'string', + }, + countryCode: { + type: 'string', + }, + callingCode: { + type: 'string', + }, + }, }, }, primaryPhoneCountryCode: {