changedOutput schema / oneOf
Previous value: -[
- {
- "additionalProperties": false,
- "properties": {
- "defaultOptionKey": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "fields": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "field": {
- "type": "string"
- },
- "label": {
- "type": "string"
- },
- "values": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- },
- "required": [
- "value",
- "label"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "field",
- "label",
- "values"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "nextOffset": {
- "anyOf": [
- {
- "maximum": 9007199254740991,
- "minimum": -9007199254740991,
- "type": "integer"
- },
- {
- "type": "null"
- }
- ]
- },
- "ok": {
- "const": true,
- "type": "boolean"
- },
- "options": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "choices": {
- "additionalProperties": {
- "type": "string"
- },
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "key": {
- "type": "string"
- },
- "label": {
- "type": "string"
- },
- "supplierCount": {
- "maximum": 9007199254740991,
- "minimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "key",
- "label",
- "choices",
- "supplierCount"
- ],
- "type": "object"
- },
- "maxItems": 100,
- "type": "array"
- },
- "totalCount": {
- "maximum": 9007199254740991,
- "minimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "ok",
- "fields",
- "options",
- "totalCount",
- "nextOffset",
- "defaultOptionKey"
- ],
- "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": {
+ "defaultOptionKey": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The configuration compare_product uses when none is given; null when the product has none."
+ },
+ "fields": {
+ "description": "The choice fields this product has and their available values.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "field": {
+ "description": "The field name to use in `choices`, such as size or color.",
+ "type": "string"
+ },
+ "label": {
+ "description": "The field as a person would say it, such as Size.",
+ "type": "string"
+ },
+ "values": {
+ "description": "The values this field has among the matching configurations.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "description": "That value as the supplier names it.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value to pass back in `choices`.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "value",
+ "label"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "field",
+ "label",
+ "values"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "nextOffset": {
+ "anyOf": [
+ {
+ "maximum": 9007199254740991,
+ "minimum": -9007199254740991,
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Offset to pass for the next page; null on the last page."
+ },
+ "ok": {
+ "const": true,
+ "type": "boolean"
+ },
+ "options": {
+ "description": "The matching configurations.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "choices": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "The same choice by field, ready for compare_product `choices`.",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "key": {
+ "description": "The configuration's key, to pass as optionKey.",
+ "type": "string"
+ },
+ "label": {
+ "description": "The configuration in words, such as `Adult M / Black`.",
+ "type": "string"
+ },
+ "supplierCount": {
+ "description": "How many suppliers price this configuration.",
+ "maximum": 9007199254740991,
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "key",
+ "label",
+ "choices",
+ "supplierCount"
+ ],
+ "type": "object"
+ },
+ "maxItems": 100,
+ "type": "array"
+ },
+ "totalCount": {
+ "description": "How many configurations match in total, across every page.",
+ "maximum": 9007199254740991,
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "ok",
+ "fields",
+ "options",
+ "totalCount",
+ "nextOffset",
+ "defaultOptionKey"
+ ],
+ "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"
+ }
+]