From ff808a91ee89bcb917c60726ad7d1ff3882ac35a Mon Sep 17 00:00:00 2001 From: box-apimgmt Date: Tue, 5 May 2026 05:58:57 -0700 Subject: [PATCH] fix: Fix metadata template schema --- openapi.json | 54 ++++++++++++++++++++++++++++++++---- openapi/openapi-v2025.0.json | 2 +- openapi/openapi-v2026.0.json | 2 +- openapi/openapi.json | 54 ++++++++++++++++++++++++++++++++---- 4 files changed, 98 insertions(+), 14 deletions(-) diff --git a/openapi.json b/openapi.json index 1e2d9d14..551c0f67 100644 --- a/openapi.json +++ b/openapi.json @@ -14,7 +14,7 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "version": "2024.0", - "x-box-commit-hash": "7a4982fa67" + "x-box-commit-hash": "a54b354d64" }, "servers": [ { @@ -8842,7 +8842,7 @@ "type": "object", "properties": { "type": { - "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` field to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and ` multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.", + "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` field to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and `multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.", "type": "string", "example": "string", "enum": [ @@ -8901,6 +8901,11 @@ "type": "string", "example": "locationTaxonomy" }, + "taxonomyId": { + "description": "The unique ID of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "05ece6d7-fec4-4d3f-bfd2-36fd4dddea97" + }, "namespace": { "description": "The namespace of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", "type": "string", @@ -35797,7 +35802,7 @@ "allOf": [ { "title": "Metadata Field (Read)", - "description": "A field within a metadata template. Fields can be a basic text, date, or\nnumber field, or a list of options.", + "description": "A field within a metadata template. Fields can be a basic text, date, or\nnumber field, a list of options, or a taxonomy.", "required": [ "type", "key", @@ -35806,7 +35811,7 @@ "type": "object", "properties": { "type": { - "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` fields to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and ` multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\n**Note**: The `integer` value is deprecated.\nIt is still present in the response,\nbut cannot be used in the POST request.", + "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` fields to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and `multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.\n\n**Note**: The `integer` value is deprecated.\nIt is still present in the response,\nbut cannot be used in the POST request.", "type": "string", "example": "string", "enum": [ @@ -35815,8 +35820,8 @@ "date", "enum", "multiSelect", - "integer", - "taxonomy" + "taxonomy", + "integer" ] }, "key": { @@ -35860,6 +35865,43 @@ } } } + }, + "taxonomyKey": { + "description": "The unique key of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "locationTaxonomy" + }, + "taxonomyId": { + "description": "The unique ID of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "05ece6d7-fec4-4d3f-bfd2-36fd4dddea97" + }, + "namespace": { + "description": "The namespace of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "enterprise_123456" + }, + "optionsRules": { + "description": "An object defining additional rules for the options of the taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "object", + "properties": { + "multiSelect": { + "description": "Whether to allow users to select multiple values.", + "type": "boolean", + "example": true + }, + "selectableLevels": { + "description": "An array of integers defining which levels of the taxonomy are\nselectable by users.", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 1, + 2 + ] + } + } } } }, diff --git a/openapi/openapi-v2025.0.json b/openapi/openapi-v2025.0.json index 9071e0be..a7edd1bb 100644 --- a/openapi/openapi-v2025.0.json +++ b/openapi/openapi-v2025.0.json @@ -14,7 +14,7 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "version": "2025.0", - "x-box-commit-hash": "7a4982fa67" + "x-box-commit-hash": "a54b354d64" }, "servers": [ { diff --git a/openapi/openapi-v2026.0.json b/openapi/openapi-v2026.0.json index de07a253..0ba550b5 100644 --- a/openapi/openapi-v2026.0.json +++ b/openapi/openapi-v2026.0.json @@ -14,7 +14,7 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "version": "2026.0", - "x-box-commit-hash": "7a4982fa67" + "x-box-commit-hash": "a54b354d64" }, "servers": [ { diff --git a/openapi/openapi.json b/openapi/openapi.json index 1e2d9d14..551c0f67 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -14,7 +14,7 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "version": "2024.0", - "x-box-commit-hash": "7a4982fa67" + "x-box-commit-hash": "a54b354d64" }, "servers": [ { @@ -8842,7 +8842,7 @@ "type": "object", "properties": { "type": { - "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` field to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and ` multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.", + "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` field to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and `multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.", "type": "string", "example": "string", "enum": [ @@ -8901,6 +8901,11 @@ "type": "string", "example": "locationTaxonomy" }, + "taxonomyId": { + "description": "The unique ID of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "05ece6d7-fec4-4d3f-bfd2-36fd4dddea97" + }, "namespace": { "description": "The namespace of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", "type": "string", @@ -35797,7 +35802,7 @@ "allOf": [ { "title": "Metadata Field (Read)", - "description": "A field within a metadata template. Fields can be a basic text, date, or\nnumber field, or a list of options.", + "description": "A field within a metadata template. Fields can be a basic text, date, or\nnumber field, a list of options, or a taxonomy.", "required": [ "type", "key", @@ -35806,7 +35811,7 @@ "type": "object", "properties": { "type": { - "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` fields to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and ` multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\n**Note**: The `integer` value is deprecated.\nIt is still present in the response,\nbut cannot be used in the POST request.", + "description": "The type of field. The basic fields are a `string` field for text, a\n`float` field for numbers, and a `date` fields to present the user with a\ndate-time picker.\n\nAdditionally, metadata templates support an `enum` field for a basic list\nof items, and `multiSelect` field for a similar list of items where the\nuser can select more than one value.\n\nMetadata taxonomies are also supported as a `taxonomy` field type \nwith a specific set of additional properties, which describe its structure.\n\n**Note**: The `integer` value is deprecated.\nIt is still present in the response,\nbut cannot be used in the POST request.", "type": "string", "example": "string", "enum": [ @@ -35815,8 +35820,8 @@ "date", "enum", "multiSelect", - "integer", - "taxonomy" + "taxonomy", + "integer" ] }, "key": { @@ -35860,6 +35865,43 @@ } } } + }, + "taxonomyKey": { + "description": "The unique key of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "locationTaxonomy" + }, + "taxonomyId": { + "description": "The unique ID of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "05ece6d7-fec4-4d3f-bfd2-36fd4dddea97" + }, + "namespace": { + "description": "The namespace of the metadata taxonomy to use for this taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "string", + "example": "enterprise_123456" + }, + "optionsRules": { + "description": "An object defining additional rules for the options of the taxonomy field.\nThis property is required when the field `type` is set to `taxonomy`.", + "type": "object", + "properties": { + "multiSelect": { + "description": "Whether to allow users to select multiple values.", + "type": "boolean", + "example": true + }, + "selectableLevels": { + "description": "An array of integers defining which levels of the taxonomy are\nselectable by users.", + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 1, + 2 + ] + } + } } } },