From 93f0af97020678983e559172820de102c3543f9c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:50:22 +0000 Subject: [PATCH 1/2] fix(api): Update metadata field types in OpenAPI schemas for ENG-3620 - Add oneOf construct for keywords field to support both string and string array types - Define ogLocaleAlternate as explicit array type - Update all metadata schema locations in both v1 and v2 OpenAPI files - Maintain backward compatibility while accurately documenting API behavior - Align with Python SDK (Union[str, List[str]]) and JavaScript SDK (string | string[]) implementations Co-Authored-By: mogery --- api-reference/v1-openapi.json | 63 +++++++++++++++++++++++++++++++++++ api-reference/v2-openapi.json | 63 +++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/api-reference/v1-openapi.json b/api-reference/v1-openapi.json index 856c7b82..315a6229 100644 --- a/api-reference/v1-openapi.json +++ b/api-reference/v1-openapi.json @@ -3057,6 +3057,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, @@ -3203,6 +3224,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, @@ -3336,6 +3378,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, diff --git a/api-reference/v2-openapi.json b/api-reference/v2-openapi.json index 5b1bcb50..592b4cbd 100644 --- a/api-reference/v2-openapi.json +++ b/api-reference/v2-openapi.json @@ -3166,6 +3166,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, @@ -3307,6 +3328,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, @@ -3440,6 +3482,27 @@ "type": "string", "format": "uri" }, + "keywords": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Keywords extracted from the page, can be a string or array of strings" + }, + "ogLocaleAlternate": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alternative locales for the page" + }, " ": { "type": "string" }, From 0332859726fa8540a57e747d00650eac5e3b4ef3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:56:59 +0000 Subject: [PATCH 2/2] fix(api): Expand metadata field types to all HTML-extracted fields for ENG-3620 - Update ALL HTML-extracted metadata fields (title, description, language, keywords, etc.) to use oneOf construct - Support both string and array types for all HTML-extracted fields except excluded ones - Exclude non-HTML fields: url, sourceURL, statusCode, error, cacheState, cachedAt, numPages - Update generic '' pattern to use oneOf construct - Address PR feedback from @mogery about expanding scope beyond just keywords and ogLocaleAlternate - Maintain ogLocaleAlternate as explicit array type - Apply changes consistently across all metadata schema locations in both v1 and v2 OpenAPI files Co-Authored-By: mogery --- api-reference/v1-openapi.json | 160 +++++++++++++++++++++++++++++++--- api-reference/v2-openapi.json | 136 ++++++++++++++++++++++++++--- 2 files changed, 269 insertions(+), 27 deletions(-) diff --git a/api-reference/v1-openapi.json b/api-reference/v1-openapi.json index 315a6229..8a6631c2 100644 --- a/api-reference/v1-openapi.json +++ b/api-reference/v1-openapi.json @@ -1617,10 +1617,32 @@ "type": "string" }, "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "favicon": { "type": "string" @@ -2272,10 +2294,32 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string" @@ -3211,14 +3255,47 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "language": { - "type": "string", - "nullable": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "nullable": true, + "description": "Language extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string", @@ -3246,7 +3323,18 @@ "description": "Alternative locales for the page" }, " ": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Other metadata extracted from HTML, can be a string or array of strings" }, "statusCode": { "type": "integer", @@ -3365,14 +3453,47 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "language": { - "type": "string", - "nullable": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "nullable": true, + "description": "Language extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string", @@ -3400,7 +3521,18 @@ "description": "Alternative locales for the page" }, " ": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Other metadata extracted from HTML, can be a string or array of strings" }, "statusCode": { "type": "integer", diff --git a/api-reference/v2-openapi.json b/api-reference/v2-openapi.json index 592b4cbd..14f5f740 100644 --- a/api-reference/v2-openapi.json +++ b/api-reference/v2-openapi.json @@ -3153,14 +3153,47 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "language": { - "type": "string", - "nullable": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "nullable": true, + "description": "Language extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string", @@ -3188,7 +3221,18 @@ "description": "Alternative locales for the page" }, " ": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Other metadata extracted from HTML, can be a string or array of strings" }, "statusCode": { "type": "integer", @@ -3315,14 +3359,47 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "language": { - "type": "string", - "nullable": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "nullable": true, + "description": "Language extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string", @@ -3469,14 +3546,47 @@ "type": "object", "properties": { "title": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Title extracted from the page, can be a string or array of strings" }, "description": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Description extracted from the page, can be a string or array of strings" }, "language": { - "type": "string", - "nullable": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "nullable": true, + "description": "Language extracted from the page, can be a string or array of strings" }, "sourceURL": { "type": "string",