changedOutput schema / oneOf
Previous value: -[
- {
- "additionalProperties": false,
- "properties": {
- "matches": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "canonicalProductId": {
- "type": "string"
- },
- "choices": {
- "additionalProperties": {
- "type": "string"
- },
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "name": {
- "type": "string"
- },
- "supplierId": {
- "type": "string"
- },
- "supplierProductName": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "url": {
- "format": "uri",
- "type": "string"
- }
- },
- "required": [
- "canonicalProductId",
- "name",
- "supplierId",
- "supplierProductName",
- "url",
- "choices"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "message": {
- "type": "string"
- },
- "ok": {
- "const": true,
- "type": "boolean"
- },
- "status": {
- "enum": [
- "resolved",
- "ambiguous",
- "unsupported",
- "no-match",
- "configuration-unavailable",
- "unavailable"
- ],
- "type": "string"
- }
- },
- "required": [
- "ok",
- "status",
- "matches",
- "message"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "additionalProperties": false,
- "properties": {
- "code": {
- "enum": [
- "invalid_input",
- "not_found",
- "product_not_found",
- "invalid_option",
- "comparison_unavailable",
- "unavailable",
- "rate_limited"
- ],
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "retryable": {
- "type": "boolean"
- }
- },
- "required": [
- "code",
- "message",
- "retryable"
- ],
- "type": "object"
- },
- "ok": {
- "const": false,
- "type": "boolean"
- }
- },
- "required": [
- "ok",
- "error"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "additionalProperties": false,
+ "properties": {
+ "matches": {
+ "description": "The matched product, or every candidate when ambiguous; empty when nothing matched.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "canonicalProductId": {
+ "description": "The product's id, to pass to compare_product.",
+ "type": "string"
+ },
+ "choices": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "What the link selects, ready for compare_product `choices`; empty for the product's usual choice.",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "name": {
+ "description": "The product's name.",
+ "type": "string"
+ },
+ "supplierId": {
+ "description": "The supplier the link points at.",
+ "type": "string"
+ },
+ "supplierProductName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The product's name at that supplier; null when unknown."
+ },
+ "url": {
+ "description": "The product's page on POD Benchmark.",
+ "format": "uri",
+ "type": "string"
+ }
+ },
+ "required": [
+ "canonicalProductId",
+ "name",
+ "supplierId",
+ "supplierProductName",
+ "url",
+ "choices"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "What to do next, in words.",
+ "type": "string"
+ },
+ "ok": {
+ "const": true,
+ "type": "boolean"
+ },
+ "status": {
+ "description": "resolved when one product matched, ambiguous when several did, otherwise why nothing matched.",
+ "enum": [
+ "resolved",
+ "ambiguous",
+ "unsupported",
+ "no-match",
+ "configuration-unavailable",
+ "unavailable"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "ok",
+ "status",
+ "matches",
+ "message"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "error": {
+ "additionalProperties": false,
+ "description": "The error this call returned instead of a result.",
+ "properties": {
+ "code": {
+ "description": "The machine-readable reason the call failed.",
+ "enum": [
+ "invalid_input",
+ "not_found",
+ "product_not_found",
+ "invalid_option",
+ "comparison_unavailable",
+ "unavailable",
+ "rate_limited"
+ ],
+ "type": "string"
+ },
+ "message": {
+ "description": "What went wrong, in words, and what to do next.",
+ "type": "string"
+ },
+ "retryable": {
+ "description": "Whether calling again could succeed.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "code",
+ "message",
+ "retryable"
+ ],
+ "type": "object"
+ },
+ "ok": {
+ "const": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "ok",
+ "error"
+ ],
+ "type": "object"
+ }
+]