diff --git a/generate-validation.ts b/generate-validation.ts index b2f14979..0cdf5f65 100644 --- a/generate-validation.ts +++ b/generate-validation.ts @@ -1,13 +1,15 @@ import path from 'path' -import Ajv from 'ajv' +import Ajv from 'ajv/dist/2020' import addFormats from 'ajv-formats' -import standaloneCode from 'ajv/dist/standalone' +import standaloneCode from "ajv/dist/standalone" import fs from 'fs' const ajv = new Ajv({ - code: { source: true }, + code: { source: true, esm: true }, strict: 'log', + allowMatchingProperties: true, + allowUnionTypes: true, discriminator: true, }) addFormats(ajv) @@ -18,10 +20,10 @@ const files = fs.readdirSync('./json-schemas') files.forEach(file => { const schema = require(`./json-schemas/${file}`) const [name] = file.split('.', 1) + console.log(file) ajv.addSchema(schema, name + 'Schema') }) -ajv.getSchema("FieldTypeSchema") let moduleCode = standaloneCode(ajv) fs.writeFileSync(path.join(__dirname, 'src/validate.js'), moduleCode) diff --git a/json-schemas/AWSLambdaDestination.schema.json b/json-schemas/AWSLambdaDestination.schema.json new file mode 100644 index 00000000..89150b74 --- /dev/null +++ b/json-schemas/AWSLambdaDestination.schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "We recommend creating an Identify and Access Management (IAM) user with an `accessKey` and `accessSecret` pair, specifically for each Extension that only has the `lambda:InvokeFunction` permission on this function.", + "additionalProperties": false, + "title": "AWSLambdaDestination", + "type": "object", + "properties": { + "type": {"enum": ["AWSLambda"]}, + "arn": {"type": "string"}, + "accessKey": {"type": "string"}, + "accessSecret": {"type": "string"} + }, + "required": [ + "type", + "arn", + "accessKey", + "accessSecret" + ], + "$id": "https://api.commercetools.com/AWSLambdaDestination.schema.json" +} diff --git a/json-schemas/AccessDeniedError.schema.json b/json-schemas/AccessDeniedError.schema.json index 0598c9d8..a6f23c2d 100644 --- a/json-schemas/AccessDeniedError.schema.json +++ b/json-schemas/AccessDeniedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AccessDeniedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/AccessDeniedError.schema.json" + "$id": "https://api.commercetools.com/AccessDeniedError.schema.json" } diff --git a/json-schemas/Address.schema.json b/json-schemas/Address.schema.json index 2c8ff84f..7a6054ac 100644 --- a/json-schemas/Address.schema.json +++ b/json-schemas/Address.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Address", "type": "object", "properties": { - "lastName": {"type": "string"}, "country": {"type": "string"}, + "lastName": {"type": "string"}, "city": {"type": "string"}, "postalCode": {"type": "string"}, "title": {"type": "string"}, @@ -32,5 +32,5 @@ "apartment": {"type": "string"} }, "required": ["country"], - "$id": "https://example.com/Address.schema.json" + "$id": "https://api.commercetools.com/Address.schema.json" } diff --git a/json-schemas/AddressDraft.schema.json b/json-schemas/AddressDraft.schema.json new file mode 100644 index 00000000..7a3b96ad --- /dev/null +++ b/json-schemas/AddressDraft.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "AddressDraft", + "type": "object", + "properties": { + "country": {"type": "string"}, + "lastName": {"type": "string"}, + "city": {"type": "string"}, + "postalCode": {"type": "string"}, + "title": {"type": "string"}, + "building": {"type": "string"}, + "streetName": {"type": "string"}, + "company": {"type": "string"}, + "id": {"type": "string"}, + "state": {"type": "string"}, + "department": {"type": "string"}, + "fax": {"type": "string"}, + "key": {"type": "string"}, + "email": {"type": "string"}, + "pOBox": {"type": "string"}, + "streetNumber": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, + "mobile": {"type": "string"}, + "externalId": {"type": "string"}, + "additionalAddressInfo": {"type": "string"}, + "firstName": {"type": "string"}, + "phone": {"type": "string"}, + "additionalStreetInfo": {"type": "string"}, + "salutation": {"type": "string"}, + "region": {"type": "string"}, + "apartment": {"type": "string"} + }, + "required": ["country"], + "$id": "https://api.commercetools.com/AddressDraft.schema.json" +} diff --git a/json-schemas/AnonymousCartSignInModeEnum.schema.json b/json-schemas/AnonymousCartSignInModeEnum.schema.json index 510c9402..2bea1100 100644 --- a/json-schemas/AnonymousCartSignInModeEnum.schema.json +++ b/json-schemas/AnonymousCartSignInModeEnum.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "AnonymousCartSignInMode", "type": "string", "enum": [ "MergeWithExistingCustomerCart", "UseAsNewActiveCustomerCart" ], - "$id": "https://example.com/AnonymousCartSignInModeEnum.schema.json" + "$id": "https://api.commercetools.com/AnonymousCartSignInModeEnum.schema.json" } diff --git a/json-schemas/AnonymousIdAlreadyInUseError.schema.json b/json-schemas/AnonymousIdAlreadyInUseError.schema.json index 9570ef93..62223665 100644 --- a/json-schemas/AnonymousIdAlreadyInUseError.schema.json +++ b/json-schemas/AnonymousIdAlreadyInUseError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AnonymousIdAlreadyInUseError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/AnonymousIdAlreadyInUseError.schema.json" + "$id": "https://api.commercetools.com/AnonymousIdAlreadyInUseError.schema.json" } diff --git a/json-schemas/ApiClient.schema.json b/json-schemas/ApiClient.schema.json index 0cb18cd9..fb7384d3 100644 --- a/json-schemas/ApiClient.schema.json +++ b/json-schemas/ApiClient.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ApiClient", "type": "object", @@ -21,14 +21,16 @@ "format": "date-time" }, "scope": {"type": "string"}, + "accessTokenValiditySeconds": {"type": "number"}, "name": {"type": "string"}, "id": {"type": "string"}, - "secret": {"type": "string"} + "secret": {"type": "string"}, + "refreshTokenValiditySeconds": {"type": "number"} }, "required": [ "id", "name", "scope" ], - "$id": "https://example.com/ApiClient.schema.json" + "$id": "https://api.commercetools.com/ApiClient.schema.json" } diff --git a/json-schemas/ApiClientDraft.schema.json b/json-schemas/ApiClientDraft.schema.json index 5395d63c..630cf0cb 100644 --- a/json-schemas/ApiClientDraft.schema.json +++ b/json-schemas/ApiClientDraft.schema.json @@ -1,16 +1,18 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ApiClientDraft", "type": "object", "properties": { "name": {"type": "string"}, + "refreshTokenValiditySeconds": {"type": "number"}, "deleteDaysAfterCreation": {"type": "number"}, - "scope": {"type": "string"} + "scope": {"type": "string"}, + "accessTokenValiditySeconds": {"type": "number"} }, "required": [ "name", "scope" ], - "$id": "https://example.com/ApiClientDraft.schema.json" + "$id": "https://api.commercetools.com/ApiClientDraft.schema.json" } diff --git a/json-schemas/ApiClientPagedQueryResponse.schema.json b/json-schemas/ApiClientPagedQueryResponse.schema.json index 6be832cd..af2c7c04 100644 --- a/json-schemas/ApiClientPagedQueryResponse.schema.json +++ b/json-schemas/ApiClientPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) with `results` containing an array of [APIClient](ctp:api:type:ApiClient).", "additionalProperties": false, "title": "ApiClientPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ApiClientPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ApiClientPagedQueryResponse.schema.json" } diff --git a/json-schemas/Asset.schema.json b/json-schemas/Asset.schema.json index a6ade87e..0e38abf0 100644 --- a/json-schemas/Asset.schema.json +++ b/json-schemas/Asset.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Asset", "type": "object", @@ -23,5 +23,5 @@ "sources", "name" ], - "$id": "https://example.com/Asset.schema.json" + "$id": "https://api.commercetools.com/Asset.schema.json" } diff --git a/json-schemas/AssetDimensions.schema.json b/json-schemas/AssetDimensions.schema.json index 6313fde2..65cd4181 100644 --- a/json-schemas/AssetDimensions.schema.json +++ b/json-schemas/AssetDimensions.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Dimensions of the Asset source specified by the number of pixels.", "additionalProperties": false, "title": "AssetDimensions", "type": "object", @@ -11,5 +12,5 @@ "w", "h" ], - "$id": "https://example.com/AssetDimensions.schema.json" + "$id": "https://api.commercetools.com/AssetDimensions.schema.json" } diff --git a/json-schemas/AssetDraft.schema.json b/json-schemas/AssetDraft.schema.json index fc792593..e793e012 100644 --- a/json-schemas/AssetDraft.schema.json +++ b/json-schemas/AssetDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AssetDraft", "type": "object", @@ -21,5 +21,5 @@ "sources", "name" ], - "$id": "https://example.com/AssetDraft.schema.json" + "$id": "https://api.commercetools.com/AssetDraft.schema.json" } diff --git a/json-schemas/AssetSource.schema.json b/json-schemas/AssetSource.schema.json index 094796d6..22a74901 100644 --- a/json-schemas/AssetSource.schema.json +++ b/json-schemas/AssetSource.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Representation of an [Asset](#asset) in a specific format, for example a video in a certain encoding, or an image in a certain resolution.", "additionalProperties": false, "title": "AssetSource", "type": "object", @@ -10,5 +11,5 @@ "dimensions": {"$ref": "AssetDimensions.schema.json"} }, "required": ["uri"], - "$id": "https://example.com/AssetSource.schema.json" + "$id": "https://api.commercetools.com/AssetSource.schema.json" } diff --git a/json-schemas/AssignedProductReference.schema.json b/json-schemas/AssignedProductReference.schema.json new file mode 100644 index 00000000..5be68210 --- /dev/null +++ b/json-schemas/AssignedProductReference.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "AssignedProductReference", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "product": {"$ref": "ProductReference.schema.json"} + }, + "required": ["product"], + "$id": "https://api.commercetools.com/AssignedProductReference.schema.json" +} diff --git a/json-schemas/AssignedProductSelection.schema.json b/json-schemas/AssignedProductSelection.schema.json new file mode 100644 index 00000000..e0b63738 --- /dev/null +++ b/json-schemas/AssignedProductSelection.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "AssignedProductSelection", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "productSelection": {"$ref": "ProductSelectionReference.schema.json"} + }, + "required": ["productSelection"], + "$id": "https://api.commercetools.com/AssignedProductSelection.schema.json" +} diff --git a/json-schemas/AssignedProductSelectionPagedQueryResponse.schema.json b/json-schemas/AssignedProductSelectionPagedQueryResponse.schema.json new file mode 100644 index 00000000..9ef17b86 --- /dev/null +++ b/json-schemas/AssignedProductSelectionPagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) containing an array of [AssignedProductSelection](ctp:api:type:AssignedProductSelection).", + "additionalProperties": false, + "title": "AssignedProductSelectionPagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "AssignedProductSelection.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/AssignedProductSelectionPagedQueryResponse.schema.json" +} diff --git a/json-schemas/Attribute.schema.json b/json-schemas/Attribute.schema.json index 36907deb..807850d3 100644 --- a/json-schemas/Attribute.schema.json +++ b/json-schemas/Attribute.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Attribute", "type": "object", @@ -18,5 +18,5 @@ "name", "value" ], - "$id": "https://example.com/Attribute.schema.json" + "$id": "https://api.commercetools.com/Attribute.schema.json" } diff --git a/json-schemas/AttributeBooleanType.schema.json b/json-schemas/AttributeBooleanType.schema.json index b94eaf4d..6a4e3866 100644 --- a/json-schemas/AttributeBooleanType.schema.json +++ b/json-schemas/AttributeBooleanType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for Boolean values. Valid values for the Attribute are `true` and `false` (JSON Boolean).", "additionalProperties": false, "title": "AttributeBooleanType", "type": "object", "properties": {"name": {"enum": ["boolean"]}}, "required": ["name"], - "$id": "https://example.com/AttributeBooleanType.schema.json" + "$id": "https://api.commercetools.com/AttributeBooleanType.schema.json" } diff --git a/json-schemas/AttributeConstraintEnumDraftEnum.schema.json b/json-schemas/AttributeConstraintEnumDraftEnum.schema.json index 3b858c98..6aeee7f4 100644 --- a/json-schemas/AttributeConstraintEnumDraftEnum.schema.json +++ b/json-schemas/AttributeConstraintEnumDraftEnum.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "AttributeConstraintEnumDraft", "type": "string", "enum": ["None"], - "$id": "https://example.com/AttributeConstraintEnumDraftEnum.schema.json" + "$id": "https://api.commercetools.com/AttributeConstraintEnumDraftEnum.schema.json" } diff --git a/json-schemas/AttributeConstraintEnumEnum.schema.json b/json-schemas/AttributeConstraintEnumEnum.schema.json index 65fd87cb..4d6e1083 100644 --- a/json-schemas/AttributeConstraintEnumEnum.schema.json +++ b/json-schemas/AttributeConstraintEnumEnum.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Specifies how an Attribute (or a set of Attributes) should be validated across all variants of a Product:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "AttributeConstraintEnum", "type": "string", "enum": [ @@ -8,5 +9,5 @@ "CombinationUnique", "SameForAll" ], - "$id": "https://example.com/AttributeConstraintEnumEnum.schema.json" + "$id": "https://api.commercetools.com/AttributeConstraintEnumEnum.schema.json" } diff --git a/json-schemas/AttributeDateTimeType.schema.json b/json-schemas/AttributeDateTimeType.schema.json index 05bd6046..2ce442d5 100644 --- a/json-schemas/AttributeDateTimeType.schema.json +++ b/json-schemas/AttributeDateTimeType.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeDateTimeType", "type": "object", "properties": {"name": {"enum": ["datetime"]}}, "required": ["name"], - "$id": "https://example.com/AttributeDateTimeType.schema.json" + "$id": "https://api.commercetools.com/AttributeDateTimeType.schema.json" } diff --git a/json-schemas/AttributeDateType.schema.json b/json-schemas/AttributeDateType.schema.json index ec124c4d..68f5acdb 100644 --- a/json-schemas/AttributeDateType.schema.json +++ b/json-schemas/AttributeDateType.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeDateType", "type": "object", "properties": {"name": {"enum": ["date"]}}, "required": ["name"], - "$id": "https://example.com/AttributeDateType.schema.json" + "$id": "https://api.commercetools.com/AttributeDateType.schema.json" } diff --git a/json-schemas/AttributeDefinition.schema.json b/json-schemas/AttributeDefinition.schema.json index 7282a9bb..dfa6d6f2 100644 --- a/json-schemas/AttributeDefinition.schema.json +++ b/json-schemas/AttributeDefinition.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Describes a Product Attribute and allows you to define meta-information associated with the Attribute (like whether it should be searchable, or its constraints).", "additionalProperties": false, "title": "AttributeDefinition", "type": "object", @@ -22,5 +23,5 @@ "inputHint", "isSearchable" ], - "$id": "https://example.com/AttributeDefinition.schema.json" + "$id": "https://api.commercetools.com/AttributeDefinition.schema.json" } diff --git a/json-schemas/AttributeDefinitionAlreadyExistsError.schema.json b/json-schemas/AttributeDefinitionAlreadyExistsError.schema.json index 1cf8caa1..f22397d2 100644 --- a/json-schemas/AttributeDefinitionAlreadyExistsError.schema.json +++ b/json-schemas/AttributeDefinitionAlreadyExistsError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeDefinitionAlreadyExistsError", "type": "object", @@ -17,5 +25,5 @@ "conflictingProductTypeName", "conflictingAttributeName" ], - "$id": "https://example.com/AttributeDefinitionAlreadyExistsError.schema.json" + "$id": "https://api.commercetools.com/AttributeDefinitionAlreadyExistsError.schema.json" } diff --git a/json-schemas/AttributeDefinitionDraft.schema.json b/json-schemas/AttributeDefinitionDraft.schema.json index e6a640ff..c24b51fd 100644 --- a/json-schemas/AttributeDefinitionDraft.schema.json +++ b/json-schemas/AttributeDefinitionDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Specify the Attribute to be created with the [ProductTypeDraft](ctp:api:type:ProductTypeDraft).", "additionalProperties": false, "title": "AttributeDefinitionDraft", "type": "object", @@ -19,5 +20,5 @@ "label", "isRequired" ], - "$id": "https://example.com/AttributeDefinitionDraft.schema.json" + "$id": "https://api.commercetools.com/AttributeDefinitionDraft.schema.json" } diff --git a/json-schemas/AttributeDefinitionTypeConflictError.schema.json b/json-schemas/AttributeDefinitionTypeConflictError.schema.json index eb9b95ff..7feed499 100644 --- a/json-schemas/AttributeDefinitionTypeConflictError.schema.json +++ b/json-schemas/AttributeDefinitionTypeConflictError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeDefinitionTypeConflictError", "type": "object", @@ -17,5 +25,5 @@ "conflictingProductTypeName", "conflictingAttributeName" ], - "$id": "https://example.com/AttributeDefinitionTypeConflictError.schema.json" + "$id": "https://api.commercetools.com/AttributeDefinitionTypeConflictError.schema.json" } diff --git a/json-schemas/AttributeEnumType.schema.json b/json-schemas/AttributeEnumType.schema.json index 2e71444c..576d0fb5 100644 --- a/json-schemas/AttributeEnumType.schema.json +++ b/json-schemas/AttributeEnumType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for plain enum values. Useful for predefined language-agnostic values selectable in drop downs when only one value should be selected. Use [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType instead if multiple values can be selected from the list.", "additionalProperties": false, "title": "AttributeEnumType", "type": "object", @@ -14,5 +15,5 @@ "name", "values" ], - "$id": "https://example.com/AttributeEnumType.schema.json" + "$id": "https://api.commercetools.com/AttributeEnumType.schema.json" } diff --git a/json-schemas/AttributeLocalizableTextType.schema.json b/json-schemas/AttributeLocalizableTextType.schema.json index 63b4afb3..9fdf38c1 100644 --- a/json-schemas/AttributeLocalizableTextType.schema.json +++ b/json-schemas/AttributeLocalizableTextType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for [LocalizedString](ctp:api:type:LocalizedString) values.", "additionalProperties": false, "title": "AttributeLocalizableTextType", "type": "object", "properties": {"name": {"enum": ["ltext"]}}, "required": ["name"], - "$id": "https://example.com/AttributeLocalizableTextType.schema.json" + "$id": "https://api.commercetools.com/AttributeLocalizableTextType.schema.json" } diff --git a/json-schemas/AttributeLocalizedEnumType.schema.json b/json-schemas/AttributeLocalizedEnumType.schema.json index 65ff02d9..b8c8db4a 100644 --- a/json-schemas/AttributeLocalizedEnumType.schema.json +++ b/json-schemas/AttributeLocalizedEnumType.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeLocalizedEnumType", "type": "object", @@ -14,5 +14,5 @@ "name", "values" ], - "$id": "https://example.com/AttributeLocalizedEnumType.schema.json" + "$id": "https://api.commercetools.com/AttributeLocalizedEnumType.schema.json" } diff --git a/json-schemas/AttributeLocalizedEnumValue.schema.json b/json-schemas/AttributeLocalizedEnumValue.schema.json index 310f8935..4cbde87a 100644 --- a/json-schemas/AttributeLocalizedEnumValue.schema.json +++ b/json-schemas/AttributeLocalizedEnumValue.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for localized enum values. Useful for predefined language-specific values selectable in drop-down menus if only one value can be selected. Use [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeLocalizedEnumValue instead if multiple values can be selected.", "additionalProperties": false, "title": "AttributeLocalizedEnumValue", "type": "object", @@ -11,5 +12,5 @@ "key", "label" ], - "$id": "https://example.com/AttributeLocalizedEnumValue.schema.json" + "$id": "https://api.commercetools.com/AttributeLocalizedEnumValue.schema.json" } diff --git a/json-schemas/AttributeMoneyType.schema.json b/json-schemas/AttributeMoneyType.schema.json index 2bd4edc1..b8fb159c 100644 --- a/json-schemas/AttributeMoneyType.schema.json +++ b/json-schemas/AttributeMoneyType.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeMoneyType", "type": "object", "properties": {"name": {"enum": ["money"]}}, "required": ["name"], - "$id": "https://example.com/AttributeMoneyType.schema.json" + "$id": "https://api.commercetools.com/AttributeMoneyType.schema.json" } diff --git a/json-schemas/AttributeNameDoesNotExistError.schema.json b/json-schemas/AttributeNameDoesNotExistError.schema.json index c6e73fce..cbc31238 100644 --- a/json-schemas/AttributeNameDoesNotExistError.schema.json +++ b/json-schemas/AttributeNameDoesNotExistError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeNameDoesNotExistError", "type": "object", @@ -13,5 +21,5 @@ "message", "invalidAttributeName" ], - "$id": "https://example.com/AttributeNameDoesNotExistError.schema.json" + "$id": "https://api.commercetools.com/AttributeNameDoesNotExistError.schema.json" } diff --git a/json-schemas/AttributeNestedType.schema.json b/json-schemas/AttributeNestedType.schema.json index 6a404e85..ccdd849b 100644 --- a/json-schemas/AttributeNestedType.schema.json +++ b/json-schemas/AttributeNestedType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for nesting Attributes based on some existing ProductType. It does not support `isSearchable` and is not supported in queries. The only supported AttributeConstraint is `None`.", "additionalProperties": false, "title": "AttributeNestedType", "type": "object", @@ -11,5 +12,5 @@ "name", "typeReference" ], - "$id": "https://example.com/AttributeNestedType.schema.json" + "$id": "https://api.commercetools.com/AttributeNestedType.schema.json" } diff --git a/json-schemas/AttributeNumberType.schema.json b/json-schemas/AttributeNumberType.schema.json index 6865cc4a..0dcc66b4 100644 --- a/json-schemas/AttributeNumberType.schema.json +++ b/json-schemas/AttributeNumberType.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeNumberType", "type": "object", "properties": {"name": {"enum": ["number"]}}, "required": ["name"], - "$id": "https://example.com/AttributeNumberType.schema.json" + "$id": "https://api.commercetools.com/AttributeNumberType.schema.json" } diff --git a/json-schemas/AttributePlainEnumValue.schema.json b/json-schemas/AttributePlainEnumValue.schema.json index c0cc5201..5432d3bf 100644 --- a/json-schemas/AttributePlainEnumValue.schema.json +++ b/json-schemas/AttributePlainEnumValue.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "A plain enum value must be unique within the enum, otherwise a [DuplicateEnumValues](/errors#product-types-400-duplicate-enum-values) error will be returned.", "additionalProperties": false, "title": "AttributePlainEnumValue", "type": "object", @@ -11,5 +12,5 @@ "key", "label" ], - "$id": "https://example.com/AttributePlainEnumValue.schema.json" + "$id": "https://api.commercetools.com/AttributePlainEnumValue.schema.json" } diff --git a/json-schemas/AttributeReferenceType.schema.json b/json-schemas/AttributeReferenceType.schema.json index 17e2e2e5..a6da5e5d 100644 --- a/json-schemas/AttributeReferenceType.schema.json +++ b/json-schemas/AttributeReferenceType.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeReferenceType", "type": "object", "properties": { "name": {"enum": ["reference"]}, - "referenceTypeId": {"$ref": "ReferenceTypeIdEnum.schema.json"} + "referenceTypeId": {"$ref": "AttributeReferenceTypeIdEnum.schema.json"} }, "required": [ "name", "referenceTypeId" ], - "$id": "https://example.com/AttributeReferenceType.schema.json" + "$id": "https://api.commercetools.com/AttributeReferenceType.schema.json" } diff --git a/json-schemas/AttributeReferenceTypeIdEnum.schema.json b/json-schemas/AttributeReferenceTypeIdEnum.schema.json new file mode 100644 index 00000000..f0227d42 --- /dev/null +++ b/json-schemas/AttributeReferenceTypeIdEnum.schema.json @@ -0,0 +1,21 @@ +{ + "description": "Name of the resource type that the value should reference. Supported resource type identifiers:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "AttributeReferenceTypeId", + "type": "string", + "enum": [ + "cart", + "category", + "channel", + "customer", + "key-value-document", + "order", + "product", + "product-type", + "review", + "shipping-method", + "state", + "zone" + ], + "$id": "https://api.commercetools.com/AttributeReferenceTypeIdEnum.schema.json" +} diff --git a/json-schemas/AttributeSetType.schema.json b/json-schemas/AttributeSetType.schema.json index aec04822..8ece8fc4 100644 --- a/json-schemas/AttributeSetType.schema.json +++ b/json-schemas/AttributeSetType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "AttributeType that defines a set (without duplicate elements) with values of the given `elementType`. It does not support `isRequired`. Since this type itself is an AttributeType, it is possible to construct an AttributeSetType of an AttributeSetType of any AttributeType, and to continue with this iteration until terminating with any non-AttributeSetType. In case the AttributeSetType iteration terminates with an [AttributeNestedType](ctp:api:type:AttributeNestedType), the iteration can have 5 steps at maximum.", "additionalProperties": false, "title": "AttributeSetType", "type": "object", @@ -11,5 +12,5 @@ "name", "elementType" ], - "$id": "https://example.com/AttributeSetType.schema.json" + "$id": "https://api.commercetools.com/AttributeSetType.schema.json" } diff --git a/json-schemas/AttributeTextType.schema.json b/json-schemas/AttributeTextType.schema.json index 9284cf2b..6fc45fdc 100644 --- a/json-schemas/AttributeTextType.schema.json +++ b/json-schemas/AttributeTextType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Attribute type for plain text values.", "additionalProperties": false, "title": "AttributeTextType", "type": "object", "properties": {"name": {"enum": ["text"]}}, "required": ["name"], - "$id": "https://example.com/AttributeTextType.schema.json" + "$id": "https://api.commercetools.com/AttributeTextType.schema.json" } diff --git a/json-schemas/AttributeTimeType.schema.json b/json-schemas/AttributeTimeType.schema.json index 60bccea8..07781ea6 100644 --- a/json-schemas/AttributeTimeType.schema.json +++ b/json-schemas/AttributeTimeType.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AttributeTimeType", "type": "object", "properties": {"name": {"enum": ["time"]}}, "required": ["name"], - "$id": "https://example.com/AttributeTimeType.schema.json" + "$id": "https://api.commercetools.com/AttributeTimeType.schema.json" } diff --git a/json-schemas/AttributeType.schema.json b/json-schemas/AttributeType.schema.json index 3a114180..15f3bcaf 100644 --- a/json-schemas/AttributeType.schema.json +++ b/json-schemas/AttributeType.schema.json @@ -1,25 +1,40 @@ { "oneOf": [ - {"$ref": "https://example.com/AttributeBooleanType.schema.json"}, - {"$ref": "https://example.com/AttributeDateTimeType.schema.json"}, - {"$ref": "https://example.com/AttributeDateType.schema.json"}, - {"$ref": "https://example.com/AttributeEnumType.schema.json"}, - {"$ref": "https://example.com/AttributeLocalizableTextType.schema.json"}, - {"$ref": "https://example.com/AttributeLocalizedEnumType.schema.json"}, - {"$ref": "https://example.com/AttributeMoneyType.schema.json"}, - {"$ref": "https://example.com/AttributeNestedType.schema.json"}, - {"$ref": "https://example.com/AttributeNumberType.schema.json"}, - {"$ref": "https://example.com/AttributeReferenceType.schema.json"}, - {"$ref": "https://example.com/AttributeSetType.schema.json"}, - {"$ref": "https://example.com/AttributeTextType.schema.json"}, - {"$ref": "https://example.com/AttributeTimeType.schema.json"} + {"$ref": "https://api.commercetools.com/AttributeBooleanType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeDateTimeType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeDateType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeEnumType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeLocalizableTextType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeLocalizedEnumType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeMoneyType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeNestedType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeNumberType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeReferenceType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeSetType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeTextType.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeTimeType.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Umbrellla type for specific attribute types discriminated by property `name`.", "additionalProperties": false, "title": "AttributeType", "type": "object", - "properties": {"name": {"type": "string"}}, + "properties": {"name": {"enum": [ + "boolean", + "datetime", + "date", + "enum", + "ltext", + "lenum", + "money", + "nested", + "number", + "reference", + "set", + "text", + "time" + ]}}, "required": ["name"], - "$id": "https://example.com/AttributeType.schema.json", + "$id": "https://api.commercetools.com/AttributeType.schema.json", "discriminator": {"propertyName": "name"} } diff --git a/json-schemas/AuthenticationModeEnum.schema.json b/json-schemas/AuthenticationModeEnum.schema.json new file mode 100644 index 00000000..93859f5f --- /dev/null +++ b/json-schemas/AuthenticationModeEnum.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "AuthenticationMode", + "type": "string", + "enum": [ + "Password", + "ExternalAuth" + ], + "$id": "https://api.commercetools.com/AuthenticationModeEnum.schema.json" +} diff --git a/json-schemas/AuthorizationHeaderAuthentication.schema.json b/json-schemas/AuthorizationHeaderAuthentication.schema.json new file mode 100644 index 00000000..f8dac4f4 --- /dev/null +++ b/json-schemas/AuthorizationHeaderAuthentication.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "The `Authorization` header will be set to the content of `headerValue`. The authentication scheme (such as `Basic` or `Bearer`) should be included in the `headerValue`.\n\nFor example, the `headerValue` for [Basic Authentication](https://datatracker.ietf.org/doc/html/rfc7617) should be set to `Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`.", + "additionalProperties": false, + "title": "AuthorizationHeaderAuthentication", + "type": "object", + "properties": { + "type": {"enum": ["AuthorizationHeader"]}, + "headerValue": {"type": "string"} + }, + "required": [ + "type", + "headerValue" + ], + "$id": "https://api.commercetools.com/AuthorizationHeaderAuthentication.schema.json" +} diff --git a/json-schemas/AzureEventGridDestination.schema.json b/json-schemas/AzureEventGridDestination.schema.json index 09102411..4967af12 100644 --- a/json-schemas/AzureEventGridDestination.schema.json +++ b/json-schemas/AzureEventGridDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AzureEventGridDestination", "type": "object", @@ -13,5 +13,5 @@ "uri", "accessKey" ], - "$id": "https://example.com/AzureEventGridDestination.schema.json" + "$id": "https://api.commercetools.com/AzureEventGridDestination.schema.json" } diff --git a/json-schemas/AzureFunctionsAuthentication.schema.json b/json-schemas/AzureFunctionsAuthentication.schema.json new file mode 100644 index 00000000..386eb532 --- /dev/null +++ b/json-schemas/AzureFunctionsAuthentication.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "To protect your Azure Function, set its `authLevel` to `function` and provide the function's key to be used inside the `x-functions-key` header. For more information, see the [Azure Functions documentation](https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook#keys).\n\nTo protect the secret key from being exposed, remove the code parameter and secret key from the URL. For example, use `https://foo.azurewebsites.net/api/bar` instead of\n`https://foo.azurewebsites.net/api/bar?code=secret`.", + "additionalProperties": false, + "title": "AzureFunctionsAuthentication", + "type": "object", + "properties": { + "type": {"enum": ["AzureFunctions"]}, + "key": {"type": "string"} + }, + "required": [ + "type", + "key" + ], + "$id": "https://api.commercetools.com/AzureFunctionsAuthentication.schema.json" +} diff --git a/json-schemas/AzureServiceBusDestination.schema.json b/json-schemas/AzureServiceBusDestination.schema.json index 278f3e97..e7e3d9af 100644 --- a/json-schemas/AzureServiceBusDestination.schema.json +++ b/json-schemas/AzureServiceBusDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "AzureServiceBusDestination", "type": "object", @@ -11,5 +11,5 @@ "type", "connectionString" ], - "$id": "https://example.com/AzureServiceBusDestination.schema.json" + "$id": "https://api.commercetools.com/AzureServiceBusDestination.schema.json" } diff --git a/json-schemas/BadGatewayError.schema.json b/json-schemas/BadGatewayError.schema.json new file mode 100644 index 00000000..18026126 --- /dev/null +++ b/json-schemas/BadGatewayError.schema.json @@ -0,0 +1,23 @@ +{ + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "BadGatewayError", + "type": "object", + "properties": { + "message": {"type": "string"}, + "code": {"enum": ["BadGateway"]} + }, + "required": [ + "code", + "message" + ], + "$id": "https://api.commercetools.com/BadGatewayError.schema.json" +} diff --git a/json-schemas/BaseAddress.schema.json b/json-schemas/BaseAddress.schema.json new file mode 100644 index 00000000..a5670cc1 --- /dev/null +++ b/json-schemas/BaseAddress.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "BaseAddress", + "type": "object", + "properties": { + "country": {"type": "string"}, + "lastName": {"type": "string"}, + "city": {"type": "string"}, + "postalCode": {"type": "string"}, + "title": {"type": "string"}, + "building": {"type": "string"}, + "streetName": {"type": "string"}, + "company": {"type": "string"}, + "id": {"type": "string"}, + "state": {"type": "string"}, + "department": {"type": "string"}, + "fax": {"type": "string"}, + "key": {"type": "string"}, + "email": {"type": "string"}, + "pOBox": {"type": "string"}, + "streetNumber": {"type": "string"}, + "mobile": {"type": "string"}, + "externalId": {"type": "string"}, + "additionalAddressInfo": {"type": "string"}, + "firstName": {"type": "string"}, + "phone": {"type": "string"}, + "additionalStreetInfo": {"type": "string"}, + "salutation": {"type": "string"}, + "region": {"type": "string"}, + "apartment": {"type": "string"} + }, + "required": ["country"], + "$id": "https://api.commercetools.com/BaseAddress.schema.json" +} diff --git a/json-schemas/BaseResource.schema.json b/json-schemas/BaseResource.schema.json index 36c01606..85359f19 100644 --- a/json-schemas/BaseResource.schema.json +++ b/json-schemas/BaseResource.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "BaseResource", "type": "object", @@ -21,5 +21,5 @@ "createdAt", "lastModifiedAt" ], - "$id": "https://example.com/BaseResource.schema.json" + "$id": "https://api.commercetools.com/BaseResource.schema.json" } diff --git a/json-schemas/Cart.schema.json b/json-schemas/Cart.schema.json index 559a848f..17d9c2e0 100644 --- a/json-schemas/Cart.schema.json +++ b/json-schemas/Cart.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Cart", "type": "object", @@ -13,10 +13,7 @@ "taxedPrice": {"$ref": "TaxedPrice.schema.json"}, "shippingRateInput": {"$ref": "ShippingRateInput.schema.json"}, "shippingInfo": {"$ref": "ShippingInfo.schema.json"}, - "deleteDaysAfterLastModification": { - "type": "number", - "format": "integer" - }, + "deleteDaysAfterLastModification": {"type": "number"}, "origin": {"$ref": "CartOriginEnum.schema.json"}, "refusedGifts": { "type": "array", @@ -50,6 +47,11 @@ "type": "array", "items": {"$ref": "DiscountCodeInfo.schema.json"} }, + "directDiscounts": { + "type": "array", + "items": {"$ref": "DirectDiscount.schema.json"} + }, + "totalLineItemQuantity": {"type": "number"}, "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, "custom": {"$ref": "CustomFields.schema.json"}, @@ -78,5 +80,5 @@ "refusedGifts", "origin" ], - "$id": "https://example.com/Cart.schema.json" + "$id": "https://api.commercetools.com/Cart.schema.json" } diff --git a/json-schemas/CartAddCustomLineItemAction.schema.json b/json-schemas/CartAddCustomLineItemAction.schema.json index 3acb7858..3eac8107 100644 --- a/json-schemas/CartAddCustomLineItemAction.schema.json +++ b/json-schemas/CartAddCustomLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddCustomLineItemAction", "type": "object", @@ -20,5 +20,5 @@ "quantity", "slug" ], - "$id": "https://example.com/CartAddCustomLineItemAction.schema.json" + "$id": "https://api.commercetools.com/CartAddCustomLineItemAction.schema.json" } diff --git a/json-schemas/CartAddDiscountCodeAction.schema.json b/json-schemas/CartAddDiscountCodeAction.schema.json index 84dac4f6..74acc9ed 100644 --- a/json-schemas/CartAddDiscountCodeAction.schema.json +++ b/json-schemas/CartAddDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "code" ], - "$id": "https://example.com/CartAddDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/CartAddDiscountCodeAction.schema.json" } diff --git a/json-schemas/CartAddItemShippingAddressAction.schema.json b/json-schemas/CartAddItemShippingAddressAction.schema.json index edaca6de..cfb7082b 100644 --- a/json-schemas/CartAddItemShippingAddressAction.schema.json +++ b/json-schemas/CartAddItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["addItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/CartAddItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CartAddItemShippingAddressAction.schema.json" } diff --git a/json-schemas/CartAddLineItemAction.schema.json b/json-schemas/CartAddLineItemAction.schema.json index ad9a91ce..4191aef1 100644 --- a/json-schemas/CartAddLineItemAction.schema.json +++ b/json-schemas/CartAddLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddLineItemAction", "type": "object", @@ -18,5 +18,5 @@ "externalPrice": {"$ref": "Money.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartAddLineItemAction.schema.json" + "$id": "https://api.commercetools.com/CartAddLineItemAction.schema.json" } diff --git a/json-schemas/CartAddPaymentAction.schema.json b/json-schemas/CartAddPaymentAction.schema.json index c9530e7a..ea9e908a 100644 --- a/json-schemas/CartAddPaymentAction.schema.json +++ b/json-schemas/CartAddPaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddPaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/CartAddPaymentAction.schema.json" + "$id": "https://api.commercetools.com/CartAddPaymentAction.schema.json" } diff --git a/json-schemas/CartAddShoppingListAction.schema.json b/json-schemas/CartAddShoppingListAction.schema.json index ef8188eb..afab280b 100644 --- a/json-schemas/CartAddShoppingListAction.schema.json +++ b/json-schemas/CartAddShoppingListAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartAddShoppingListAction", "type": "object", @@ -13,5 +13,5 @@ "action", "shoppingList" ], - "$id": "https://example.com/CartAddShoppingListAction.schema.json" + "$id": "https://api.commercetools.com/CartAddShoppingListAction.schema.json" } diff --git a/json-schemas/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json b/json-schemas/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json index 064cb69a..c4533286 100644 --- a/json-schemas/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json +++ b/json-schemas/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction", "type": "object", @@ -16,5 +16,5 @@ "customLineItemId", "targetsDelta" ], - "$id": "https://example.com/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json" + "$id": "https://api.commercetools.com/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json" } diff --git a/json-schemas/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json b/json-schemas/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json index c4d646f8..dcd984d9 100644 --- a/json-schemas/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json +++ b/json-schemas/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartApplyDeltaToLineItemShippingDetailsTargetsAction", "type": "object", @@ -16,5 +16,5 @@ "lineItemId", "targetsDelta" ], - "$id": "https://example.com/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json" + "$id": "https://api.commercetools.com/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json" } diff --git a/json-schemas/CartChangeCustomLineItemMoneyAction.schema.json b/json-schemas/CartChangeCustomLineItemMoneyAction.schema.json index 0734a2b3..f74eb221 100644 --- a/json-schemas/CartChangeCustomLineItemMoneyAction.schema.json +++ b/json-schemas/CartChangeCustomLineItemMoneyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeCustomLineItemMoneyAction", "type": "object", @@ -13,5 +13,5 @@ "customLineItemId", "money" ], - "$id": "https://example.com/CartChangeCustomLineItemMoneyAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeCustomLineItemMoneyAction.schema.json" } diff --git a/json-schemas/CartChangeCustomLineItemQuantityAction.schema.json b/json-schemas/CartChangeCustomLineItemQuantityAction.schema.json index 77e95385..a7176eb4 100644 --- a/json-schemas/CartChangeCustomLineItemQuantityAction.schema.json +++ b/json-schemas/CartChangeCustomLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeCustomLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "customLineItemId", "quantity" ], - "$id": "https://example.com/CartChangeCustomLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeCustomLineItemQuantityAction.schema.json" } diff --git a/json-schemas/CartChangeLineItemQuantityAction.schema.json b/json-schemas/CartChangeLineItemQuantityAction.schema.json index 938f400c..7ba50d4c 100644 --- a/json-schemas/CartChangeLineItemQuantityAction.schema.json +++ b/json-schemas/CartChangeLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeLineItemQuantityAction", "type": "object", @@ -15,5 +15,5 @@ "lineItemId", "quantity" ], - "$id": "https://example.com/CartChangeLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeLineItemQuantityAction.schema.json" } diff --git a/json-schemas/CartChangeTaxCalculationModeAction.schema.json b/json-schemas/CartChangeTaxCalculationModeAction.schema.json index 65c2da46..8e8dab34 100644 --- a/json-schemas/CartChangeTaxCalculationModeAction.schema.json +++ b/json-schemas/CartChangeTaxCalculationModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeTaxCalculationModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxCalculationMode" ], - "$id": "https://example.com/CartChangeTaxCalculationModeAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeTaxCalculationModeAction.schema.json" } diff --git a/json-schemas/CartChangeTaxModeAction.schema.json b/json-schemas/CartChangeTaxModeAction.schema.json index e5c300eb..c074add5 100644 --- a/json-schemas/CartChangeTaxModeAction.schema.json +++ b/json-schemas/CartChangeTaxModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeTaxModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxMode" ], - "$id": "https://example.com/CartChangeTaxModeAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeTaxModeAction.schema.json" } diff --git a/json-schemas/CartChangeTaxRoundingModeAction.schema.json b/json-schemas/CartChangeTaxRoundingModeAction.schema.json index 75c07c54..9c288f63 100644 --- a/json-schemas/CartChangeTaxRoundingModeAction.schema.json +++ b/json-schemas/CartChangeTaxRoundingModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartChangeTaxRoundingModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxRoundingMode" ], - "$id": "https://example.com/CartChangeTaxRoundingModeAction.schema.json" + "$id": "https://api.commercetools.com/CartChangeTaxRoundingModeAction.schema.json" } diff --git a/json-schemas/CartClassificationTier.schema.json b/json-schemas/CartClassificationTier.schema.json index de8c7fcd..5ff983ba 100644 --- a/json-schemas/CartClassificationTier.schema.json +++ b/json-schemas/CartClassificationTier.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to an abstract Cart categorization expressed by strings (for example, `Light`, `Medium`, or `Heavy`).", "additionalProperties": false, "title": "CartClassificationTier", "type": "object", @@ -14,5 +15,5 @@ "value", "price" ], - "$id": "https://example.com/CartClassificationTier.schema.json" + "$id": "https://api.commercetools.com/CartClassificationTier.schema.json" } diff --git a/json-schemas/CartClassificationType.schema.json b/json-schemas/CartClassificationType.schema.json index 73a1848c..fb3c1c8b 100644 --- a/json-schemas/CartClassificationType.schema.json +++ b/json-schemas/CartClassificationType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to an abstract Cart categorization expressed by strings (for example, `Light`, `Medium`, or `Heavy`).\nOnly keys defined in the `values` array can be used to create a tier or to set a value of the `shippingRateInput` on the [Cart](ctp:api:type:Cart).\nKeys must be unique.", "additionalProperties": false, "title": "CartClassificationType", "type": "object", @@ -14,5 +15,5 @@ "type", "values" ], - "$id": "https://example.com/CartClassificationType.schema.json" + "$id": "https://api.commercetools.com/CartClassificationType.schema.json" } diff --git a/json-schemas/CartDiscount.schema.json b/json-schemas/CartDiscount.schema.json index 0af832ad..f41fa37e 100644 --- a/json-schemas/CartDiscount.schema.json +++ b/json-schemas/CartDiscount.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscount", "type": "object", @@ -37,7 +37,7 @@ "format": "date-time" }, "id": {"type": "string"}, - "value": {"$ref": "CartDiscountValueDraft.schema.json"}, + "value": {"$ref": "CartDiscountValue.schema.json"}, "key": {"type": "string"} }, "required": [ @@ -54,5 +54,5 @@ "references", "stackingMode" ], - "$id": "https://example.com/CartDiscount.schema.json" + "$id": "https://api.commercetools.com/CartDiscount.schema.json" } diff --git a/json-schemas/CartDiscountChangeCartPredicateAction.schema.json b/json-schemas/CartDiscountChangeCartPredicateAction.schema.json index c7118733..df18d7e1 100644 --- a/json-schemas/CartDiscountChangeCartPredicateAction.schema.json +++ b/json-schemas/CartDiscountChangeCartPredicateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeCartPredicateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "cartPredicate" ], - "$id": "https://example.com/CartDiscountChangeCartPredicateAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeCartPredicateAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeIsActiveAction.schema.json b/json-schemas/CartDiscountChangeIsActiveAction.schema.json index dc98c9da..1f587bb6 100644 --- a/json-schemas/CartDiscountChangeIsActiveAction.schema.json +++ b/json-schemas/CartDiscountChangeIsActiveAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeIsActiveAction", "type": "object", @@ -11,5 +11,5 @@ "action", "isActive" ], - "$id": "https://example.com/CartDiscountChangeIsActiveAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeIsActiveAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeNameAction.schema.json b/json-schemas/CartDiscountChangeNameAction.schema.json index d30203b9..fa47a27f 100644 --- a/json-schemas/CartDiscountChangeNameAction.schema.json +++ b/json-schemas/CartDiscountChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/CartDiscountChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeNameAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeRequiresDiscountCodeAction.schema.json b/json-schemas/CartDiscountChangeRequiresDiscountCodeAction.schema.json index a90a3b91..81609550 100644 --- a/json-schemas/CartDiscountChangeRequiresDiscountCodeAction.schema.json +++ b/json-schemas/CartDiscountChangeRequiresDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeRequiresDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "requiresDiscountCode" ], - "$id": "https://example.com/CartDiscountChangeRequiresDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeRequiresDiscountCodeAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeSortOrderAction.schema.json b/json-schemas/CartDiscountChangeSortOrderAction.schema.json index 80309295..e7848246 100644 --- a/json-schemas/CartDiscountChangeSortOrderAction.schema.json +++ b/json-schemas/CartDiscountChangeSortOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeSortOrderAction", "type": "object", @@ -11,5 +11,5 @@ "action", "sortOrder" ], - "$id": "https://example.com/CartDiscountChangeSortOrderAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeSortOrderAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeStackingModeAction.schema.json b/json-schemas/CartDiscountChangeStackingModeAction.schema.json index 074ab9b7..d6ab1805 100644 --- a/json-schemas/CartDiscountChangeStackingModeAction.schema.json +++ b/json-schemas/CartDiscountChangeStackingModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeStackingModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "stackingMode" ], - "$id": "https://example.com/CartDiscountChangeStackingModeAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeStackingModeAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeTargetAction.schema.json b/json-schemas/CartDiscountChangeTargetAction.schema.json index 80875982..5c0cb36d 100644 --- a/json-schemas/CartDiscountChangeTargetAction.schema.json +++ b/json-schemas/CartDiscountChangeTargetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeTargetAction", "type": "object", @@ -11,5 +11,5 @@ "action", "target" ], - "$id": "https://example.com/CartDiscountChangeTargetAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeTargetAction.schema.json" } diff --git a/json-schemas/CartDiscountChangeValueAction.schema.json b/json-schemas/CartDiscountChangeValueAction.schema.json index 81b65050..227997c6 100644 --- a/json-schemas/CartDiscountChangeValueAction.schema.json +++ b/json-schemas/CartDiscountChangeValueAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountChangeValueAction", "type": "object", @@ -11,5 +11,5 @@ "action", "value" ], - "$id": "https://example.com/CartDiscountChangeValueAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountChangeValueAction.schema.json" } diff --git a/json-schemas/CartDiscountCustomLineItemsTarget.schema.json b/json-schemas/CartDiscountCustomLineItemsTarget.schema.json index 5067be8d..73a2e899 100644 --- a/json-schemas/CartDiscountCustomLineItemsTarget.schema.json +++ b/json-schemas/CartDiscountCustomLineItemsTarget.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discount is applied to [CustomLineItems](ctp:api:type:CustomLineItem) matching the `predicate`.", "additionalProperties": false, "title": "CartDiscountCustomLineItemsTarget", "type": "object", @@ -11,5 +12,5 @@ "type", "predicate" ], - "$id": "https://example.com/CartDiscountCustomLineItemsTarget.schema.json" + "$id": "https://api.commercetools.com/CartDiscountCustomLineItemsTarget.schema.json" } diff --git a/json-schemas/CartDiscountDraft.schema.json b/json-schemas/CartDiscountDraft.schema.json index 6da4115e..ffc02592 100644 --- a/json-schemas/CartDiscountDraft.schema.json +++ b/json-schemas/CartDiscountDraft.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountDraft", "type": "object", "properties": { "requiresDiscountCode": {"type": "boolean"}, "cartPredicate": {"type": "string"}, - "custom": {"$ref": "CustomFields.schema.json"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, "description": {"$ref": "LocalizedString.schema.json"}, "validFrom": { "type": "string", @@ -28,8 +28,7 @@ "name", "value", "cartPredicate", - "sortOrder", - "requiresDiscountCode" + "sortOrder" ], - "$id": "https://example.com/CartDiscountDraft.schema.json" + "$id": "https://api.commercetools.com/CartDiscountDraft.schema.json" } diff --git a/json-schemas/CartDiscountLineItemsTarget.schema.json b/json-schemas/CartDiscountLineItemsTarget.schema.json index cc0cdcb0..fa2d8136 100644 --- a/json-schemas/CartDiscountLineItemsTarget.schema.json +++ b/json-schemas/CartDiscountLineItemsTarget.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discount is applied to [LineItems](ctp:api:type:LineItem) matching the `predicate`.", "additionalProperties": false, "title": "CartDiscountLineItemsTarget", "type": "object", @@ -11,5 +12,5 @@ "type", "predicate" ], - "$id": "https://example.com/CartDiscountLineItemsTarget.schema.json" + "$id": "https://api.commercetools.com/CartDiscountLineItemsTarget.schema.json" } diff --git a/json-schemas/CartDiscountPagedQueryResponse.schema.json b/json-schemas/CartDiscountPagedQueryResponse.schema.json index 75767336..d25f053a 100644 --- a/json-schemas/CartDiscountPagedQueryResponse.schema.json +++ b/json-schemas/CartDiscountPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [CartDiscount](ctp:api:type:CartDiscount).", "additionalProperties": false, "title": "CartDiscountPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/CartDiscountPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CartDiscountPagedQueryResponse.schema.json" } diff --git a/json-schemas/CartDiscountReference.schema.json b/json-schemas/CartDiscountReference.schema.json index f27ba5f8..20d48290 100644 --- a/json-schemas/CartDiscountReference.schema.json +++ b/json-schemas/CartDiscountReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [CartDiscount](ctp:api:type:CartDiscount).", "additionalProperties": false, "title": "CartDiscountReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CartDiscountReference.schema.json" + "$id": "https://api.commercetools.com/CartDiscountReference.schema.json" } diff --git a/json-schemas/CartDiscountResourceIdentifier.schema.json b/json-schemas/CartDiscountResourceIdentifier.schema.json index bbdd2704..5f426032 100644 --- a/json-schemas/CartDiscountResourceIdentifier.schema.json +++ b/json-schemas/CartDiscountResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CartDiscount](ctp:api:type:CartDiscount).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CartDiscountResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/CartDiscountResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/CartDiscountResourceIdentifier.schema.json" } diff --git a/json-schemas/CartDiscountSetCustomFieldAction.schema.json b/json-schemas/CartDiscountSetCustomFieldAction.schema.json index 413128ec..51071bcc 100644 --- a/json-schemas/CartDiscountSetCustomFieldAction.schema.json +++ b/json-schemas/CartDiscountSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CartDiscountSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetCustomFieldAction.schema.json" } diff --git a/json-schemas/CartDiscountSetCustomTypeAction.schema.json b/json-schemas/CartDiscountSetCustomTypeAction.schema.json index ff236655..7833d73d 100644 --- a/json-schemas/CartDiscountSetCustomTypeAction.schema.json +++ b/json-schemas/CartDiscountSetCustomTypeAction.schema.json @@ -1,13 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetCustomTypeAction", "type": "object", "properties": { "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"type": "object"}, + "fields": {"$ref": "FieldContainer.schema.json"}, "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetCustomTypeAction.schema.json" } diff --git a/json-schemas/CartDiscountSetDescriptionAction.schema.json b/json-schemas/CartDiscountSetDescriptionAction.schema.json index 854e5895..da85f91c 100644 --- a/json-schemas/CartDiscountSetDescriptionAction.schema.json +++ b/json-schemas/CartDiscountSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetDescriptionAction.schema.json" } diff --git a/json-schemas/CartDiscountSetKeyAction.schema.json b/json-schemas/CartDiscountSetKeyAction.schema.json index a7d11b58..48764916 100644 --- a/json-schemas/CartDiscountSetKeyAction.schema.json +++ b/json-schemas/CartDiscountSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetKeyAction.schema.json" } diff --git a/json-schemas/CartDiscountSetValidFromAction.schema.json b/json-schemas/CartDiscountSetValidFromAction.schema.json index d3bed348..2d49ef2b 100644 --- a/json-schemas/CartDiscountSetValidFromAction.schema.json +++ b/json-schemas/CartDiscountSetValidFromAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetValidFromAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetValidFromAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetValidFromAction.schema.json" } diff --git a/json-schemas/CartDiscountSetValidFromAndUntilAction.schema.json b/json-schemas/CartDiscountSetValidFromAndUntilAction.schema.json index 160b857b..33c3a6dd 100644 --- a/json-schemas/CartDiscountSetValidFromAndUntilAction.schema.json +++ b/json-schemas/CartDiscountSetValidFromAndUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetValidFromAndUntilAction", "type": "object", @@ -15,5 +15,5 @@ } }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetValidFromAndUntilAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetValidFromAndUntilAction.schema.json" } diff --git a/json-schemas/CartDiscountSetValidUntilAction.schema.json b/json-schemas/CartDiscountSetValidUntilAction.schema.json index 1af5f643..206d88cf 100644 --- a/json-schemas/CartDiscountSetValidUntilAction.schema.json +++ b/json-schemas/CartDiscountSetValidUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountSetValidUntilAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/CartDiscountSetValidUntilAction.schema.json" + "$id": "https://api.commercetools.com/CartDiscountSetValidUntilAction.schema.json" } diff --git a/json-schemas/CartDiscountShippingCostTarget.schema.json b/json-schemas/CartDiscountShippingCostTarget.schema.json index 322ce88e..f9114328 100644 --- a/json-schemas/CartDiscountShippingCostTarget.schema.json +++ b/json-schemas/CartDiscountShippingCostTarget.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discount is applied to the shipping costs of the [Cart](ctp:api:type:Cart).", "additionalProperties": false, "title": "CartDiscountShippingCostTarget", "type": "object", "properties": {"type": {"enum": ["shipping"]}}, "required": ["type"], - "$id": "https://example.com/CartDiscountShippingCostTarget.schema.json" + "$id": "https://api.commercetools.com/CartDiscountShippingCostTarget.schema.json" } diff --git a/json-schemas/CartDiscountTarget.schema.json b/json-schemas/CartDiscountTarget.schema.json index 4f4f5574..fc565fa9 100644 --- a/json-schemas/CartDiscountTarget.schema.json +++ b/json-schemas/CartDiscountTarget.schema.json @@ -1,17 +1,23 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountCustomLineItemsTarget.schema.json"}, - {"$ref": "https://example.com/CartDiscountLineItemsTarget.schema.json"}, - {"$ref": "https://example.com/CartDiscountShippingCostTarget.schema.json"}, - {"$ref": "https://example.com/MultiBuyCustomLineItemsTarget.schema.json"}, - {"$ref": "https://example.com/MultiBuyLineItemsTarget.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountCustomLineItemsTarget.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountLineItemsTarget.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountShippingCostTarget.schema.json"}, + {"$ref": "https://api.commercetools.com/MultiBuyCustomLineItemsTarget.schema.json"}, + {"$ref": "https://api.commercetools.com/MultiBuyLineItemsTarget.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountTarget", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "customLineItems", + "lineItems", + "shipping", + "multiBuyCustomLineItems", + "multiBuyLineItems" + ]}}, "required": ["type"], - "$id": "https://example.com/CartDiscountTarget.schema.json", + "$id": "https://api.commercetools.com/CartDiscountTarget.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/CartDiscountUpdate.schema.json b/json-schemas/CartDiscountUpdate.schema.json index 5dd1ba49..8caf9594 100644 --- a/json-schemas/CartDiscountUpdate.schema.json +++ b/json-schemas/CartDiscountUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/CartDiscountUpdate.schema.json" + "$id": "https://api.commercetools.com/CartDiscountUpdate.schema.json" } diff --git a/json-schemas/CartDiscountUpdateAction.schema.json b/json-schemas/CartDiscountUpdateAction.schema.json index 7d4c7c5e..e4d1c6cb 100644 --- a/json-schemas/CartDiscountUpdateAction.schema.json +++ b/json-schemas/CartDiscountUpdateAction.schema.json @@ -1,27 +1,43 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountChangeCartPredicateAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeIsActiveAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeNameAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeRequiresDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeSortOrderAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeStackingModeAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeTargetAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountChangeValueAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetKeyAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetValidFromAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetValidFromAndUntilAction.schema.json"}, - {"$ref": "https://example.com/CartDiscountSetValidUntilAction.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountChangeCartPredicateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeIsActiveAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeRequiresDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeSortOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeStackingModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeTargetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountChangeValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetValidFromAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetValidFromAndUntilAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountSetValidUntilAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeCartPredicate", + "changeIsActive", + "changeName", + "changeRequiresDiscountCode", + "changeSortOrder", + "changeStackingMode", + "changeTarget", + "changeValue", + "setCustomField", + "setCustomType", + "setDescription", + "setKey", + "setValidFrom", + "setValidFromAndUntil", + "setValidUntil" + ]}}, "required": ["action"], - "$id": "https://example.com/CartDiscountUpdateAction.schema.json", + "$id": "https://api.commercetools.com/CartDiscountUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/CartDiscountValue.schema.json b/json-schemas/CartDiscountValue.schema.json index 987d2f9e..1c5136b0 100644 --- a/json-schemas/CartDiscountValue.schema.json +++ b/json-schemas/CartDiscountValue.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountValueAbsolute.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueFixed.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueGiftLineItem.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueRelative.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountValueAbsolute.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueFixed.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueGiftLineItem.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueRelative.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValue", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "absolute", + "fixed", + "giftLineItem", + "relative" + ]}}, "required": ["type"], - "$id": "https://example.com/CartDiscountValue.schema.json", + "$id": "https://api.commercetools.com/CartDiscountValue.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/CartDiscountValueAbsolute.schema.json b/json-schemas/CartDiscountValueAbsolute.schema.json index 2b965a29..7408025d 100644 --- a/json-schemas/CartDiscountValueAbsolute.schema.json +++ b/json-schemas/CartDiscountValueAbsolute.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) by an absolute amount (not allowed for [MultiBuyLineItemsTarget](ctp:api:type:MultiBuyLineItemsTarget) and [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget)).", "additionalProperties": false, "title": "CartDiscountValueAbsolute", "type": "object", @@ -7,12 +8,12 @@ "type": {"enum": ["absolute"]}, "money": { "type": "array", - "items": {"$ref": "TypedMoney.schema.json"} + "items": {"$ref": "CentPrecisionMoney.schema.json"} } }, "required": [ "type", "money" ], - "$id": "https://example.com/CartDiscountValueAbsolute.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueAbsolute.schema.json" } diff --git a/json-schemas/CartDiscountValueAbsoluteDraft.schema.json b/json-schemas/CartDiscountValueAbsoluteDraft.schema.json index 8e2e8311..0f0a3f6b 100644 --- a/json-schemas/CartDiscountValueAbsoluteDraft.schema.json +++ b/json-schemas/CartDiscountValueAbsoluteDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValueAbsoluteDraft", "type": "object", @@ -14,5 +14,5 @@ "type", "money" ], - "$id": "https://example.com/CartDiscountValueAbsoluteDraft.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueAbsoluteDraft.schema.json" } diff --git a/json-schemas/CartDiscountValueDraft.schema.json b/json-schemas/CartDiscountValueDraft.schema.json index e7de5dac..8243e795 100644 --- a/json-schemas/CartDiscountValueDraft.schema.json +++ b/json-schemas/CartDiscountValueDraft.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountValueAbsoluteDraft.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueFixedDraft.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueGiftLineItemDraft.schema.json"}, - {"$ref": "https://example.com/CartDiscountValueRelativeDraft.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountValueAbsoluteDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueFixedDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueGiftLineItemDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/CartDiscountValueRelativeDraft.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValueDraft", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "absolute", + "fixed", + "giftLineItem", + "relative" + ]}}, "required": ["type"], - "$id": "https://example.com/CartDiscountValueDraft.schema.json", + "$id": "https://api.commercetools.com/CartDiscountValueDraft.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/CartDiscountValueFixed.schema.json b/json-schemas/CartDiscountValueFixed.schema.json index 8fac7243..bbf782c5 100644 --- a/json-schemas/CartDiscountValueFixed.schema.json +++ b/json-schemas/CartDiscountValueFixed.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied.", "additionalProperties": false, "title": "CartDiscountValueFixed", "type": "object", @@ -7,12 +8,12 @@ "type": {"enum": ["fixed"]}, "money": { "type": "array", - "items": {"$ref": "TypedMoney.schema.json"} + "items": {"$ref": "CentPrecisionMoney.schema.json"} } }, "required": [ "type", "money" ], - "$id": "https://example.com/CartDiscountValueFixed.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueFixed.schema.json" } diff --git a/json-schemas/CartDiscountValueFixedDraft.schema.json b/json-schemas/CartDiscountValueFixedDraft.schema.json index 236bf8df..60f5c753 100644 --- a/json-schemas/CartDiscountValueFixedDraft.schema.json +++ b/json-schemas/CartDiscountValueFixedDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied.", "additionalProperties": false, "title": "CartDiscountValueFixedDraft", "type": "object", @@ -14,5 +15,5 @@ "type", "money" ], - "$id": "https://example.com/CartDiscountValueFixedDraft.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueFixedDraft.schema.json" } diff --git a/json-schemas/CartDiscountValueGiftLineItem.schema.json b/json-schemas/CartDiscountValueGiftLineItem.schema.json index 1cf66965..a11f6b42 100644 --- a/json-schemas/CartDiscountValueGiftLineItem.schema.json +++ b/json-schemas/CartDiscountValueGiftLineItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValueGiftLineItem", "type": "object", @@ -15,5 +15,5 @@ "product", "variantId" ], - "$id": "https://example.com/CartDiscountValueGiftLineItem.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueGiftLineItem.schema.json" } diff --git a/json-schemas/CartDiscountValueGiftLineItemDraft.schema.json b/json-schemas/CartDiscountValueGiftLineItemDraft.schema.json index 929fc335..755f9b3b 100644 --- a/json-schemas/CartDiscountValueGiftLineItemDraft.schema.json +++ b/json-schemas/CartDiscountValueGiftLineItemDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValueGiftLineItemDraft", "type": "object", @@ -15,5 +15,5 @@ "product", "variantId" ], - "$id": "https://example.com/CartDiscountValueGiftLineItemDraft.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueGiftLineItemDraft.schema.json" } diff --git a/json-schemas/CartDiscountValueRelative.schema.json b/json-schemas/CartDiscountValueRelative.schema.json index 49f72129..d13f096b 100644 --- a/json-schemas/CartDiscountValueRelative.schema.json +++ b/json-schemas/CartDiscountValueRelative.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) relative to its price.", "additionalProperties": false, "title": "CartDiscountValueRelative", "type": "object", @@ -11,5 +12,5 @@ "type", "permyriad" ], - "$id": "https://example.com/CartDiscountValueRelative.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueRelative.schema.json" } diff --git a/json-schemas/CartDiscountValueRelativeDraft.schema.json b/json-schemas/CartDiscountValueRelativeDraft.schema.json index 0765fd89..7d41ee43 100644 --- a/json-schemas/CartDiscountValueRelativeDraft.schema.json +++ b/json-schemas/CartDiscountValueRelativeDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDiscountValueRelativeDraft", "type": "object", @@ -11,5 +11,5 @@ "type", "permyriad" ], - "$id": "https://example.com/CartDiscountValueRelativeDraft.schema.json" + "$id": "https://api.commercetools.com/CartDiscountValueRelativeDraft.schema.json" } diff --git a/json-schemas/CartDraft.schema.json b/json-schemas/CartDraft.schema.json index e88c8599..a822f18b 100644 --- a/json-schemas/CartDraft.schema.json +++ b/json-schemas/CartDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartDraft", "type": "object", @@ -21,7 +21,7 @@ }, "itemShippingAddresses": { "type": "array", - "items": {"$ref": "Address.schema.json"} + "items": {"$ref": "BaseAddress.schema.json"} }, "customerEmail": {"type": "string"}, "customerId": {"type": "string"}, @@ -39,9 +39,9 @@ "taxCalculationMode": {"$ref": "TaxCalculationModeEnum.schema.json"}, "taxRoundingMode": {"$ref": "RoundingModeEnum.schema.json"}, "taxMode": {"$ref": "TaxModeEnum.schema.json"}, - "shippingAddress": {"$ref": "Address.schema.json"}, - "billingAddress": {"$ref": "Address.schema.json"} + "shippingAddress": {"$ref": "BaseAddress.schema.json"}, + "billingAddress": {"$ref": "BaseAddress.schema.json"} }, "required": ["currency"], - "$id": "https://example.com/CartDraft.schema.json" + "$id": "https://api.commercetools.com/CartDraft.schema.json" } diff --git a/json-schemas/CartOriginEnum.schema.json b/json-schemas/CartOriginEnum.schema.json index 82d5dc0f..58d22492 100644 --- a/json-schemas/CartOriginEnum.schema.json +++ b/json-schemas/CartOriginEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "CartOrigin", "type": "string", "enum": [ "Customer", - "Merchant" + "Merchant", + "Quote" ], - "$id": "https://example.com/CartOriginEnum.schema.json" + "$id": "https://api.commercetools.com/CartOriginEnum.schema.json" } diff --git a/json-schemas/CartPagedQueryResponse.schema.json b/json-schemas/CartPagedQueryResponse.schema.json index caffce33..0591a294 100644 --- a/json-schemas/CartPagedQueryResponse.schema.json +++ b/json-schemas/CartPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/CartPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CartPagedQueryResponse.schema.json" } diff --git a/json-schemas/CartRecalculateAction.schema.json b/json-schemas/CartRecalculateAction.schema.json index a973c868..af149ec5 100644 --- a/json-schemas/CartRecalculateAction.schema.json +++ b/json-schemas/CartRecalculateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRecalculateAction", "type": "object", @@ -8,5 +8,5 @@ "updateProductData": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/CartRecalculateAction.schema.json" + "$id": "https://api.commercetools.com/CartRecalculateAction.schema.json" } diff --git a/json-schemas/CartReference.schema.json b/json-schemas/CartReference.schema.json index be014685..90ea21cc 100644 --- a/json-schemas/CartReference.schema.json +++ b/json-schemas/CartReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart).", "additionalProperties": false, "title": "CartReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CartReference.schema.json" + "$id": "https://api.commercetools.com/CartReference.schema.json" } diff --git a/json-schemas/CartRemoveCustomLineItemAction.schema.json b/json-schemas/CartRemoveCustomLineItemAction.schema.json index 72465e61..c5d03290 100644 --- a/json-schemas/CartRemoveCustomLineItemAction.schema.json +++ b/json-schemas/CartRemoveCustomLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRemoveCustomLineItemAction", "type": "object", @@ -11,5 +11,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/CartRemoveCustomLineItemAction.schema.json" + "$id": "https://api.commercetools.com/CartRemoveCustomLineItemAction.schema.json" } diff --git a/json-schemas/CartRemoveDiscountCodeAction.schema.json b/json-schemas/CartRemoveDiscountCodeAction.schema.json index 609b7ba4..b9a7cf2c 100644 --- a/json-schemas/CartRemoveDiscountCodeAction.schema.json +++ b/json-schemas/CartRemoveDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRemoveDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "discountCode" ], - "$id": "https://example.com/CartRemoveDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/CartRemoveDiscountCodeAction.schema.json" } diff --git a/json-schemas/CartRemoveItemShippingAddressAction.schema.json b/json-schemas/CartRemoveItemShippingAddressAction.schema.json index 4ccf7a70..2922b294 100644 --- a/json-schemas/CartRemoveItemShippingAddressAction.schema.json +++ b/json-schemas/CartRemoveItemShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRemoveItemShippingAddressAction", "type": "object", @@ -11,5 +11,5 @@ "action", "addressKey" ], - "$id": "https://example.com/CartRemoveItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CartRemoveItemShippingAddressAction.schema.json" } diff --git a/json-schemas/CartRemoveLineItemAction.schema.json b/json-schemas/CartRemoveLineItemAction.schema.json index 5526957e..d19621f9 100644 --- a/json-schemas/CartRemoveLineItemAction.schema.json +++ b/json-schemas/CartRemoveLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRemoveLineItemAction", "type": "object", @@ -15,5 +15,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartRemoveLineItemAction.schema.json" + "$id": "https://api.commercetools.com/CartRemoveLineItemAction.schema.json" } diff --git a/json-schemas/CartRemovePaymentAction.schema.json b/json-schemas/CartRemovePaymentAction.schema.json index b274ef34..123bcde7 100644 --- a/json-schemas/CartRemovePaymentAction.schema.json +++ b/json-schemas/CartRemovePaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartRemovePaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/CartRemovePaymentAction.schema.json" + "$id": "https://api.commercetools.com/CartRemovePaymentAction.schema.json" } diff --git a/json-schemas/CartResourceIdentifier.schema.json b/json-schemas/CartResourceIdentifier.schema.json index 5ce7f096..3ff11c5d 100644 --- a/json-schemas/CartResourceIdentifier.schema.json +++ b/json-schemas/CartResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Cart](ctp:api:type:Cart).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CartResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/CartResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/CartResourceIdentifier.schema.json" } diff --git a/json-schemas/CartScoreTier.schema.json b/json-schemas/CartScoreTier.schema.json index 4c7f340f..d1896460 100644 --- a/json-schemas/CartScoreTier.schema.json +++ b/json-schemas/CartScoreTier.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to an abstract Cart categorization expressed by integers (such as shipping scores or weight ranges).\nEither `price` or `priceFunction` is required.", "additionalProperties": false, "title": "CartScoreTier", "type": "object", @@ -14,5 +15,5 @@ "type", "score" ], - "$id": "https://example.com/CartScoreTier.schema.json" + "$id": "https://api.commercetools.com/CartScoreTier.schema.json" } diff --git a/json-schemas/CartScoreType.schema.json b/json-schemas/CartScoreType.schema.json index f5db4e71..865891d6 100644 --- a/json-schemas/CartScoreType.schema.json +++ b/json-schemas/CartScoreType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to an abstract Cart categorization expressed by integers (such as shipping scores or weight ranges).", "additionalProperties": false, "title": "CartScoreType", "type": "object", "properties": {"type": {"enum": ["CartScore"]}}, "required": ["type"], - "$id": "https://example.com/CartScoreType.schema.json" + "$id": "https://api.commercetools.com/CartScoreType.schema.json" } diff --git a/json-schemas/CartSetAnonymousIdAction.schema.json b/json-schemas/CartSetAnonymousIdAction.schema.json index 3262348d..6fde6c4f 100644 --- a/json-schemas/CartSetAnonymousIdAction.schema.json +++ b/json-schemas/CartSetAnonymousIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetAnonymousIdAction", "type": "object", @@ -8,5 +8,5 @@ "anonymousId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CartSetAnonymousIdAction.schema.json" + "$id": "https://api.commercetools.com/CartSetAnonymousIdAction.schema.json" } diff --git a/json-schemas/CartSetBillingAddressAction.schema.json b/json-schemas/CartSetBillingAddressAction.schema.json index f1fd6eb3..f5aa41a2 100644 --- a/json-schemas/CartSetBillingAddressAction.schema.json +++ b/json-schemas/CartSetBillingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetBillingAddressAction", "type": "object", "properties": { "action": {"enum": ["setBillingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CartSetBillingAddressAction.schema.json" } diff --git a/json-schemas/CartSetBillingAddressCustomFieldAction.schema.json b/json-schemas/CartSetBillingAddressCustomFieldAction.schema.json index 8c083197..605c4222 100644 --- a/json-schemas/CartSetBillingAddressCustomFieldAction.schema.json +++ b/json-schemas/CartSetBillingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetBillingAddressCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CartSetBillingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetBillingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetBillingAddressCustomTypeAction.schema.json b/json-schemas/CartSetBillingAddressCustomTypeAction.schema.json index 7c305afd..77edd131 100644 --- a/json-schemas/CartSetBillingAddressCustomTypeAction.schema.json +++ b/json-schemas/CartSetBillingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetBillingAddressCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setBillingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CartSetBillingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetBillingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetCartTotalTaxAction.schema.json b/json-schemas/CartSetCartTotalTaxAction.schema.json index c4e8fa81..df46f768 100644 --- a/json-schemas/CartSetCartTotalTaxAction.schema.json +++ b/json-schemas/CartSetCartTotalTaxAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCartTotalTaxAction", "type": "object", @@ -15,5 +15,5 @@ "action", "externalTotalGross" ], - "$id": "https://example.com/CartSetCartTotalTaxAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCartTotalTaxAction.schema.json" } diff --git a/json-schemas/CartSetCountryAction.schema.json b/json-schemas/CartSetCountryAction.schema.json index 3d7d9a43..9123a23f 100644 --- a/json-schemas/CartSetCountryAction.schema.json +++ b/json-schemas/CartSetCountryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCountryAction", "type": "object", @@ -8,5 +8,5 @@ "country": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CartSetCountryAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCountryAction.schema.json" } diff --git a/json-schemas/CartSetCustomFieldAction.schema.json b/json-schemas/CartSetCustomFieldAction.schema.json index 20a3df15..418ca1bc 100644 --- a/json-schemas/CartSetCustomFieldAction.schema.json +++ b/json-schemas/CartSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CartSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetCustomLineItemCustomFieldAction.schema.json b/json-schemas/CartSetCustomLineItemCustomFieldAction.schema.json index e29a2c51..317e4ee1 100644 --- a/json-schemas/CartSetCustomLineItemCustomFieldAction.schema.json +++ b/json-schemas/CartSetCustomLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "customLineItemId", "name" ], - "$id": "https://example.com/CartSetCustomLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetCustomLineItemCustomTypeAction.schema.json b/json-schemas/CartSetCustomLineItemCustomTypeAction.schema.json index 1ccabfab..1a6aabea 100644 --- a/json-schemas/CartSetCustomLineItemCustomTypeAction.schema.json +++ b/json-schemas/CartSetCustomLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/CartSetCustomLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetCustomLineItemShippingDetailsAction.schema.json b/json-schemas/CartSetCustomLineItemShippingDetailsAction.schema.json index 22a7c3ef..324556f7 100644 --- a/json-schemas/CartSetCustomLineItemShippingDetailsAction.schema.json +++ b/json-schemas/CartSetCustomLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/CartSetCustomLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/CartSetCustomLineItemTaxAmountAction.schema.json b/json-schemas/CartSetCustomLineItemTaxAmountAction.schema.json index 30d433f0..9c35e868 100644 --- a/json-schemas/CartSetCustomLineItemTaxAmountAction.schema.json +++ b/json-schemas/CartSetCustomLineItemTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomLineItemTaxAmountAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/CartSetCustomLineItemTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomLineItemTaxAmountAction.schema.json" } diff --git a/json-schemas/CartSetCustomLineItemTaxRateAction.schema.json b/json-schemas/CartSetCustomLineItemTaxRateAction.schema.json index d8594eeb..2a0aeb35 100644 --- a/json-schemas/CartSetCustomLineItemTaxRateAction.schema.json +++ b/json-schemas/CartSetCustomLineItemTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomLineItemTaxRateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/CartSetCustomLineItemTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomLineItemTaxRateAction.schema.json" } diff --git a/json-schemas/CartSetCustomShippingMethodAction.schema.json b/json-schemas/CartSetCustomShippingMethodAction.schema.json index 95336cd6..f15db04f 100644 --- a/json-schemas/CartSetCustomShippingMethodAction.schema.json +++ b/json-schemas/CartSetCustomShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomShippingMethodAction", "type": "object", @@ -15,5 +15,5 @@ "shippingMethodName", "shippingRate" ], - "$id": "https://example.com/CartSetCustomShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomShippingMethodAction.schema.json" } diff --git a/json-schemas/CartSetCustomTypeAction.schema.json b/json-schemas/CartSetCustomTypeAction.schema.json index 711bbfd2..0f29497d 100644 --- a/json-schemas/CartSetCustomTypeAction.schema.json +++ b/json-schemas/CartSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CartSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetCustomerEmailAction.schema.json b/json-schemas/CartSetCustomerEmailAction.schema.json index 6a41c600..c23caaac 100644 --- a/json-schemas/CartSetCustomerEmailAction.schema.json +++ b/json-schemas/CartSetCustomerEmailAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomerEmailAction", "type": "object", @@ -11,5 +11,5 @@ "action", "email" ], - "$id": "https://example.com/CartSetCustomerEmailAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomerEmailAction.schema.json" } diff --git a/json-schemas/CartSetCustomerGroupAction.schema.json b/json-schemas/CartSetCustomerGroupAction.schema.json index fc250070..2216c39a 100644 --- a/json-schemas/CartSetCustomerGroupAction.schema.json +++ b/json-schemas/CartSetCustomerGroupAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomerGroupAction", "type": "object", @@ -8,5 +8,5 @@ "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetCustomerGroupAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomerGroupAction.schema.json" } diff --git a/json-schemas/CartSetCustomerIdAction.schema.json b/json-schemas/CartSetCustomerIdAction.schema.json index 14a9240d..cf596a99 100644 --- a/json-schemas/CartSetCustomerIdAction.schema.json +++ b/json-schemas/CartSetCustomerIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetCustomerIdAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setCustomerId"]} }, "required": ["action"], - "$id": "https://example.com/CartSetCustomerIdAction.schema.json" + "$id": "https://api.commercetools.com/CartSetCustomerIdAction.schema.json" } diff --git a/json-schemas/CartSetDeleteDaysAfterLastModificationAction.schema.json b/json-schemas/CartSetDeleteDaysAfterLastModificationAction.schema.json index 600152cb..cdba1ba2 100644 --- a/json-schemas/CartSetDeleteDaysAfterLastModificationAction.schema.json +++ b/json-schemas/CartSetDeleteDaysAfterLastModificationAction.schema.json @@ -1,15 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetDeleteDaysAfterLastModificationAction", "type": "object", "properties": { "action": {"enum": ["setDeleteDaysAfterLastModification"]}, - "deleteDaysAfterLastModification": { - "type": "number", - "format": "integer" - } + "deleteDaysAfterLastModification": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/CartSetDeleteDaysAfterLastModificationAction.schema.json" + "$id": "https://api.commercetools.com/CartSetDeleteDaysAfterLastModificationAction.schema.json" } diff --git a/json-schemas/CartSetDeliveryAddressCustomFieldAction.schema.json b/json-schemas/CartSetDeliveryAddressCustomFieldAction.schema.json index 13985453..39f9f463 100644 --- a/json-schemas/CartSetDeliveryAddressCustomFieldAction.schema.json +++ b/json-schemas/CartSetDeliveryAddressCustomFieldAction.schema.json @@ -1,17 +1,25 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetDeliveryAddressCustomFieldAction", "type": "object", "properties": { + "name": {"type": "string"}, "action": {"enum": ["setDeliveryAddressCustomField"]}, "deliveryId": {"type": "string"}, - "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"$ref": "FieldContainer.schema.json"} + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} }, "required": [ "action", - "deliveryId" + "deliveryId", + "name" ], - "$id": "https://example.com/CartSetDeliveryAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetDeliveryAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetDeliveryAddressCustomTypeAction.schema.json b/json-schemas/CartSetDeliveryAddressCustomTypeAction.schema.json index ff3d83ea..8eb4e19a 100644 --- a/json-schemas/CartSetDeliveryAddressCustomTypeAction.schema.json +++ b/json-schemas/CartSetDeliveryAddressCustomTypeAction.schema.json @@ -1,25 +1,17 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetDeliveryAddressCustomTypeAction", "type": "object", "properties": { - "name": {"type": "string"}, "action": {"enum": ["setDeliveryAddressCustomType"]}, "deliveryId": {"type": "string"}, - "value": {"type": [ - "number", - "string", - "boolean", - "object", - "array", - "null" - ]} + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"} }, "required": [ "action", - "deliveryId", - "name" + "deliveryId" ], - "$id": "https://example.com/CartSetDeliveryAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetDeliveryAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetDirectDiscountsAction.schema.json b/json-schemas/CartSetDirectDiscountsAction.schema.json new file mode 100644 index 00000000..f7a338a9 --- /dev/null +++ b/json-schemas/CartSetDirectDiscountsAction.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CartSetDirectDiscountsAction", + "type": "object", + "properties": { + "discounts": { + "type": "array", + "items": {"$ref": "DirectDiscountDraft.schema.json"} + }, + "action": {"enum": ["setDirectDiscounts"]} + }, + "required": [ + "action", + "discounts" + ], + "$id": "https://api.commercetools.com/CartSetDirectDiscountsAction.schema.json" +} diff --git a/json-schemas/CartSetItemShippingAddressCustomFieldAction.schema.json b/json-schemas/CartSetItemShippingAddressCustomFieldAction.schema.json index 98b33cad..3b6f0fd7 100644 --- a/json-schemas/CartSetItemShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/CartSetItemShippingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetItemShippingAddressCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "addressKey", "name" ], - "$id": "https://example.com/CartSetItemShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetItemShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetItemShippingAddressCustomTypeAction.schema.json b/json-schemas/CartSetItemShippingAddressCustomTypeAction.schema.json index 7ffd4745..e643fd08 100644 --- a/json-schemas/CartSetItemShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/CartSetItemShippingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetItemShippingAddressCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "addressKey" ], - "$id": "https://example.com/CartSetItemShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetItemShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetKeyAction.schema.json b/json-schemas/CartSetKeyAction.schema.json index 65d3d538..607338ec 100644 --- a/json-schemas/CartSetKeyAction.schema.json +++ b/json-schemas/CartSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CartSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CartSetKeyAction.schema.json" } diff --git a/json-schemas/CartSetLineItemCustomFieldAction.schema.json b/json-schemas/CartSetLineItemCustomFieldAction.schema.json index a4e0e3d1..17f4e2cf 100644 --- a/json-schemas/CartSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/CartSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/CartSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetLineItemCustomTypeAction.schema.json b/json-schemas/CartSetLineItemCustomTypeAction.schema.json index 53bfcbb2..e24070db 100644 --- a/json-schemas/CartSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/CartSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetLineItemDistributionChannelAction.schema.json b/json-schemas/CartSetLineItemDistributionChannelAction.schema.json index 3d44d1c8..1c0d0375 100644 --- a/json-schemas/CartSetLineItemDistributionChannelAction.schema.json +++ b/json-schemas/CartSetLineItemDistributionChannelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemDistributionChannelAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemDistributionChannelAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemDistributionChannelAction.schema.json" } diff --git a/json-schemas/CartSetLineItemPriceAction.schema.json b/json-schemas/CartSetLineItemPriceAction.schema.json index 6854537a..f59f22ba 100644 --- a/json-schemas/CartSetLineItemPriceAction.schema.json +++ b/json-schemas/CartSetLineItemPriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemPriceAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemPriceAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemPriceAction.schema.json" } diff --git a/json-schemas/CartSetLineItemShippingDetailsAction.schema.json b/json-schemas/CartSetLineItemShippingDetailsAction.schema.json index be1fee36..d46a22ac 100644 --- a/json-schemas/CartSetLineItemShippingDetailsAction.schema.json +++ b/json-schemas/CartSetLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/CartSetLineItemSupplyChannelAction.schema.json b/json-schemas/CartSetLineItemSupplyChannelAction.schema.json new file mode 100644 index 00000000..b7ee2b71 --- /dev/null +++ b/json-schemas/CartSetLineItemSupplyChannelAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CartSetLineItemSupplyChannelAction", + "type": "object", + "properties": { + "action": {"enum": ["setLineItemSupplyChannel"]}, + "lineItemId": {"type": "string"}, + "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "lineItemId" + ], + "$id": "https://api.commercetools.com/CartSetLineItemSupplyChannelAction.schema.json" +} diff --git a/json-schemas/CartSetLineItemTaxAmountAction.schema.json b/json-schemas/CartSetLineItemTaxAmountAction.schema.json index fb1053cd..4c806d1f 100644 --- a/json-schemas/CartSetLineItemTaxAmountAction.schema.json +++ b/json-schemas/CartSetLineItemTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemTaxAmountAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemTaxAmountAction.schema.json" } diff --git a/json-schemas/CartSetLineItemTaxRateAction.schema.json b/json-schemas/CartSetLineItemTaxRateAction.schema.json index 10430ad4..cbc7327a 100644 --- a/json-schemas/CartSetLineItemTaxRateAction.schema.json +++ b/json-schemas/CartSetLineItemTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemTaxRateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemTaxRateAction.schema.json" } diff --git a/json-schemas/CartSetLineItemTotalPriceAction.schema.json b/json-schemas/CartSetLineItemTotalPriceAction.schema.json index 64d5550b..fba9172a 100644 --- a/json-schemas/CartSetLineItemTotalPriceAction.schema.json +++ b/json-schemas/CartSetLineItemTotalPriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLineItemTotalPriceAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/CartSetLineItemTotalPriceAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLineItemTotalPriceAction.schema.json" } diff --git a/json-schemas/CartSetLocaleAction.schema.json b/json-schemas/CartSetLocaleAction.schema.json index 7fb79dd8..71af3e7f 100644 --- a/json-schemas/CartSetLocaleAction.schema.json +++ b/json-schemas/CartSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/CartSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/CartSetLocaleAction.schema.json" } diff --git a/json-schemas/CartSetShippingAddressAction.schema.json b/json-schemas/CartSetShippingAddressAction.schema.json index f3f0d9a2..8bdefe75 100644 --- a/json-schemas/CartSetShippingAddressAction.schema.json +++ b/json-schemas/CartSetShippingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["setShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingAddressAction.schema.json" } diff --git a/json-schemas/CartSetShippingAddressCustomFieldAction.schema.json b/json-schemas/CartSetShippingAddressCustomFieldAction.schema.json index a03ba4f7..4b44c106 100644 --- a/json-schemas/CartSetShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/CartSetShippingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingAddressCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CartSetShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/CartSetShippingAddressCustomTypeAction.schema.json b/json-schemas/CartSetShippingAddressCustomTypeAction.schema.json index c328b6ce..d8f49164 100644 --- a/json-schemas/CartSetShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/CartSetShippingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingAddressCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setShippingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/CartSetShippingMethodAction.schema.json b/json-schemas/CartSetShippingMethodAction.schema.json index cd52825b..02cdce6e 100644 --- a/json-schemas/CartSetShippingMethodAction.schema.json +++ b/json-schemas/CartSetShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingMethodAction", "type": "object", @@ -9,5 +9,5 @@ "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingMethodAction.schema.json" } diff --git a/json-schemas/CartSetShippingMethodTaxAmountAction.schema.json b/json-schemas/CartSetShippingMethodTaxAmountAction.schema.json index b1aea308..2fbfd5de 100644 --- a/json-schemas/CartSetShippingMethodTaxAmountAction.schema.json +++ b/json-schemas/CartSetShippingMethodTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingMethodTaxAmountAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setShippingMethodTaxAmount"]} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingMethodTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingMethodTaxAmountAction.schema.json" } diff --git a/json-schemas/CartSetShippingMethodTaxRateAction.schema.json b/json-schemas/CartSetShippingMethodTaxRateAction.schema.json index f07dd7f7..bae7bef6 100644 --- a/json-schemas/CartSetShippingMethodTaxRateAction.schema.json +++ b/json-schemas/CartSetShippingMethodTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingMethodTaxRateAction", "type": "object", @@ -8,5 +8,5 @@ "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingMethodTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingMethodTaxRateAction.schema.json" } diff --git a/json-schemas/CartSetShippingRateInputAction.schema.json b/json-schemas/CartSetShippingRateInputAction.schema.json index 943b9409..878b0475 100644 --- a/json-schemas/CartSetShippingRateInputAction.schema.json +++ b/json-schemas/CartSetShippingRateInputAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartSetShippingRateInputAction", "type": "object", @@ -8,5 +8,5 @@ "shippingRateInput": {"$ref": "ShippingRateInputDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CartSetShippingRateInputAction.schema.json" + "$id": "https://api.commercetools.com/CartSetShippingRateInputAction.schema.json" } diff --git a/json-schemas/CartStateEnum.schema.json b/json-schemas/CartStateEnum.schema.json index a4cec8df..d273d17c 100644 --- a/json-schemas/CartStateEnum.schema.json +++ b/json-schemas/CartStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "CartState", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "Merged", "Ordered" ], - "$id": "https://example.com/CartStateEnum.schema.json" + "$id": "https://api.commercetools.com/CartStateEnum.schema.json" } diff --git a/json-schemas/CartUpdate.schema.json b/json-schemas/CartUpdate.schema.json index b6a1372f..c16ab474 100644 --- a/json-schemas/CartUpdate.schema.json +++ b/json-schemas/CartUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/CartUpdate.schema.json" + "$id": "https://api.commercetools.com/CartUpdate.schema.json" } diff --git a/json-schemas/CartUpdateAction.schema.json b/json-schemas/CartUpdateAction.schema.json index c3a707df..f7ce2279 100644 --- a/json-schemas/CartUpdateAction.schema.json +++ b/json-schemas/CartUpdateAction.schema.json @@ -1,72 +1,137 @@ { "oneOf": [ - {"$ref": "https://example.com/CartAddCustomLineItemAction.schema.json"}, - {"$ref": "https://example.com/CartAddDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/CartAddItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/CartAddLineItemAction.schema.json"}, - {"$ref": "https://example.com/CartAddPaymentAction.schema.json"}, - {"$ref": "https://example.com/CartAddShoppingListAction.schema.json"}, - {"$ref": "https://example.com/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json"}, - {"$ref": "https://example.com/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json"}, - {"$ref": "https://example.com/CartChangeCustomLineItemMoneyAction.schema.json"}, - {"$ref": "https://example.com/CartChangeCustomLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/CartChangeLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/CartChangeTaxCalculationModeAction.schema.json"}, - {"$ref": "https://example.com/CartChangeTaxModeAction.schema.json"}, - {"$ref": "https://example.com/CartChangeTaxRoundingModeAction.schema.json"}, - {"$ref": "https://example.com/CartRecalculateAction.schema.json"}, - {"$ref": "https://example.com/CartRemoveCustomLineItemAction.schema.json"}, - {"$ref": "https://example.com/CartRemoveDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/CartRemoveItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/CartRemoveLineItemAction.schema.json"}, - {"$ref": "https://example.com/CartRemovePaymentAction.schema.json"}, - {"$ref": "https://example.com/CartSetAnonymousIdAction.schema.json"}, - {"$ref": "https://example.com/CartSetBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/CartSetBillingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetBillingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetCartTotalTaxAction.schema.json"}, - {"$ref": "https://example.com/CartSetCountryAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomLineItemTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomLineItemTaxRateAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomerEmailAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomerGroupAction.schema.json"}, - {"$ref": "https://example.com/CartSetCustomerIdAction.schema.json"}, - {"$ref": "https://example.com/CartSetDeleteDaysAfterLastModificationAction.schema.json"}, - {"$ref": "https://example.com/CartSetDeliveryAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetDeliveryAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetItemShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetItemShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetKeyAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemDistributionChannelAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemPriceAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemTaxRateAction.schema.json"}, - {"$ref": "https://example.com/CartSetLineItemTotalPriceAction.schema.json"}, - {"$ref": "https://example.com/CartSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingMethodTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingMethodTaxRateAction.schema.json"}, - {"$ref": "https://example.com/CartSetShippingRateInputAction.schema.json"}, - {"$ref": "https://example.com/CartUpdateItemShippingAddressAction.schema.json"} + {"$ref": "https://api.commercetools.com/CartAddCustomLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartAddDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartAddItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartAddLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartAddPaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartAddShoppingListAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeCustomLineItemMoneyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeCustomLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeTaxCalculationModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeTaxModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartChangeTaxRoundingModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRecalculateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRemoveCustomLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRemoveDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRemoveItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRemoveLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartRemovePaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetAnonymousIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetBillingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetBillingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCartTotalTaxAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCountryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomLineItemTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomLineItemTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomerEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomerGroupAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetCustomerIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetDeleteDaysAfterLastModificationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetDeliveryAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetDeliveryAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetDirectDiscountsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetItemShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetItemShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemDistributionChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemSupplyChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLineItemTotalPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingMethodTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingMethodTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartSetShippingRateInputAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CartUpdateItemShippingAddressAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addCustomLineItem", + "addDiscountCode", + "addItemShippingAddress", + "addLineItem", + "addPayment", + "addShoppingList", + "applyDeltaToCustomLineItemShippingDetailsTargets", + "applyDeltaToLineItemShippingDetailsTargets", + "changeCustomLineItemMoney", + "changeCustomLineItemQuantity", + "changeLineItemQuantity", + "changeTaxCalculationMode", + "changeTaxMode", + "changeTaxRoundingMode", + "recalculate", + "removeCustomLineItem", + "removeDiscountCode", + "removeItemShippingAddress", + "removeLineItem", + "removePayment", + "setAnonymousId", + "setBillingAddress", + "setBillingAddressCustomField", + "setBillingAddressCustomType", + "setCartTotalTax", + "setCountry", + "setCustomField", + "setCustomLineItemCustomField", + "setCustomLineItemCustomType", + "setCustomLineItemShippingDetails", + "setCustomLineItemTaxAmount", + "setCustomLineItemTaxRate", + "setCustomShippingMethod", + "setCustomType", + "setCustomerEmail", + "setCustomerGroup", + "setCustomerId", + "setDeleteDaysAfterLastModification", + "setDeliveryAddressCustomField", + "setDeliveryAddressCustomType", + "setDirectDiscounts", + "setItemShippingAddressCustomField", + "setItemShippingAddressCustomType", + "setKey", + "setLineItemCustomField", + "setLineItemCustomType", + "setLineItemDistributionChannel", + "setLineItemPrice", + "setLineItemShippingDetails", + "setLineItemSupplyChannel", + "setLineItemTaxAmount", + "setLineItemTaxRate", + "setLineItemTotalPrice", + "setLocale", + "setShippingAddress", + "setShippingAddressCustomField", + "setShippingAddressCustomType", + "setShippingMethod", + "setShippingMethodTaxAmount", + "setShippingMethodTaxRate", + "setShippingRateInput", + "updateItemShippingAddress" + ]}}, "required": ["action"], - "$id": "https://example.com/CartUpdateAction.schema.json", + "$id": "https://api.commercetools.com/CartUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/CartUpdateItemShippingAddressAction.schema.json b/json-schemas/CartUpdateItemShippingAddressAction.schema.json index f91d02ee..0ac53f9f 100644 --- a/json-schemas/CartUpdateItemShippingAddressAction.schema.json +++ b/json-schemas/CartUpdateItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CartUpdateItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["updateItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/CartUpdateItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CartUpdateItemShippingAddressAction.schema.json" } diff --git a/json-schemas/CartValueTier.schema.json b/json-schemas/CartValueTier.schema.json index a3de9841..7e9b1021 100644 --- a/json-schemas/CartValueTier.schema.json +++ b/json-schemas/CartValueTier.schema.json @@ -1,13 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to the sum of [LineItem](ctp:api:type:LineItem) Prices.\nThe value of the Cart is used to select a tier.\nIf chosen, it is not possible to set a value for the `shippingRateInput` on the [Cart](ctp:api:type:Cart).\nTiers contain the `centAmount` (a value of `100` in the currency `USD` corresponds to `$ 1.00`), and start at `1`.'", "additionalProperties": false, "title": "CartValueTier", "type": "object", "properties": { - "minimumCentAmount": { - "type": "number", - "format": "integer" - }, + "minimumCentAmount": {"type": "number"}, "type": {"enum": ["CartValue"]}, "isMatching": {"type": "boolean"}, "price": {"$ref": "Money.schema.json"} @@ -17,5 +15,5 @@ "minimumCentAmount", "price" ], - "$id": "https://example.com/CartValueTier.schema.json" + "$id": "https://api.commercetools.com/CartValueTier.schema.json" } diff --git a/json-schemas/CartValueType.schema.json b/json-schemas/CartValueType.schema.json index 8f37cc22..2e8383b3 100644 --- a/json-schemas/CartValueType.schema.json +++ b/json-schemas/CartValueType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Used when the ShippingRate maps to the sum of [LineItem](ctp:api:type:LineItem) Prices.\nThe value of the Cart is used to select a tier.\nIf chosen, it is not possible to set a value for the `shippingRateInput` on the [Cart](ctp:api:type:Cart).", "additionalProperties": false, "title": "CartValueType", "type": "object", "properties": {"type": {"enum": ["CartValue"]}}, "required": ["type"], - "$id": "https://example.com/CartValueType.schema.json" + "$id": "https://api.commercetools.com/CartValueType.schema.json" } diff --git a/json-schemas/CartsConfiguration.schema.json b/json-schemas/CartsConfiguration.schema.json index b6b8bd0d..6f1ed6e3 100644 --- a/json-schemas/CartsConfiguration.schema.json +++ b/json-schemas/CartsConfiguration.schema.json @@ -1,8 +1,11 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "CartsConfiguration", "type": "object", - "properties": {"countryTaxRateFallbackEnabled": {"type": "boolean"}}, - "$id": "https://example.com/CartsConfiguration.schema.json" + "properties": { + "countryTaxRateFallbackEnabled": {"type": "boolean"}, + "deleteDaysAfterLastModification": {"type": "number"} + }, + "$id": "https://api.commercetools.com/CartsConfiguration.schema.json" } diff --git a/json-schemas/Category.schema.json b/json-schemas/Category.schema.json index 3bef2617..ebf3a8a2 100644 --- a/json-schemas/Category.schema.json +++ b/json-schemas/Category.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Category", "type": "object", @@ -46,5 +46,5 @@ "ancestors", "orderHint" ], - "$id": "https://example.com/Category.schema.json" + "$id": "https://api.commercetools.com/Category.schema.json" } diff --git a/json-schemas/CategoryAddAssetAction.schema.json b/json-schemas/CategoryAddAssetAction.schema.json index 8e9c91fa..ac694fb4 100644 --- a/json-schemas/CategoryAddAssetAction.schema.json +++ b/json-schemas/CategoryAddAssetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryAddAssetAction", "type": "object", @@ -12,5 +12,5 @@ "action", "asset" ], - "$id": "https://example.com/CategoryAddAssetAction.schema.json" + "$id": "https://api.commercetools.com/CategoryAddAssetAction.schema.json" } diff --git a/json-schemas/CategoryChangeAssetNameAction.schema.json b/json-schemas/CategoryChangeAssetNameAction.schema.json index 91ca263a..d0ba2b26 100644 --- a/json-schemas/CategoryChangeAssetNameAction.schema.json +++ b/json-schemas/CategoryChangeAssetNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryChangeAssetNameAction", "type": "object", @@ -13,5 +13,5 @@ "action", "name" ], - "$id": "https://example.com/CategoryChangeAssetNameAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeAssetNameAction.schema.json" } diff --git a/json-schemas/CategoryChangeAssetOrderAction.schema.json b/json-schemas/CategoryChangeAssetOrderAction.schema.json index 3a77be2f..105b62e2 100644 --- a/json-schemas/CategoryChangeAssetOrderAction.schema.json +++ b/json-schemas/CategoryChangeAssetOrderAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This update action changes the order of the `assets` array. The new order is defined by listing the `id`s of the Assets.", "additionalProperties": false, "title": "CategoryChangeAssetOrderAction", "type": "object", @@ -14,5 +15,5 @@ "action", "assetOrder" ], - "$id": "https://example.com/CategoryChangeAssetOrderAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeAssetOrderAction.schema.json" } diff --git a/json-schemas/CategoryChangeNameAction.schema.json b/json-schemas/CategoryChangeNameAction.schema.json index 2e82c4cf..41e062a1 100644 --- a/json-schemas/CategoryChangeNameAction.schema.json +++ b/json-schemas/CategoryChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/CategoryChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeNameAction.schema.json" } diff --git a/json-schemas/CategoryChangeOrderHintAction.schema.json b/json-schemas/CategoryChangeOrderHintAction.schema.json index 8f2d80f4..8aaca836 100644 --- a/json-schemas/CategoryChangeOrderHintAction.schema.json +++ b/json-schemas/CategoryChangeOrderHintAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryChangeOrderHintAction", "type": "object", @@ -11,5 +11,5 @@ "action", "orderHint" ], - "$id": "https://example.com/CategoryChangeOrderHintAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeOrderHintAction.schema.json" } diff --git a/json-schemas/CategoryChangeParentAction.schema.json b/json-schemas/CategoryChangeParentAction.schema.json index b62ba413..3d5a025d 100644 --- a/json-schemas/CategoryChangeParentAction.schema.json +++ b/json-schemas/CategoryChangeParentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryChangeParentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "parent" ], - "$id": "https://example.com/CategoryChangeParentAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeParentAction.schema.json" } diff --git a/json-schemas/CategoryChangeSlugAction.schema.json b/json-schemas/CategoryChangeSlugAction.schema.json index 6d337580..f3b827dc 100644 --- a/json-schemas/CategoryChangeSlugAction.schema.json +++ b/json-schemas/CategoryChangeSlugAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changing the slug produces the [CategorySlugChangedMessage](ctp:api:type:CategorySlugChangedMessage).", "additionalProperties": false, "title": "CategoryChangeSlugAction", "type": "object", @@ -11,5 +12,5 @@ "action", "slug" ], - "$id": "https://example.com/CategoryChangeSlugAction.schema.json" + "$id": "https://api.commercetools.com/CategoryChangeSlugAction.schema.json" } diff --git a/json-schemas/CategoryCreatedMessage.schema.json b/json-schemas/CategoryCreatedMessage.schema.json index c3a8904f..2df94017 100644 --- a/json-schemas/CategoryCreatedMessage.schema.json +++ b/json-schemas/CategoryCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "category" ], - "$id": "https://example.com/CategoryCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/CategoryCreatedMessage.schema.json" } diff --git a/json-schemas/CategoryCreatedMessagePayload.schema.json b/json-schemas/CategoryCreatedMessagePayload.schema.json index 53b674c1..4dbbe8d1 100644 --- a/json-schemas/CategoryCreatedMessagePayload.schema.json +++ b/json-schemas/CategoryCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "category" ], - "$id": "https://example.com/CategoryCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CategoryCreatedMessagePayload.schema.json" } diff --git a/json-schemas/CategoryDraft.schema.json b/json-schemas/CategoryDraft.schema.json index bbe2e71f..2cda8356 100644 --- a/json-schemas/CategoryDraft.schema.json +++ b/json-schemas/CategoryDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryDraft", "type": "object", @@ -24,5 +24,5 @@ "name", "slug" ], - "$id": "https://example.com/CategoryDraft.schema.json" + "$id": "https://api.commercetools.com/CategoryDraft.schema.json" } diff --git a/json-schemas/CategoryOrderHints.schema.json b/json-schemas/CategoryOrderHints.schema.json index 97b780f4..46160df6 100644 --- a/json-schemas/CategoryOrderHints.schema.json +++ b/json-schemas/CategoryOrderHints.schema.json @@ -1,9 +1,9 @@ { "patternProperties": {"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$": {"type": "string"}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryOrderHints", "type": "object", "properties": {}, - "$id": "https://example.com/CategoryOrderHints.schema.json" + "$id": "https://api.commercetools.com/CategoryOrderHints.schema.json" } diff --git a/json-schemas/CategoryPagedQueryResponse.schema.json b/json-schemas/CategoryPagedQueryResponse.schema.json index f634370e..55487bd9 100644 --- a/json-schemas/CategoryPagedQueryResponse.schema.json +++ b/json-schemas/CategoryPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Category](ctp:api:type:Category).", "additionalProperties": false, "title": "CategoryPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/CategoryPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CategoryPagedQueryResponse.schema.json" } diff --git a/json-schemas/CategoryReference.schema.json b/json-schemas/CategoryReference.schema.json index fc8d66bf..71f95777 100644 --- a/json-schemas/CategoryReference.schema.json +++ b/json-schemas/CategoryReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category).", "additionalProperties": false, "title": "CategoryReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CategoryReference.schema.json" + "$id": "https://api.commercetools.com/CategoryReference.schema.json" } diff --git a/json-schemas/CategoryRemoveAssetAction.schema.json b/json-schemas/CategoryRemoveAssetAction.schema.json index d73329a3..7a0e3817 100644 --- a/json-schemas/CategoryRemoveAssetAction.schema.json +++ b/json-schemas/CategoryRemoveAssetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryRemoveAssetAction", "type": "object", @@ -9,5 +9,5 @@ "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CategoryRemoveAssetAction.schema.json" + "$id": "https://api.commercetools.com/CategoryRemoveAssetAction.schema.json" } diff --git a/json-schemas/CategoryResourceIdentifier.schema.json b/json-schemas/CategoryResourceIdentifier.schema.json index 26817f65..793235e7 100644 --- a/json-schemas/CategoryResourceIdentifier.schema.json +++ b/json-schemas/CategoryResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Category](ctp:api:type:Category).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CategoryResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/CategoryResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/CategoryResourceIdentifier.schema.json" } diff --git a/json-schemas/CategorySetAssetCustomFieldAction.schema.json b/json-schemas/CategorySetAssetCustomFieldAction.schema.json index 694f7614..1ada3888 100644 --- a/json-schemas/CategorySetAssetCustomFieldAction.schema.json +++ b/json-schemas/CategorySetAssetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetAssetCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "action", "name" ], - "$id": "https://example.com/CategorySetAssetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetCustomFieldAction.schema.json" } diff --git a/json-schemas/CategorySetAssetCustomTypeAction.schema.json b/json-schemas/CategorySetAssetCustomTypeAction.schema.json index bed888a9..a447a706 100644 --- a/json-schemas/CategorySetAssetCustomTypeAction.schema.json +++ b/json-schemas/CategorySetAssetCustomTypeAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetAssetCustomTypeAction", "type": "object", "properties": { "action": {"enum": ["setAssetCustomType"]}, "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"type": "object"}, + "fields": {"$ref": "FieldContainer.schema.json"}, "assetId": {"type": "string"}, "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CategorySetAssetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetCustomTypeAction.schema.json" } diff --git a/json-schemas/CategorySetAssetDescriptionAction.schema.json b/json-schemas/CategorySetAssetDescriptionAction.schema.json index 8a638f9c..962e2dd3 100644 --- a/json-schemas/CategorySetAssetDescriptionAction.schema.json +++ b/json-schemas/CategorySetAssetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetAssetDescriptionAction", "type": "object", @@ -10,5 +10,5 @@ "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CategorySetAssetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetDescriptionAction.schema.json" } diff --git a/json-schemas/CategorySetAssetKeyAction.schema.json b/json-schemas/CategorySetAssetKeyAction.schema.json index 557c6ca2..a0b56fcc 100644 --- a/json-schemas/CategorySetAssetKeyAction.schema.json +++ b/json-schemas/CategorySetAssetKeyAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Set or remove the `key` of an [Asset](ctp:api:type:Asset).", "additionalProperties": false, "title": "CategorySetAssetKeyAction", "type": "object", @@ -12,5 +13,5 @@ "action", "assetId" ], - "$id": "https://example.com/CategorySetAssetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetKeyAction.schema.json" } diff --git a/json-schemas/CategorySetAssetSourcesAction.schema.json b/json-schemas/CategorySetAssetSourcesAction.schema.json index b3e8c437..0bd3a0ba 100644 --- a/json-schemas/CategorySetAssetSourcesAction.schema.json +++ b/json-schemas/CategorySetAssetSourcesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetAssetSourcesAction", "type": "object", @@ -16,5 +16,5 @@ "action", "sources" ], - "$id": "https://example.com/CategorySetAssetSourcesAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetSourcesAction.schema.json" } diff --git a/json-schemas/CategorySetAssetTagsAction.schema.json b/json-schemas/CategorySetAssetTagsAction.schema.json index b921eca7..29803032 100644 --- a/json-schemas/CategorySetAssetTagsAction.schema.json +++ b/json-schemas/CategorySetAssetTagsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetAssetTagsAction", "type": "object", @@ -13,5 +13,5 @@ } }, "required": ["action"], - "$id": "https://example.com/CategorySetAssetTagsAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetAssetTagsAction.schema.json" } diff --git a/json-schemas/CategorySetCustomFieldAction.schema.json b/json-schemas/CategorySetCustomFieldAction.schema.json index 11a9e903..bdfc44d6 100644 --- a/json-schemas/CategorySetCustomFieldAction.schema.json +++ b/json-schemas/CategorySetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CategorySetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetCustomFieldAction.schema.json" } diff --git a/json-schemas/CategorySetCustomTypeAction.schema.json b/json-schemas/CategorySetCustomTypeAction.schema.json index bcfb0c26..c584d02d 100644 --- a/json-schemas/CategorySetCustomTypeAction.schema.json +++ b/json-schemas/CategorySetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CategorySetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetCustomTypeAction.schema.json" } diff --git a/json-schemas/CategorySetDescriptionAction.schema.json b/json-schemas/CategorySetDescriptionAction.schema.json index 4e1043ad..a674673a 100644 --- a/json-schemas/CategorySetDescriptionAction.schema.json +++ b/json-schemas/CategorySetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CategorySetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetDescriptionAction.schema.json" } diff --git a/json-schemas/CategorySetExternalIdAction.schema.json b/json-schemas/CategorySetExternalIdAction.schema.json index cfc57411..ace8f099 100644 --- a/json-schemas/CategorySetExternalIdAction.schema.json +++ b/json-schemas/CategorySetExternalIdAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This update action sets a new ID that can be used as an additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).", "additionalProperties": false, "title": "CategorySetExternalIdAction", "type": "object", @@ -8,5 +9,5 @@ "externalId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CategorySetExternalIdAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetExternalIdAction.schema.json" } diff --git a/json-schemas/CategorySetKeyAction.schema.json b/json-schemas/CategorySetKeyAction.schema.json index f6658010..ce6141de 100644 --- a/json-schemas/CategorySetKeyAction.schema.json +++ b/json-schemas/CategorySetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CategorySetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetKeyAction.schema.json" } diff --git a/json-schemas/CategorySetMetaDescriptionAction.schema.json b/json-schemas/CategorySetMetaDescriptionAction.schema.json index 22fb9d36..59b4a0b9 100644 --- a/json-schemas/CategorySetMetaDescriptionAction.schema.json +++ b/json-schemas/CategorySetMetaDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetMetaDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "metaDescription": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CategorySetMetaDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetMetaDescriptionAction.schema.json" } diff --git a/json-schemas/CategorySetMetaKeywordsAction.schema.json b/json-schemas/CategorySetMetaKeywordsAction.schema.json index 0e272b49..08b17b40 100644 --- a/json-schemas/CategorySetMetaKeywordsAction.schema.json +++ b/json-schemas/CategorySetMetaKeywordsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetMetaKeywordsAction", "type": "object", @@ -8,5 +8,5 @@ "metaKeywords": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CategorySetMetaKeywordsAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetMetaKeywordsAction.schema.json" } diff --git a/json-schemas/CategorySetMetaTitleAction.schema.json b/json-schemas/CategorySetMetaTitleAction.schema.json index f8abb6f1..434ef31b 100644 --- a/json-schemas/CategorySetMetaTitleAction.schema.json +++ b/json-schemas/CategorySetMetaTitleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySetMetaTitleAction", "type": "object", @@ -8,5 +8,5 @@ "metaTitle": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CategorySetMetaTitleAction.schema.json" + "$id": "https://api.commercetools.com/CategorySetMetaTitleAction.schema.json" } diff --git a/json-schemas/CategorySlugChangedMessage.schema.json b/json-schemas/CategorySlugChangedMessage.schema.json index e409b75b..7eb8ba0d 100644 --- a/json-schemas/CategorySlugChangedMessage.schema.json +++ b/json-schemas/CategorySlugChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySlugChangedMessage", "type": "object", @@ -35,5 +35,5 @@ "type", "slug" ], - "$id": "https://example.com/CategorySlugChangedMessage.schema.json" + "$id": "https://api.commercetools.com/CategorySlugChangedMessage.schema.json" } diff --git a/json-schemas/CategorySlugChangedMessagePayload.schema.json b/json-schemas/CategorySlugChangedMessagePayload.schema.json index 1680c6a9..e65506eb 100644 --- a/json-schemas/CategorySlugChangedMessagePayload.schema.json +++ b/json-schemas/CategorySlugChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategorySlugChangedMessagePayload", "type": "object", @@ -12,5 +12,5 @@ "type", "slug" ], - "$id": "https://example.com/CategorySlugChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CategorySlugChangedMessagePayload.schema.json" } diff --git a/json-schemas/CategoryUpdate.schema.json b/json-schemas/CategoryUpdate.schema.json index 348fe2ad..48657966 100644 --- a/json-schemas/CategoryUpdate.schema.json +++ b/json-schemas/CategoryUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/CategoryUpdate.schema.json" + "$id": "https://api.commercetools.com/CategoryUpdate.schema.json" } diff --git a/json-schemas/CategoryUpdateAction.schema.json b/json-schemas/CategoryUpdateAction.schema.json index a098800c..e38f9fba 100644 --- a/json-schemas/CategoryUpdateAction.schema.json +++ b/json-schemas/CategoryUpdateAction.schema.json @@ -1,34 +1,57 @@ { "oneOf": [ - {"$ref": "https://example.com/CategoryAddAssetAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeAssetNameAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeAssetOrderAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeNameAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeOrderHintAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeParentAction.schema.json"}, - {"$ref": "https://example.com/CategoryChangeSlugAction.schema.json"}, - {"$ref": "https://example.com/CategoryRemoveAssetAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetKeyAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetSourcesAction.schema.json"}, - {"$ref": "https://example.com/CategorySetAssetTagsAction.schema.json"}, - {"$ref": "https://example.com/CategorySetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CategorySetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CategorySetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/CategorySetExternalIdAction.schema.json"}, - {"$ref": "https://example.com/CategorySetKeyAction.schema.json"}, - {"$ref": "https://example.com/CategorySetMetaDescriptionAction.schema.json"}, - {"$ref": "https://example.com/CategorySetMetaKeywordsAction.schema.json"}, - {"$ref": "https://example.com/CategorySetMetaTitleAction.schema.json"} + {"$ref": "https://api.commercetools.com/CategoryAddAssetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeAssetNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeAssetOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeOrderHintAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeParentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryChangeSlugAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryRemoveAssetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetSourcesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetAssetTagsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetExternalIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetMetaDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetMetaKeywordsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySetMetaTitleAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CategoryUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addAsset", + "changeAssetName", + "changeAssetOrder", + "changeName", + "changeOrderHint", + "changeParent", + "changeSlug", + "removeAsset", + "setAssetCustomField", + "setAssetCustomType", + "setAssetDescription", + "setAssetKey", + "setAssetSources", + "setAssetTags", + "setCustomField", + "setCustomType", + "setDescription", + "setExternalId", + "setKey", + "setMetaDescription", + "setMetaKeywords", + "setMetaTitle" + ]}}, "required": ["action"], - "$id": "https://example.com/CategoryUpdateAction.schema.json", + "$id": "https://api.commercetools.com/CategoryUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/CentPrecisionMoney.schema.json b/json-schemas/CentPrecisionMoney.schema.json index b20ddcac..da1465b8 100644 --- a/json-schemas/CentPrecisionMoney.schema.json +++ b/json-schemas/CentPrecisionMoney.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Object that stores cent amounts in a specific currency.", "additionalProperties": false, "title": "CentPrecisionMoney", "type": "object", @@ -10,10 +11,10 @@ "currencyCode": {"type": "string"} }, "required": [ - "type", - "fractionDigits", "centAmount", - "currencyCode" + "currencyCode", + "type", + "fractionDigits" ], - "$id": "https://example.com/CentPrecisionMoney.schema.json" + "$id": "https://api.commercetools.com/CentPrecisionMoney.schema.json" } diff --git a/json-schemas/CentPrecisionMoneyDraft.schema.json b/json-schemas/CentPrecisionMoneyDraft.schema.json index 397ed131..d5125f14 100644 --- a/json-schemas/CentPrecisionMoneyDraft.schema.json +++ b/json-schemas/CentPrecisionMoneyDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CentPrecisionMoneyDraft", "type": "object", @@ -14,5 +14,5 @@ "currencyCode", "type" ], - "$id": "https://example.com/CentPrecisionMoneyDraft.schema.json" + "$id": "https://api.commercetools.com/CentPrecisionMoneyDraft.schema.json" } diff --git a/json-schemas/ChangeSubscription.schema.json b/json-schemas/ChangeSubscription.schema.json index 943b68a8..6701e37a 100644 --- a/json-schemas/ChangeSubscription.schema.json +++ b/json-schemas/ChangeSubscription.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChangeSubscription", "type": "object", "properties": {"resourceTypeId": {"type": "string"}}, "required": ["resourceTypeId"], - "$id": "https://example.com/ChangeSubscription.schema.json" + "$id": "https://api.commercetools.com/ChangeSubscription.schema.json" } diff --git a/json-schemas/Channel.schema.json b/json-schemas/Channel.schema.json index 1efb5498..1c05417f 100644 --- a/json-schemas/Channel.schema.json +++ b/json-schemas/Channel.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Channel", "type": "object", @@ -36,5 +36,5 @@ "key", "roles" ], - "$id": "https://example.com/Channel.schema.json" + "$id": "https://api.commercetools.com/Channel.schema.json" } diff --git a/json-schemas/ChannelAddRolesAction.schema.json b/json-schemas/ChannelAddRolesAction.schema.json index 57ab1472..192cd3aa 100644 --- a/json-schemas/ChannelAddRolesAction.schema.json +++ b/json-schemas/ChannelAddRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelAddRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/ChannelAddRolesAction.schema.json" + "$id": "https://api.commercetools.com/ChannelAddRolesAction.schema.json" } diff --git a/json-schemas/ChannelChangeDescriptionAction.schema.json b/json-schemas/ChannelChangeDescriptionAction.schema.json index 0335fbdb..e69aaf34 100644 --- a/json-schemas/ChannelChangeDescriptionAction.schema.json +++ b/json-schemas/ChannelChangeDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelChangeDescriptionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "description" ], - "$id": "https://example.com/ChannelChangeDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ChannelChangeDescriptionAction.schema.json" } diff --git a/json-schemas/ChannelChangeKeyAction.schema.json b/json-schemas/ChannelChangeKeyAction.schema.json index f22fc4cc..0af2ae68 100644 --- a/json-schemas/ChannelChangeKeyAction.schema.json +++ b/json-schemas/ChannelChangeKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelChangeKeyAction", "type": "object", @@ -11,5 +11,5 @@ "action", "key" ], - "$id": "https://example.com/ChannelChangeKeyAction.schema.json" + "$id": "https://api.commercetools.com/ChannelChangeKeyAction.schema.json" } diff --git a/json-schemas/ChannelChangeNameAction.schema.json b/json-schemas/ChannelChangeNameAction.schema.json index 31cfd3c3..a3f754a0 100644 --- a/json-schemas/ChannelChangeNameAction.schema.json +++ b/json-schemas/ChannelChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ChannelChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ChannelChangeNameAction.schema.json" } diff --git a/json-schemas/ChannelDraft.schema.json b/json-schemas/ChannelDraft.schema.json index 426cfc2a..3730e2f3 100644 --- a/json-schemas/ChannelDraft.schema.json +++ b/json-schemas/ChannelDraft.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelDraft", "type": "object", "properties": { - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "geoLocation": {"$ref": "GeoJson.schema.json"}, "roles": { "type": "array", @@ -16,5 +16,5 @@ "key": {"type": "string"} }, "required": ["key"], - "$id": "https://example.com/ChannelDraft.schema.json" + "$id": "https://api.commercetools.com/ChannelDraft.schema.json" } diff --git a/json-schemas/ChannelPagedQueryResponse.schema.json b/json-schemas/ChannelPagedQueryResponse.schema.json index 8ad22207..65567496 100644 --- a/json-schemas/ChannelPagedQueryResponse.schema.json +++ b/json-schemas/ChannelPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Channel](ctp:api:type:Channel).", "additionalProperties": false, "title": "ChannelPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ChannelPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ChannelPagedQueryResponse.schema.json" } diff --git a/json-schemas/ChannelReference.schema.json b/json-schemas/ChannelReference.schema.json index f41e7629..657f5f59 100644 --- a/json-schemas/ChannelReference.schema.json +++ b/json-schemas/ChannelReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel).", "additionalProperties": false, "title": "ChannelReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ChannelReference.schema.json" + "$id": "https://api.commercetools.com/ChannelReference.schema.json" } diff --git a/json-schemas/ChannelRemoveRolesAction.schema.json b/json-schemas/ChannelRemoveRolesAction.schema.json index a06cb695..1bdc868b 100644 --- a/json-schemas/ChannelRemoveRolesAction.schema.json +++ b/json-schemas/ChannelRemoveRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelRemoveRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/ChannelRemoveRolesAction.schema.json" + "$id": "https://api.commercetools.com/ChannelRemoveRolesAction.schema.json" } diff --git a/json-schemas/ChannelResourceIdentifier.schema.json b/json-schemas/ChannelResourceIdentifier.schema.json index 1a2b4655..ae9d3456 100644 --- a/json-schemas/ChannelResourceIdentifier.schema.json +++ b/json-schemas/ChannelResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ChannelResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ChannelResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ChannelResourceIdentifier.schema.json" } diff --git a/json-schemas/ChannelRoleEnumEnum.schema.json b/json-schemas/ChannelRoleEnumEnum.schema.json index 728fbc37..e0283120 100644 --- a/json-schemas/ChannelRoleEnumEnum.schema.json +++ b/json-schemas/ChannelRoleEnumEnum.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Describes the purpose and type of the Channel. A Channel can have one or more roles.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ChannelRoleEnum", "type": "string", "enum": [ @@ -9,5 +10,5 @@ "OrderImport", "Primary" ], - "$id": "https://example.com/ChannelRoleEnumEnum.schema.json" + "$id": "https://api.commercetools.com/ChannelRoleEnumEnum.schema.json" } diff --git a/json-schemas/ChannelSetAddressAction.schema.json b/json-schemas/ChannelSetAddressAction.schema.json index d3e413d5..a88ea2e3 100644 --- a/json-schemas/ChannelSetAddressAction.schema.json +++ b/json-schemas/ChannelSetAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetAddressAction", "type": "object", "properties": { "action": {"enum": ["setAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ChannelSetAddressAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetAddressAction.schema.json" } diff --git a/json-schemas/ChannelSetAddressCustomFieldAction.schema.json b/json-schemas/ChannelSetAddressCustomFieldAction.schema.json index e77cbe19..f4139c2c 100644 --- a/json-schemas/ChannelSetAddressCustomFieldAction.schema.json +++ b/json-schemas/ChannelSetAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetAddressCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/ChannelSetAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/ChannelSetAddressCustomTypeAction.schema.json b/json-schemas/ChannelSetAddressCustomTypeAction.schema.json index 8a160449..6455f60b 100644 --- a/json-schemas/ChannelSetAddressCustomTypeAction.schema.json +++ b/json-schemas/ChannelSetAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetAddressCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/ChannelSetAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/ChannelSetCustomFieldAction.schema.json b/json-schemas/ChannelSetCustomFieldAction.schema.json index 3329131b..0eb4d249 100644 --- a/json-schemas/ChannelSetCustomFieldAction.schema.json +++ b/json-schemas/ChannelSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/ChannelSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetCustomFieldAction.schema.json" } diff --git a/json-schemas/ChannelSetCustomTypeAction.schema.json b/json-schemas/ChannelSetCustomTypeAction.schema.json index ae52213c..58bf29a6 100644 --- a/json-schemas/ChannelSetCustomTypeAction.schema.json +++ b/json-schemas/ChannelSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/ChannelSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetCustomTypeAction.schema.json" } diff --git a/json-schemas/ChannelSetGeoLocationAction.schema.json b/json-schemas/ChannelSetGeoLocationAction.schema.json index c91726a0..d99d0065 100644 --- a/json-schemas/ChannelSetGeoLocationAction.schema.json +++ b/json-schemas/ChannelSetGeoLocationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetGeoLocationAction", "type": "object", @@ -8,5 +8,5 @@ "geoLocation": {"$ref": "GeoJson.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ChannelSetGeoLocationAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetGeoLocationAction.schema.json" } diff --git a/json-schemas/ChannelSetRolesAction.schema.json b/json-schemas/ChannelSetRolesAction.schema.json index 53d729a1..2bf0739b 100644 --- a/json-schemas/ChannelSetRolesAction.schema.json +++ b/json-schemas/ChannelSetRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelSetRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/ChannelSetRolesAction.schema.json" + "$id": "https://api.commercetools.com/ChannelSetRolesAction.schema.json" } diff --git a/json-schemas/ChannelUpdate.schema.json b/json-schemas/ChannelUpdate.schema.json index adf44f0d..e6ec0857 100644 --- a/json-schemas/ChannelUpdate.schema.json +++ b/json-schemas/ChannelUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ChannelUpdate.schema.json" + "$id": "https://api.commercetools.com/ChannelUpdate.schema.json" } diff --git a/json-schemas/ChannelUpdateAction.schema.json b/json-schemas/ChannelUpdateAction.schema.json index efba6650..dcd1612a 100644 --- a/json-schemas/ChannelUpdateAction.schema.json +++ b/json-schemas/ChannelUpdateAction.schema.json @@ -1,24 +1,37 @@ { "oneOf": [ - {"$ref": "https://example.com/ChannelAddRolesAction.schema.json"}, - {"$ref": "https://example.com/ChannelChangeDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ChannelChangeKeyAction.schema.json"}, - {"$ref": "https://example.com/ChannelChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ChannelRemoveRolesAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetAddressAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetGeoLocationAction.schema.json"}, - {"$ref": "https://example.com/ChannelSetRolesAction.schema.json"} + {"$ref": "https://api.commercetools.com/ChannelAddRolesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelChangeDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelChangeKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelRemoveRolesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetGeoLocationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelSetRolesAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ChannelUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addRoles", + "changeDescription", + "changeKey", + "changeName", + "removeRoles", + "setAddress", + "setAddressCustomField", + "setAddressCustomType", + "setCustomField", + "setCustomType", + "setGeoLocation", + "setRoles" + ]}}, "required": ["action"], - "$id": "https://example.com/ChannelUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ChannelUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ClassificationShippingRateInput.schema.json b/json-schemas/ClassificationShippingRateInput.schema.json index cf3be2f2..9f447fe9 100644 --- a/json-schemas/ClassificationShippingRateInput.schema.json +++ b/json-schemas/ClassificationShippingRateInput.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ClassificationShippingRateInput", "type": "object", @@ -13,5 +13,5 @@ "key", "label" ], - "$id": "https://example.com/ClassificationShippingRateInput.schema.json" + "$id": "https://api.commercetools.com/ClassificationShippingRateInput.schema.json" } diff --git a/json-schemas/ClassificationShippingRateInputDraft.schema.json b/json-schemas/ClassificationShippingRateInputDraft.schema.json index a609dc3a..1fcdfd9b 100644 --- a/json-schemas/ClassificationShippingRateInputDraft.schema.json +++ b/json-schemas/ClassificationShippingRateInputDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ClassificationShippingRateInputDraft", "type": "object", @@ -11,5 +11,5 @@ "type", "key" ], - "$id": "https://example.com/ClassificationShippingRateInputDraft.schema.json" + "$id": "https://api.commercetools.com/ClassificationShippingRateInputDraft.schema.json" } diff --git a/json-schemas/ClientLogging.schema.json b/json-schemas/ClientLogging.schema.json index 6dc16415..ba175951 100644 --- a/json-schemas/ClientLogging.schema.json +++ b/json-schemas/ClientLogging.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "These objects represent information about which [API Client](/../api/projects/api-clients) created or modified a resource. For more information, see [Client Logging](/client-logging).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ClientLogging", "type": "object", "properties": { @@ -9,5 +10,5 @@ "externalUserId": {"type": "string"}, "customer": {"$ref": "CustomerReference.schema.json"} }, - "$id": "https://example.com/ClientLogging.schema.json" + "$id": "https://api.commercetools.com/ClientLogging.schema.json" } diff --git a/json-schemas/DeliveryCloudEventsFormat.schema.json b/json-schemas/CloudEventsFormat.schema.json similarity index 57% rename from json-schemas/DeliveryCloudEventsFormat.schema.json rename to json-schemas/CloudEventsFormat.schema.json index b6e683d7..db1d074a 100644 --- a/json-schemas/DeliveryCloudEventsFormat.schema.json +++ b/json-schemas/CloudEventsFormat.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "DeliveryCloudEventsFormat", + "title": "CloudEventsFormat", "type": "object", "properties": { "type": {"enum": ["CloudEvents"]}, @@ -11,5 +11,5 @@ "type", "cloudEventsVersion" ], - "$id": "https://example.com/DeliveryCloudEventsFormat.schema.json" + "$id": "https://api.commercetools.com/CloudEventsFormat.schema.json" } diff --git a/json-schemas/ConcurrentModificationError.schema.json b/json-schemas/ConcurrentModificationError.schema.json index 62ef93da..e9dc4e74 100644 --- a/json-schemas/ConcurrentModificationError.schema.json +++ b/json-schemas/ConcurrentModificationError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ConcurrentModificationError", "type": "object", @@ -12,5 +20,5 @@ "code", "message" ], - "$id": "https://example.com/ConcurrentModificationError.schema.json" + "$id": "https://api.commercetools.com/ConcurrentModificationError.schema.json" } diff --git a/json-schemas/ContainerAndKey.schema.json b/json-schemas/ContainerAndKey.schema.json new file mode 100644 index 00000000..bd3b748f --- /dev/null +++ b/json-schemas/ContainerAndKey.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Custom Objects are grouped into containers, which can be used like namespaces. Within a given container, a user-defined key can be used to uniquely identify resources.", + "additionalProperties": false, + "title": "ContainerAndKey", + "type": "object", + "properties": { + "container": {"type": "string"}, + "key": {"type": "string"} + }, + "required": [ + "key", + "container" + ], + "$id": "https://api.commercetools.com/ContainerAndKey.schema.json" +} diff --git a/json-schemas/CreatedBy.schema.json b/json-schemas/CreatedBy.schema.json index 3770249f..6b43959e 100644 --- a/json-schemas/CreatedBy.schema.json +++ b/json-schemas/CreatedBy.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CreatedBy", "type": "object", "properties": { @@ -9,5 +10,5 @@ "externalUserId": {"type": "string"}, "customer": {"$ref": "CustomerReference.schema.json"} }, - "$id": "https://example.com/CreatedBy.schema.json" + "$id": "https://api.commercetools.com/CreatedBy.schema.json" } diff --git a/json-schemas/CustomFieldBooleanType.schema.json b/json-schemas/CustomFieldBooleanType.schema.json index cd926f89..e04abefc 100644 --- a/json-schemas/CustomFieldBooleanType.schema.json +++ b/json-schemas/CustomFieldBooleanType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for Boolean values.", "additionalProperties": false, "title": "CustomFieldBooleanType", "type": "object", "properties": {"name": {"enum": ["Boolean"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldBooleanType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldBooleanType.schema.json" } diff --git a/json-schemas/CustomFieldDateTimeType.schema.json b/json-schemas/CustomFieldDateTimeType.schema.json index 42c5a0b6..13376795 100644 --- a/json-schemas/CustomFieldDateTimeType.schema.json +++ b/json-schemas/CustomFieldDateTimeType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [DateTime](ctp:api:type:DateTime) values.", "additionalProperties": false, "title": "CustomFieldDateTimeType", "type": "object", "properties": {"name": {"enum": ["DateTime"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldDateTimeType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldDateTimeType.schema.json" } diff --git a/json-schemas/CustomFieldDateType.schema.json b/json-schemas/CustomFieldDateType.schema.json index e9594748..a44bff08 100644 --- a/json-schemas/CustomFieldDateType.schema.json +++ b/json-schemas/CustomFieldDateType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [Date](ctp:api:type:Date) values.", "additionalProperties": false, "title": "CustomFieldDateType", "type": "object", "properties": {"name": {"enum": ["Date"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldDateType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldDateType.schema.json" } diff --git a/json-schemas/CustomFieldEnumType.schema.json b/json-schemas/CustomFieldEnumType.schema.json index 6b3c447d..24fce552 100644 --- a/json-schemas/CustomFieldEnumType.schema.json +++ b/json-schemas/CustomFieldEnumType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for enum values.", "additionalProperties": false, "title": "CustomFieldEnumType", "type": "object", @@ -14,5 +15,5 @@ "name", "values" ], - "$id": "https://example.com/CustomFieldEnumType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldEnumType.schema.json" } diff --git a/json-schemas/CustomFieldEnumValue.schema.json b/json-schemas/CustomFieldEnumValue.schema.json index f8e606a1..8c68011d 100644 --- a/json-schemas/CustomFieldEnumValue.schema.json +++ b/json-schemas/CustomFieldEnumValue.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Defines an allowed value of a [CustomFieldEnumType](ctp:api:type:CustomFieldEnumType) field.", "additionalProperties": false, "title": "CustomFieldEnumValue", "type": "object", @@ -11,5 +12,5 @@ "key", "label" ], - "$id": "https://example.com/CustomFieldEnumValue.schema.json" + "$id": "https://api.commercetools.com/CustomFieldEnumValue.schema.json" } diff --git a/json-schemas/CustomFieldLocalizedEnumType.schema.json b/json-schemas/CustomFieldLocalizedEnumType.schema.json index 8cb2ea4d..e606922e 100644 --- a/json-schemas/CustomFieldLocalizedEnumType.schema.json +++ b/json-schemas/CustomFieldLocalizedEnumType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for localized enum values.", "additionalProperties": false, "title": "CustomFieldLocalizedEnumType", "type": "object", @@ -14,5 +15,5 @@ "name", "values" ], - "$id": "https://example.com/CustomFieldLocalizedEnumType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldLocalizedEnumType.schema.json" } diff --git a/json-schemas/CustomFieldLocalizedEnumValue.schema.json b/json-schemas/CustomFieldLocalizedEnumValue.schema.json index 01ce5621..44aaac5c 100644 --- a/json-schemas/CustomFieldLocalizedEnumValue.schema.json +++ b/json-schemas/CustomFieldLocalizedEnumValue.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Defines an allowed value of a [CustomFieldLocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) field.", "additionalProperties": false, "title": "CustomFieldLocalizedEnumValue", "type": "object", @@ -11,5 +12,5 @@ "key", "label" ], - "$id": "https://example.com/CustomFieldLocalizedEnumValue.schema.json" + "$id": "https://api.commercetools.com/CustomFieldLocalizedEnumValue.schema.json" } diff --git a/json-schemas/CustomFieldLocalizedStringType.schema.json b/json-schemas/CustomFieldLocalizedStringType.schema.json index 55b44996..0a6bfb5f 100644 --- a/json-schemas/CustomFieldLocalizedStringType.schema.json +++ b/json-schemas/CustomFieldLocalizedStringType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [LocalizedString](ctp:api:type:LocalizedString) values.", "additionalProperties": false, "title": "CustomFieldLocalizedStringType", "type": "object", "properties": {"name": {"enum": ["LocalizedString"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldLocalizedStringType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldLocalizedStringType.schema.json" } diff --git a/json-schemas/CustomFieldMoneyType.schema.json b/json-schemas/CustomFieldMoneyType.schema.json index e8a8f48e..7fadf750 100644 --- a/json-schemas/CustomFieldMoneyType.schema.json +++ b/json-schemas/CustomFieldMoneyType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [CentPrecisionMoney](ctp:api:type:CentPrecisionMoney) values.", "additionalProperties": false, "title": "CustomFieldMoneyType", "type": "object", "properties": {"name": {"enum": ["Money"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldMoneyType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldMoneyType.schema.json" } diff --git a/json-schemas/CustomFieldNumberType.schema.json b/json-schemas/CustomFieldNumberType.schema.json index dc5d00f2..36f34843 100644 --- a/json-schemas/CustomFieldNumberType.schema.json +++ b/json-schemas/CustomFieldNumberType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for number values.", "additionalProperties": false, "title": "CustomFieldNumberType", "type": "object", "properties": {"name": {"enum": ["Number"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldNumberType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldNumberType.schema.json" } diff --git a/json-schemas/CustomFieldReferenceType.schema.json b/json-schemas/CustomFieldReferenceType.schema.json index ee08f363..fd65bac4 100644 --- a/json-schemas/CustomFieldReferenceType.schema.json +++ b/json-schemas/CustomFieldReferenceType.schema.json @@ -1,15 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [Reference](ctp:api:type:Reference) values.", "additionalProperties": false, "title": "CustomFieldReferenceType", "type": "object", "properties": { "name": {"enum": ["Reference"]}, - "referenceTypeId": {"$ref": "ReferenceTypeIdEnum.schema.json"} + "referenceTypeId": {"$ref": "CustomFieldReferenceValueEnum.schema.json"} }, "required": [ "name", "referenceTypeId" ], - "$id": "https://example.com/CustomFieldReferenceType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldReferenceType.schema.json" } diff --git a/json-schemas/CustomFieldReferenceValueEnum.schema.json b/json-schemas/CustomFieldReferenceValueEnum.schema.json new file mode 100644 index 00000000..b6f3e19c --- /dev/null +++ b/json-schemas/CustomFieldReferenceValueEnum.schema.json @@ -0,0 +1,21 @@ +{ + "description": "Defines which resource type a [CustomFieldReferenceType](ctp:api:type:CustomFieldReferenceType) can reference.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "CustomFieldReferenceValue", + "type": "string", + "enum": [ + "cart", + "category", + "channel", + "customer", + "key-value-document", + "order", + "product", + "product-type", + "review", + "state", + "shipping-method", + "zone" + ], + "$id": "https://api.commercetools.com/CustomFieldReferenceValueEnum.schema.json" +} diff --git a/json-schemas/CustomFieldSetType.schema.json b/json-schemas/CustomFieldSetType.schema.json index da737127..db84697f 100644 --- a/json-schemas/CustomFieldSetType.schema.json +++ b/json-schemas/CustomFieldSetType.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Values of a SetType Custom Field are sets of values of the specified `elementType` (without duplicate elements).", "additionalProperties": false, "title": "CustomFieldSetType", "type": "object", @@ -11,5 +12,5 @@ "name", "elementType" ], - "$id": "https://example.com/CustomFieldSetType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldSetType.schema.json" } diff --git a/json-schemas/CustomFieldStringType.schema.json b/json-schemas/CustomFieldStringType.schema.json index a69c39a5..9a3c0196 100644 --- a/json-schemas/CustomFieldStringType.schema.json +++ b/json-schemas/CustomFieldStringType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for string values.", "additionalProperties": false, "title": "CustomFieldStringType", "type": "object", "properties": {"name": {"enum": ["String"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldStringType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldStringType.schema.json" } diff --git a/json-schemas/CustomFieldTimeType.schema.json b/json-schemas/CustomFieldTimeType.schema.json index a8dac169..31f05d0d 100644 --- a/json-schemas/CustomFieldTimeType.schema.json +++ b/json-schemas/CustomFieldTimeType.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Field type for [Time](ctp:api:type:Time) values.", "additionalProperties": false, "title": "CustomFieldTimeType", "type": "object", "properties": {"name": {"enum": ["Time"]}}, "required": ["name"], - "$id": "https://example.com/CustomFieldTimeType.schema.json" + "$id": "https://api.commercetools.com/CustomFieldTimeType.schema.json" } diff --git a/json-schemas/CustomFields.schema.json b/json-schemas/CustomFields.schema.json index 0ee4603e..374b4f06 100644 --- a/json-schemas/CustomFields.schema.json +++ b/json-schemas/CustomFields.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Serves as value of the `custom` field on a resource or data type customized with a [Type](ctp:api:type:Type).", "additionalProperties": false, "title": "CustomFields", "type": "object", @@ -11,5 +12,5 @@ "type", "fields" ], - "$id": "https://example.com/CustomFields.schema.json" + "$id": "https://api.commercetools.com/CustomFields.schema.json" } diff --git a/json-schemas/CustomFieldsDraft.schema.json b/json-schemas/CustomFieldsDraft.schema.json index 985dddfb..e287d799 100644 --- a/json-schemas/CustomFieldsDraft.schema.json +++ b/json-schemas/CustomFieldsDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "The representation used when creating or updating a [customizable data type](/../api/projects/types#list-of-customizable-data-types) with Custom Fields.", "additionalProperties": false, "title": "CustomFieldsDraft", "type": "object", @@ -8,5 +9,5 @@ "fields": {"$ref": "FieldContainer.schema.json"} }, "required": ["type"], - "$id": "https://example.com/CustomFieldsDraft.schema.json" + "$id": "https://api.commercetools.com/CustomFieldsDraft.schema.json" } diff --git a/json-schemas/CustomLineItem.schema.json b/json-schemas/CustomLineItem.schema.json index 084e3e8c..19116ee0 100644 --- a/json-schemas/CustomLineItem.schema.json +++ b/json-schemas/CustomLineItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItem", "type": "object", @@ -34,5 +34,5 @@ "state", "discountedPricePerQuantity" ], - "$id": "https://example.com/CustomLineItem.schema.json" + "$id": "https://api.commercetools.com/CustomLineItem.schema.json" } diff --git a/json-schemas/CustomLineItemDraft.schema.json b/json-schemas/CustomLineItemDraft.schema.json index 9548739c..8b00ad3e 100644 --- a/json-schemas/CustomLineItemDraft.schema.json +++ b/json-schemas/CustomLineItemDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItemDraft", "type": "object", @@ -19,5 +19,5 @@ "money", "slug" ], - "$id": "https://example.com/CustomLineItemDraft.schema.json" + "$id": "https://api.commercetools.com/CustomLineItemDraft.schema.json" } diff --git a/json-schemas/CustomLineItemImportDraft.schema.json b/json-schemas/CustomLineItemImportDraft.schema.json index 7fc01d41..2e45a1dc 100644 --- a/json-schemas/CustomLineItemImportDraft.schema.json +++ b/json-schemas/CustomLineItemImportDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItemImportDraft", "type": "object", @@ -23,5 +23,5 @@ "money", "slug" ], - "$id": "https://example.com/CustomLineItemImportDraft.schema.json" + "$id": "https://api.commercetools.com/CustomLineItemImportDraft.schema.json" } diff --git a/json-schemas/CustomLineItemReturnItem.schema.json b/json-schemas/CustomLineItemReturnItem.schema.json index ef4a5cc2..5d205831 100644 --- a/json-schemas/CustomLineItemReturnItem.schema.json +++ b/json-schemas/CustomLineItemReturnItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItemReturnItem", "type": "object", @@ -15,6 +15,7 @@ "type": "string", "format": "date-time" }, + "custom": {"$ref": "CustomFields.schema.json"}, "comment": {"type": "string"}, "id": {"type": "string"}, "type": {"enum": ["CustomLineItemReturnItem"]}, @@ -30,5 +31,5 @@ "createdAt", "customLineItemId" ], - "$id": "https://example.com/CustomLineItemReturnItem.schema.json" + "$id": "https://api.commercetools.com/CustomLineItemReturnItem.schema.json" } diff --git a/json-schemas/CustomLineItemStateTransitionMessage.schema.json b/json-schemas/CustomLineItemStateTransitionMessage.schema.json index c30c8591..6d2533ab 100644 --- a/json-schemas/CustomLineItemStateTransitionMessage.schema.json +++ b/json-schemas/CustomLineItemStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItemStateTransitionMessage", "type": "object", @@ -45,5 +45,5 @@ "fromState", "toState" ], - "$id": "https://example.com/CustomLineItemStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/CustomLineItemStateTransitionMessage.schema.json" } diff --git a/json-schemas/CustomLineItemStateTransitionMessagePayload.schema.json b/json-schemas/CustomLineItemStateTransitionMessagePayload.schema.json index c7396ad9..4932dd4f 100644 --- a/json-schemas/CustomLineItemStateTransitionMessagePayload.schema.json +++ b/json-schemas/CustomLineItemStateTransitionMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomLineItemStateTransitionMessagePayload", "type": "object", @@ -22,5 +22,5 @@ "fromState", "toState" ], - "$id": "https://example.com/CustomLineItemStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomLineItemStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/CustomObject.schema.json b/json-schemas/CustomObject.schema.json index 7e9e2101..dcd5cfd8 100644 --- a/json-schemas/CustomObject.schema.json +++ b/json-schemas/CustomObject.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomObject", "type": "object", @@ -36,5 +36,5 @@ "key", "value" ], - "$id": "https://example.com/CustomObject.schema.json" + "$id": "https://api.commercetools.com/CustomObject.schema.json" } diff --git a/json-schemas/CustomObjectDraft.schema.json b/json-schemas/CustomObjectDraft.schema.json index c98d6578..7763b805 100644 --- a/json-schemas/CustomObjectDraft.schema.json +++ b/json-schemas/CustomObjectDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomObjectDraft", "type": "object", @@ -21,5 +21,5 @@ "key", "value" ], - "$id": "https://example.com/CustomObjectDraft.schema.json" + "$id": "https://api.commercetools.com/CustomObjectDraft.schema.json" } diff --git a/json-schemas/CustomObjectPagedQueryResponse.schema.json b/json-schemas/CustomObjectPagedQueryResponse.schema.json index 192d766a..5791109d 100644 --- a/json-schemas/CustomObjectPagedQueryResponse.schema.json +++ b/json-schemas/CustomObjectPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [CustomObject](ctp:api:type:CustomObject).", "additionalProperties": false, "title": "CustomObjectPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/CustomObjectPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CustomObjectPagedQueryResponse.schema.json" } diff --git a/json-schemas/CustomObjectReference.schema.json b/json-schemas/CustomObjectReference.schema.json index a6c00300..1d991c09 100644 --- a/json-schemas/CustomObjectReference.schema.json +++ b/json-schemas/CustomObjectReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [CustomObject](ctp:api:type:CustomObject).", "additionalProperties": false, "title": "CustomObjectReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CustomObjectReference.schema.json" + "$id": "https://api.commercetools.com/CustomObjectReference.schema.json" } diff --git a/json-schemas/CustomTokenizer.schema.json b/json-schemas/CustomTokenizer.schema.json index 9c8a4a71..53873d22 100644 --- a/json-schemas/CustomTokenizer.schema.json +++ b/json-schemas/CustomTokenizer.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomTokenizer", "type": "object", @@ -14,5 +14,5 @@ "type", "inputs" ], - "$id": "https://example.com/CustomTokenizer.schema.json" + "$id": "https://api.commercetools.com/CustomTokenizer.schema.json" } diff --git a/json-schemas/Customer.schema.json b/json-schemas/Customer.schema.json index e167408a..6238ec60 100644 --- a/json-schemas/Customer.schema.json +++ b/json-schemas/Customer.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Customer", "type": "object", @@ -28,6 +28,7 @@ }, "password": {"type": "string"}, "id": {"type": "string"}, + "authenticationMode": {"$ref": "AuthenticationModeEnum.schema.json"}, "email": {"type": "string"}, "key": {"type": "string"}, "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, @@ -65,9 +66,8 @@ "createdAt", "lastModifiedAt", "email", - "password", "addresses", "isEmailVerified" ], - "$id": "https://example.com/Customer.schema.json" + "$id": "https://api.commercetools.com/Customer.schema.json" } diff --git a/json-schemas/CustomerAddAddressAction.schema.json b/json-schemas/CustomerAddAddressAction.schema.json index f731682f..90870900 100644 --- a/json-schemas/CustomerAddAddressAction.schema.json +++ b/json-schemas/CustomerAddAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddAddressAction", "type": "object", "properties": { "action": {"enum": ["addAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/CustomerAddAddressAction.schema.json" + "$id": "https://api.commercetools.com/CustomerAddAddressAction.schema.json" } diff --git a/json-schemas/CustomerAddBillingAddressIdAction.schema.json b/json-schemas/CustomerAddBillingAddressIdAction.schema.json index 84fe28f7..38a89ac5 100644 --- a/json-schemas/CustomerAddBillingAddressIdAction.schema.json +++ b/json-schemas/CustomerAddBillingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddBillingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerAddBillingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerAddBillingAddressIdAction.schema.json" } diff --git a/json-schemas/CustomerAddShippingAddressIdAction.schema.json b/json-schemas/CustomerAddShippingAddressIdAction.schema.json index 44b87cdf..2623854c 100644 --- a/json-schemas/CustomerAddShippingAddressIdAction.schema.json +++ b/json-schemas/CustomerAddShippingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddShippingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerAddShippingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerAddShippingAddressIdAction.schema.json" } diff --git a/json-schemas/CustomerAddStoreAction.schema.json b/json-schemas/CustomerAddStoreAction.schema.json index c76a94d7..2e5793d4 100644 --- a/json-schemas/CustomerAddStoreAction.schema.json +++ b/json-schemas/CustomerAddStoreAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddStoreAction", "type": "object", @@ -11,5 +11,5 @@ "action", "store" ], - "$id": "https://example.com/CustomerAddStoreAction.schema.json" + "$id": "https://api.commercetools.com/CustomerAddStoreAction.schema.json" } diff --git a/json-schemas/CustomerAddressAddedMessage.schema.json b/json-schemas/CustomerAddressAddedMessage.schema.json index 042f5ba6..54757b8b 100644 --- a/json-schemas/CustomerAddressAddedMessage.schema.json +++ b/json-schemas/CustomerAddressAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressAddedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressAddedMessage.schema.json" } diff --git a/json-schemas/CustomerAddressAddedMessagePayload.schema.json b/json-schemas/CustomerAddressAddedMessagePayload.schema.json index b19d9d9e..a7bc5d13 100644 --- a/json-schemas/CustomerAddressAddedMessagePayload.schema.json +++ b/json-schemas/CustomerAddressAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressAddedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerAddressChangedMessage.schema.json b/json-schemas/CustomerAddressChangedMessage.schema.json index f7002cd8..dc302fb8 100644 --- a/json-schemas/CustomerAddressChangedMessage.schema.json +++ b/json-schemas/CustomerAddressChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressChangedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressChangedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressChangedMessage.schema.json" } diff --git a/json-schemas/CustomerAddressChangedMessagePayload.schema.json b/json-schemas/CustomerAddressChangedMessagePayload.schema.json index a4831db7..60ffcb48 100644 --- a/json-schemas/CustomerAddressChangedMessagePayload.schema.json +++ b/json-schemas/CustomerAddressChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressChangedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressChangedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerAddressRemovedMessage.schema.json b/json-schemas/CustomerAddressRemovedMessage.schema.json index 1dbfc8e0..be884677 100644 --- a/json-schemas/CustomerAddressRemovedMessage.schema.json +++ b/json-schemas/CustomerAddressRemovedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressRemovedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressRemovedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressRemovedMessage.schema.json" } diff --git a/json-schemas/CustomerAddressRemovedMessagePayload.schema.json b/json-schemas/CustomerAddressRemovedMessagePayload.schema.json index 6f3d1b3d..927e13b4 100644 --- a/json-schemas/CustomerAddressRemovedMessagePayload.schema.json +++ b/json-schemas/CustomerAddressRemovedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerAddressRemovedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "address" ], - "$id": "https://example.com/CustomerAddressRemovedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerAddressRemovedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerChangeAddressAction.schema.json b/json-schemas/CustomerChangeAddressAction.schema.json index 2f8a2583..c4b2f0dd 100644 --- a/json-schemas/CustomerChangeAddressAction.schema.json +++ b/json-schemas/CustomerChangeAddressAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerChangeAddressAction", "type": "object", "properties": { "action": {"enum": ["changeAddress"]}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "addressKey": {"type": "string"}, "addressId": {"type": "string"} }, @@ -13,5 +13,5 @@ "action", "address" ], - "$id": "https://example.com/CustomerChangeAddressAction.schema.json" + "$id": "https://api.commercetools.com/CustomerChangeAddressAction.schema.json" } diff --git a/json-schemas/CustomerChangeEmailAction.schema.json b/json-schemas/CustomerChangeEmailAction.schema.json index 8c365ea1..4f1d1561 100644 --- a/json-schemas/CustomerChangeEmailAction.schema.json +++ b/json-schemas/CustomerChangeEmailAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerChangeEmailAction", "type": "object", @@ -11,5 +11,5 @@ "action", "email" ], - "$id": "https://example.com/CustomerChangeEmailAction.schema.json" + "$id": "https://api.commercetools.com/CustomerChangeEmailAction.schema.json" } diff --git a/json-schemas/CustomerChangePassword.schema.json b/json-schemas/CustomerChangePassword.schema.json index 0f4b4244..1aaf84e1 100644 --- a/json-schemas/CustomerChangePassword.schema.json +++ b/json-schemas/CustomerChangePassword.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerChangePassword", "type": "object", @@ -15,5 +15,5 @@ "currentPassword", "newPassword" ], - "$id": "https://example.com/CustomerChangePassword.schema.json" + "$id": "https://api.commercetools.com/CustomerChangePassword.schema.json" } diff --git a/json-schemas/CustomerCompanyNameSetMessage.schema.json b/json-schemas/CustomerCompanyNameSetMessage.schema.json index 5a4d480d..2a6e7817 100644 --- a/json-schemas/CustomerCompanyNameSetMessage.schema.json +++ b/json-schemas/CustomerCompanyNameSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCompanyNameSetMessage", "type": "object", @@ -31,8 +31,7 @@ "sequenceNumber", "resource", "resourceVersion", - "type", - "companyName" + "type" ], - "$id": "https://example.com/CustomerCompanyNameSetMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerCompanyNameSetMessage.schema.json" } diff --git a/json-schemas/CustomerCompanyNameSetMessagePayload.schema.json b/json-schemas/CustomerCompanyNameSetMessagePayload.schema.json index 82998aa8..839a2bfa 100644 --- a/json-schemas/CustomerCompanyNameSetMessagePayload.schema.json +++ b/json-schemas/CustomerCompanyNameSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCompanyNameSetMessagePayload", "type": "object", @@ -7,9 +7,6 @@ "type": {"enum": ["CustomerCompanyNameSet"]}, "companyName": {"type": "string"} }, - "required": [ - "type", - "companyName" - ], - "$id": "https://example.com/CustomerCompanyNameSetMessagePayload.schema.json" + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerCompanyNameSetMessagePayload.schema.json" } diff --git a/json-schemas/CustomerCreateEmailToken.schema.json b/json-schemas/CustomerCreateEmailToken.schema.json index d87ad857..b7eacf2f 100644 --- a/json-schemas/CustomerCreateEmailToken.schema.json +++ b/json-schemas/CustomerCreateEmailToken.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCreateEmailToken", "type": "object", @@ -12,5 +12,5 @@ "id", "ttlMinutes" ], - "$id": "https://example.com/CustomerCreateEmailToken.schema.json" + "$id": "https://api.commercetools.com/CustomerCreateEmailToken.schema.json" } diff --git a/json-schemas/CustomerCreatePasswordResetToken.schema.json b/json-schemas/CustomerCreatePasswordResetToken.schema.json index 544d0f28..ed920013 100644 --- a/json-schemas/CustomerCreatePasswordResetToken.schema.json +++ b/json-schemas/CustomerCreatePasswordResetToken.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCreatePasswordResetToken", "type": "object", @@ -8,5 +8,5 @@ "email": {"type": "string"} }, "required": ["email"], - "$id": "https://example.com/CustomerCreatePasswordResetToken.schema.json" + "$id": "https://api.commercetools.com/CustomerCreatePasswordResetToken.schema.json" } diff --git a/json-schemas/CustomerCreatedMessage.schema.json b/json-schemas/CustomerCreatedMessage.schema.json index 09e4e779..e0267bff 100644 --- a/json-schemas/CustomerCreatedMessage.schema.json +++ b/json-schemas/CustomerCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "customer" ], - "$id": "https://example.com/CustomerCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerCreatedMessage.schema.json" } diff --git a/json-schemas/CustomerCreatedMessagePayload.schema.json b/json-schemas/CustomerCreatedMessagePayload.schema.json index 72dda150..617b0540 100644 --- a/json-schemas/CustomerCreatedMessagePayload.schema.json +++ b/json-schemas/CustomerCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "customer" ], - "$id": "https://example.com/CustomerCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerCreatedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerDateOfBirthSetMessage.schema.json b/json-schemas/CustomerDateOfBirthSetMessage.schema.json index cd22a3db..acfa907d 100644 --- a/json-schemas/CustomerDateOfBirthSetMessage.schema.json +++ b/json-schemas/CustomerDateOfBirthSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerDateOfBirthSetMessage", "type": "object", @@ -38,8 +38,7 @@ "sequenceNumber", "resource", "resourceVersion", - "type", - "dateOfBirth" + "type" ], - "$id": "https://example.com/CustomerDateOfBirthSetMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerDateOfBirthSetMessage.schema.json" } diff --git a/json-schemas/CustomerDateOfBirthSetMessagePayload.schema.json b/json-schemas/CustomerDateOfBirthSetMessagePayload.schema.json index 7181bafc..bfd873b7 100644 --- a/json-schemas/CustomerDateOfBirthSetMessagePayload.schema.json +++ b/json-schemas/CustomerDateOfBirthSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerDateOfBirthSetMessagePayload", "type": "object", @@ -14,9 +14,6 @@ "null" ]} }, - "required": [ - "type", - "dateOfBirth" - ], - "$id": "https://example.com/CustomerDateOfBirthSetMessagePayload.schema.json" + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerDateOfBirthSetMessagePayload.schema.json" } diff --git a/json-schemas/CustomerDeletedMessage.schema.json b/json-schemas/CustomerDeletedMessage.schema.json new file mode 100644 index 00000000..e08956cf --- /dev/null +++ b/json-schemas/CustomerDeletedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["CustomerDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/CustomerDeletedMessage.schema.json" +} diff --git a/json-schemas/CustomerDeletedMessagePayload.schema.json b/json-schemas/CustomerDeletedMessagePayload.schema.json new file mode 100644 index 00000000..77c76961 --- /dev/null +++ b/json-schemas/CustomerDeletedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["CustomerDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/CustomerDraft.schema.json b/json-schemas/CustomerDraft.schema.json index 0306bcfb..46b05c05 100644 --- a/json-schemas/CustomerDraft.schema.json +++ b/json-schemas/CustomerDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerDraft", "type": "object", @@ -7,21 +7,19 @@ "lastName": {"type": "string"}, "addresses": { "type": "array", - "items": {"$ref": "Address.schema.json"} + "items": {"$ref": "BaseAddress.schema.json"} }, "companyName": {"type": "string"}, "vatId": {"type": "string"}, "billingAddresses": { "type": "array", - "items": { - "type": "number", - "format": "integer" - } + "items": {"type": "number"} }, "title": {"type": "string"}, "locale": {"type": "string"}, "isEmailVerified": {"type": "boolean"}, "password": {"type": "string"}, + "authenticationMode": {"$ref": "AuthenticationModeEnum.schema.json"}, "email": {"type": "string"}, "key": {"type": "string"}, "anonymousId": {"type": "string"}, @@ -50,15 +48,9 @@ "defaultBillingAddress": {"type": "number"}, "shippingAddresses": { "type": "array", - "items": { - "type": "number", - "format": "integer" - } + "items": {"type": "number"} } }, - "required": [ - "email", - "password" - ], - "$id": "https://example.com/CustomerDraft.schema.json" + "required": ["email"], + "$id": "https://api.commercetools.com/CustomerDraft.schema.json" } diff --git a/json-schemas/CustomerEmailChangedMessage.schema.json b/json-schemas/CustomerEmailChangedMessage.schema.json index a390bd2b..6582eb02 100644 --- a/json-schemas/CustomerEmailChangedMessage.schema.json +++ b/json-schemas/CustomerEmailChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerEmailChangedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "email" ], - "$id": "https://example.com/CustomerEmailChangedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerEmailChangedMessage.schema.json" } diff --git a/json-schemas/CustomerEmailChangedMessagePayload.schema.json b/json-schemas/CustomerEmailChangedMessagePayload.schema.json index dd7390de..8fe6c889 100644 --- a/json-schemas/CustomerEmailChangedMessagePayload.schema.json +++ b/json-schemas/CustomerEmailChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerEmailChangedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "email" ], - "$id": "https://example.com/CustomerEmailChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerEmailChangedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerEmailVerifiedMessage.schema.json b/json-schemas/CustomerEmailVerifiedMessage.schema.json index a39e5f32..4ba5a539 100644 --- a/json-schemas/CustomerEmailVerifiedMessage.schema.json +++ b/json-schemas/CustomerEmailVerifiedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerEmailVerifiedMessage", "type": "object", @@ -32,5 +32,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/CustomerEmailVerifiedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerEmailVerifiedMessage.schema.json" } diff --git a/json-schemas/CustomerEmailVerifiedMessagePayload.schema.json b/json-schemas/CustomerEmailVerifiedMessagePayload.schema.json index d254c310..e66d7853 100644 --- a/json-schemas/CustomerEmailVerifiedMessagePayload.schema.json +++ b/json-schemas/CustomerEmailVerifiedMessagePayload.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerEmailVerifiedMessagePayload", "type": "object", "properties": {"type": {"enum": ["CustomerEmailVerified"]}}, "required": ["type"], - "$id": "https://example.com/CustomerEmailVerifiedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerEmailVerifiedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerEmailVerify.schema.json b/json-schemas/CustomerEmailVerify.schema.json index 1982885c..ed19bdcb 100644 --- a/json-schemas/CustomerEmailVerify.schema.json +++ b/json-schemas/CustomerEmailVerify.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerEmailVerify", "type": "object", @@ -8,5 +8,5 @@ "tokenValue": {"type": "string"} }, "required": ["tokenValue"], - "$id": "https://example.com/CustomerEmailVerify.schema.json" + "$id": "https://api.commercetools.com/CustomerEmailVerify.schema.json" } diff --git a/json-schemas/CustomerFirstNameSetMessage.schema.json b/json-schemas/CustomerFirstNameSetMessage.schema.json new file mode 100644 index 00000000..7f6d1c49 --- /dev/null +++ b/json-schemas/CustomerFirstNameSetMessage.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerFirstNameSetMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "firstName": {"type": "string"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["CustomerFirstNameSet"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/CustomerFirstNameSetMessage.schema.json" +} diff --git a/json-schemas/CustomerFirstNameSetMessagePayload.schema.json b/json-schemas/CustomerFirstNameSetMessagePayload.schema.json new file mode 100644 index 00000000..8c7ccae5 --- /dev/null +++ b/json-schemas/CustomerFirstNameSetMessagePayload.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerFirstNameSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["CustomerFirstNameSet"]}, + "firstName": {"type": "string"} + }, + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerFirstNameSetMessagePayload.schema.json" +} diff --git a/json-schemas/CustomerGroup.schema.json b/json-schemas/CustomerGroup.schema.json index f08da65f..c13205c8 100644 --- a/json-schemas/CustomerGroup.schema.json +++ b/json-schemas/CustomerGroup.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "", "additionalProperties": false, "title": "CustomerGroup", "type": "object", @@ -27,5 +28,5 @@ "lastModifiedAt", "name" ], - "$id": "https://example.com/CustomerGroup.schema.json" + "$id": "https://api.commercetools.com/CustomerGroup.schema.json" } diff --git a/json-schemas/CustomerGroupChangeNameAction.schema.json b/json-schemas/CustomerGroupChangeNameAction.schema.json index 3b469ae6..bf6dfdff 100644 --- a/json-schemas/CustomerGroupChangeNameAction.schema.json +++ b/json-schemas/CustomerGroupChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/CustomerGroupChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupChangeNameAction.schema.json" } diff --git a/json-schemas/CustomerGroupDraft.schema.json b/json-schemas/CustomerGroupDraft.schema.json index d3444fcb..468364e4 100644 --- a/json-schemas/CustomerGroupDraft.schema.json +++ b/json-schemas/CustomerGroupDraft.schema.json @@ -1,13 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupDraft", "type": "object", "properties": { "key": {"type": "string"}, "groupName": {"type": "string"}, - "custom": {"$ref": "CustomFields.schema.json"} + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["groupName"], - "$id": "https://example.com/CustomerGroupDraft.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupDraft.schema.json" } diff --git a/json-schemas/CustomerGroupPagedQueryResponse.schema.json b/json-schemas/CustomerGroupPagedQueryResponse.schema.json index 0c169881..a028e4d0 100644 --- a/json-schemas/CustomerGroupPagedQueryResponse.schema.json +++ b/json-schemas/CustomerGroupPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) with `results` containing an array of [CustomerGroup](ctp:api:type:CustomerGroup).", "additionalProperties": false, "title": "CustomerGroupPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/CustomerGroupPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupPagedQueryResponse.schema.json" } diff --git a/json-schemas/CustomerGroupReference.schema.json b/json-schemas/CustomerGroupReference.schema.json index 47de5c51..8911b49a 100644 --- a/json-schemas/CustomerGroupReference.schema.json +++ b/json-schemas/CustomerGroupReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup).", "additionalProperties": false, "title": "CustomerGroupReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CustomerGroupReference.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupReference.schema.json" } diff --git a/json-schemas/CustomerGroupResourceIdentifier.schema.json b/json-schemas/CustomerGroupResourceIdentifier.schema.json index 635f1c4f..9af36237 100644 --- a/json-schemas/CustomerGroupResourceIdentifier.schema.json +++ b/json-schemas/CustomerGroupResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CustomerGroupResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/CustomerGroupResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/CustomerGroupResourceIdentifier.schema.json" } diff --git a/json-schemas/CustomerGroupSetCustomFieldAction.schema.json b/json-schemas/CustomerGroupSetCustomFieldAction.schema.json index 2acbafb3..659106f0 100644 --- a/json-schemas/CustomerGroupSetCustomFieldAction.schema.json +++ b/json-schemas/CustomerGroupSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CustomerGroupSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupSetCustomFieldAction.schema.json" } diff --git a/json-schemas/CustomerGroupSetCustomTypeAction.schema.json b/json-schemas/CustomerGroupSetCustomTypeAction.schema.json index e8833a5f..adc75509 100644 --- a/json-schemas/CustomerGroupSetCustomTypeAction.schema.json +++ b/json-schemas/CustomerGroupSetCustomTypeAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This action sets or removes the custom type for an existing CustomerGroup.\nIf present, this action overwrites any existing [custom](/../api/projects/custom-fields) type and fields.", "additionalProperties": false, "title": "CustomerGroupSetCustomTypeAction", "type": "object", @@ -9,5 +10,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CustomerGroupSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupSetCustomTypeAction.schema.json" } diff --git a/json-schemas/CustomerGroupSetKeyAction.schema.json b/json-schemas/CustomerGroupSetKeyAction.schema.json index d3ae9c92..02d08ae0 100644 --- a/json-schemas/CustomerGroupSetKeyAction.schema.json +++ b/json-schemas/CustomerGroupSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerGroupSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupSetKeyAction.schema.json" } diff --git a/json-schemas/CustomerGroupSetMessage.schema.json b/json-schemas/CustomerGroupSetMessage.schema.json index 0791ebc4..986679ee 100644 --- a/json-schemas/CustomerGroupSetMessage.schema.json +++ b/json-schemas/CustomerGroupSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupSetMessage", "type": "object", @@ -31,8 +31,7 @@ "sequenceNumber", "resource", "resourceVersion", - "type", - "customerGroup" + "type" ], - "$id": "https://example.com/CustomerGroupSetMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupSetMessage.schema.json" } diff --git a/json-schemas/CustomerGroupSetMessagePayload.schema.json b/json-schemas/CustomerGroupSetMessagePayload.schema.json index ac815095..6d1e132f 100644 --- a/json-schemas/CustomerGroupSetMessagePayload.schema.json +++ b/json-schemas/CustomerGroupSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupSetMessagePayload", "type": "object", @@ -7,9 +7,6 @@ "type": {"enum": ["CustomerGroupSet"]}, "customerGroup": {"$ref": "CustomerGroupReference.schema.json"} }, - "required": [ - "type", - "customerGroup" - ], - "$id": "https://example.com/CustomerGroupSetMessagePayload.schema.json" + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerGroupSetMessagePayload.schema.json" } diff --git a/json-schemas/CustomerGroupUpdate.schema.json b/json-schemas/CustomerGroupUpdate.schema.json index 28aee1d7..36d8c8ca 100644 --- a/json-schemas/CustomerGroupUpdate.schema.json +++ b/json-schemas/CustomerGroupUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/CustomerGroupUpdate.schema.json" + "$id": "https://api.commercetools.com/CustomerGroupUpdate.schema.json" } diff --git a/json-schemas/CustomerGroupUpdateAction.schema.json b/json-schemas/CustomerGroupUpdateAction.schema.json index 5fb58790..79877b9f 100644 --- a/json-schemas/CustomerGroupUpdateAction.schema.json +++ b/json-schemas/CustomerGroupUpdateAction.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/CustomerGroupChangeNameAction.schema.json"}, - {"$ref": "https://example.com/CustomerGroupSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CustomerGroupSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CustomerGroupSetKeyAction.schema.json"} + {"$ref": "https://api.commercetools.com/CustomerGroupChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupSetKeyAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerGroupUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeName", + "setCustomField", + "setCustomType", + "setKey" + ]}}, "required": ["action"], - "$id": "https://example.com/CustomerGroupUpdateAction.schema.json", + "$id": "https://api.commercetools.com/CustomerGroupUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/CustomerLastNameSetMessage.schema.json b/json-schemas/CustomerLastNameSetMessage.schema.json new file mode 100644 index 00000000..790ffd86 --- /dev/null +++ b/json-schemas/CustomerLastNameSetMessage.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerLastNameSetMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastName": {"type": "string"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["CustomerLastNameSet"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/CustomerLastNameSetMessage.schema.json" +} diff --git a/json-schemas/CustomerLastNameSetMessagePayload.schema.json b/json-schemas/CustomerLastNameSetMessagePayload.schema.json new file mode 100644 index 00000000..61d32bc2 --- /dev/null +++ b/json-schemas/CustomerLastNameSetMessagePayload.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerLastNameSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["CustomerLastNameSet"]}, + "lastName": {"type": "string"} + }, + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerLastNameSetMessagePayload.schema.json" +} diff --git a/json-schemas/CustomerPagedQueryResponse.schema.json b/json-schemas/CustomerPagedQueryResponse.schema.json index f589e2b2..a4423801 100644 --- a/json-schemas/CustomerPagedQueryResponse.schema.json +++ b/json-schemas/CustomerPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/CustomerPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/CustomerPagedQueryResponse.schema.json" } diff --git a/json-schemas/CustomerPasswordUpdatedMessage.schema.json b/json-schemas/CustomerPasswordUpdatedMessage.schema.json index fe886e5a..edb47032 100644 --- a/json-schemas/CustomerPasswordUpdatedMessage.schema.json +++ b/json-schemas/CustomerPasswordUpdatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerPasswordUpdatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "reset" ], - "$id": "https://example.com/CustomerPasswordUpdatedMessage.schema.json" + "$id": "https://api.commercetools.com/CustomerPasswordUpdatedMessage.schema.json" } diff --git a/json-schemas/CustomerPasswordUpdatedMessagePayload.schema.json b/json-schemas/CustomerPasswordUpdatedMessagePayload.schema.json index 709dc06a..0390ffe0 100644 --- a/json-schemas/CustomerPasswordUpdatedMessagePayload.schema.json +++ b/json-schemas/CustomerPasswordUpdatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerPasswordUpdatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "reset" ], - "$id": "https://example.com/CustomerPasswordUpdatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/CustomerPasswordUpdatedMessagePayload.schema.json" } diff --git a/json-schemas/CustomerReference.schema.json b/json-schemas/CustomerReference.schema.json index b7177e68..226cfeec 100644 --- a/json-schemas/CustomerReference.schema.json +++ b/json-schemas/CustomerReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer).", "additionalProperties": false, "title": "CustomerReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/CustomerReference.schema.json" + "$id": "https://api.commercetools.com/CustomerReference.schema.json" } diff --git a/json-schemas/CustomerRemoveAddressAction.schema.json b/json-schemas/CustomerRemoveAddressAction.schema.json index 7d6d30f3..45ca7d7d 100644 --- a/json-schemas/CustomerRemoveAddressAction.schema.json +++ b/json-schemas/CustomerRemoveAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerRemoveAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerRemoveAddressAction.schema.json" + "$id": "https://api.commercetools.com/CustomerRemoveAddressAction.schema.json" } diff --git a/json-schemas/CustomerRemoveBillingAddressIdAction.schema.json b/json-schemas/CustomerRemoveBillingAddressIdAction.schema.json index 034892d3..9941a0ad 100644 --- a/json-schemas/CustomerRemoveBillingAddressIdAction.schema.json +++ b/json-schemas/CustomerRemoveBillingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerRemoveBillingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerRemoveBillingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerRemoveBillingAddressIdAction.schema.json" } diff --git a/json-schemas/CustomerRemoveShippingAddressIdAction.schema.json b/json-schemas/CustomerRemoveShippingAddressIdAction.schema.json index f936a9bb..336a00ca 100644 --- a/json-schemas/CustomerRemoveShippingAddressIdAction.schema.json +++ b/json-schemas/CustomerRemoveShippingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerRemoveShippingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerRemoveShippingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerRemoveShippingAddressIdAction.schema.json" } diff --git a/json-schemas/CustomerRemoveStoreAction.schema.json b/json-schemas/CustomerRemoveStoreAction.schema.json index cb7702c1..ee441a25 100644 --- a/json-schemas/CustomerRemoveStoreAction.schema.json +++ b/json-schemas/CustomerRemoveStoreAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerRemoveStoreAction", "type": "object", @@ -11,5 +11,5 @@ "action", "store" ], - "$id": "https://example.com/CustomerRemoveStoreAction.schema.json" + "$id": "https://api.commercetools.com/CustomerRemoveStoreAction.schema.json" } diff --git a/json-schemas/CustomerResetPassword.schema.json b/json-schemas/CustomerResetPassword.schema.json index fc9c4ec8..4d677910 100644 --- a/json-schemas/CustomerResetPassword.schema.json +++ b/json-schemas/CustomerResetPassword.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerResetPassword", "type": "object", @@ -12,5 +12,5 @@ "tokenValue", "newPassword" ], - "$id": "https://example.com/CustomerResetPassword.schema.json" + "$id": "https://api.commercetools.com/CustomerResetPassword.schema.json" } diff --git a/json-schemas/CustomerResourceIdentifier.schema.json b/json-schemas/CustomerResourceIdentifier.schema.json index 84b27f6f..2573a477 100644 --- a/json-schemas/CustomerResourceIdentifier.schema.json +++ b/json-schemas/CustomerResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Customer](ctp:api:type:Customer).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "CustomerResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/CustomerResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/CustomerResourceIdentifier.schema.json" } diff --git a/json-schemas/CustomerSetAddressCustomFieldAction.schema.json b/json-schemas/CustomerSetAddressCustomFieldAction.schema.json index e69eba66..94703b54 100644 --- a/json-schemas/CustomerSetAddressCustomFieldAction.schema.json +++ b/json-schemas/CustomerSetAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetAddressCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "addressId", "name" ], - "$id": "https://example.com/CustomerSetAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/CustomerSetAddressCustomTypeAction.schema.json b/json-schemas/CustomerSetAddressCustomTypeAction.schema.json index 7cbb4f87..6d4f7df8 100644 --- a/json-schemas/CustomerSetAddressCustomTypeAction.schema.json +++ b/json-schemas/CustomerSetAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetAddressCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "addressId" ], - "$id": "https://example.com/CustomerSetAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/CustomerSetAuthenticationModeAction.schema.json b/json-schemas/CustomerSetAuthenticationModeAction.schema.json new file mode 100644 index 00000000..03697aee --- /dev/null +++ b/json-schemas/CustomerSetAuthenticationModeAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerSetAuthenticationModeAction", + "type": "object", + "properties": { + "authMode": {"$ref": "AuthenticationModeEnum.schema.json"}, + "action": {"enum": ["setAuthenticationMode"]}, + "password": {"type": "string"} + }, + "required": [ + "action", + "authMode" + ], + "$id": "https://api.commercetools.com/CustomerSetAuthenticationModeAction.schema.json" +} diff --git a/json-schemas/CustomerSetCompanyNameAction.schema.json b/json-schemas/CustomerSetCompanyNameAction.schema.json index 44c35a9e..9492ade7 100644 --- a/json-schemas/CustomerSetCompanyNameAction.schema.json +++ b/json-schemas/CustomerSetCompanyNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetCompanyNameAction", "type": "object", @@ -8,5 +8,5 @@ "companyName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetCompanyNameAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetCompanyNameAction.schema.json" } diff --git a/json-schemas/CustomerSetCustomFieldAction.schema.json b/json-schemas/CustomerSetCustomFieldAction.schema.json index aad45756..3fbe454d 100644 --- a/json-schemas/CustomerSetCustomFieldAction.schema.json +++ b/json-schemas/CustomerSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/CustomerSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetCustomFieldAction.schema.json" } diff --git a/json-schemas/CustomerSetCustomTypeAction.schema.json b/json-schemas/CustomerSetCustomTypeAction.schema.json index ce2abbeb..c4d9b3f8 100644 --- a/json-schemas/CustomerSetCustomTypeAction.schema.json +++ b/json-schemas/CustomerSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetCustomTypeAction.schema.json" } diff --git a/json-schemas/CustomerSetCustomerGroupAction.schema.json b/json-schemas/CustomerSetCustomerGroupAction.schema.json index 6cfc4bbd..65fd4a29 100644 --- a/json-schemas/CustomerSetCustomerGroupAction.schema.json +++ b/json-schemas/CustomerSetCustomerGroupAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetCustomerGroupAction", "type": "object", @@ -8,5 +8,5 @@ "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetCustomerGroupAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetCustomerGroupAction.schema.json" } diff --git a/json-schemas/CustomerSetCustomerNumberAction.schema.json b/json-schemas/CustomerSetCustomerNumberAction.schema.json index 088d0d71..09c9d530 100644 --- a/json-schemas/CustomerSetCustomerNumberAction.schema.json +++ b/json-schemas/CustomerSetCustomerNumberAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetCustomerNumberAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setCustomerNumber"]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetCustomerNumberAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetCustomerNumberAction.schema.json" } diff --git a/json-schemas/CustomerSetDateOfBirthAction.schema.json b/json-schemas/CustomerSetDateOfBirthAction.schema.json index 29409d71..af0bc8f1 100644 --- a/json-schemas/CustomerSetDateOfBirthAction.schema.json +++ b/json-schemas/CustomerSetDateOfBirthAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetDateOfBirthAction", "type": "object", @@ -15,5 +15,5 @@ ]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetDateOfBirthAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetDateOfBirthAction.schema.json" } diff --git a/json-schemas/CustomerSetDefaultBillingAddressAction.schema.json b/json-schemas/CustomerSetDefaultBillingAddressAction.schema.json index 1644fc04..93d809aa 100644 --- a/json-schemas/CustomerSetDefaultBillingAddressAction.schema.json +++ b/json-schemas/CustomerSetDefaultBillingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetDefaultBillingAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetDefaultBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetDefaultBillingAddressAction.schema.json" } diff --git a/json-schemas/CustomerSetDefaultShippingAddressAction.schema.json b/json-schemas/CustomerSetDefaultShippingAddressAction.schema.json index 5d205af7..a6b9f6c6 100644 --- a/json-schemas/CustomerSetDefaultShippingAddressAction.schema.json +++ b/json-schemas/CustomerSetDefaultShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetDefaultShippingAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetDefaultShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetDefaultShippingAddressAction.schema.json" } diff --git a/json-schemas/CustomerSetExternalIdAction.schema.json b/json-schemas/CustomerSetExternalIdAction.schema.json index 3ccfe7ff..59ba700e 100644 --- a/json-schemas/CustomerSetExternalIdAction.schema.json +++ b/json-schemas/CustomerSetExternalIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetExternalIdAction", "type": "object", @@ -8,5 +8,5 @@ "externalId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetExternalIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetExternalIdAction.schema.json" } diff --git a/json-schemas/CustomerSetFirstNameAction.schema.json b/json-schemas/CustomerSetFirstNameAction.schema.json index 1a13b689..4d1fa2b6 100644 --- a/json-schemas/CustomerSetFirstNameAction.schema.json +++ b/json-schemas/CustomerSetFirstNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetFirstNameAction", "type": "object", @@ -8,5 +8,5 @@ "firstName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetFirstNameAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetFirstNameAction.schema.json" } diff --git a/json-schemas/CustomerSetKeyAction.schema.json b/json-schemas/CustomerSetKeyAction.schema.json index f3474e9c..437b9697 100644 --- a/json-schemas/CustomerSetKeyAction.schema.json +++ b/json-schemas/CustomerSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetKeyAction.schema.json" } diff --git a/json-schemas/CustomerSetLastNameAction.schema.json b/json-schemas/CustomerSetLastNameAction.schema.json index 3f6733d8..a20bcfce 100644 --- a/json-schemas/CustomerSetLastNameAction.schema.json +++ b/json-schemas/CustomerSetLastNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetLastNameAction", "type": "object", @@ -8,5 +8,5 @@ "lastName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetLastNameAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetLastNameAction.schema.json" } diff --git a/json-schemas/CustomerSetLocaleAction.schema.json b/json-schemas/CustomerSetLocaleAction.schema.json index 58ceaa61..29a31fce 100644 --- a/json-schemas/CustomerSetLocaleAction.schema.json +++ b/json-schemas/CustomerSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetLocaleAction.schema.json" } diff --git a/json-schemas/CustomerSetMiddleNameAction.schema.json b/json-schemas/CustomerSetMiddleNameAction.schema.json index aea1a641..7f6b9030 100644 --- a/json-schemas/CustomerSetMiddleNameAction.schema.json +++ b/json-schemas/CustomerSetMiddleNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetMiddleNameAction", "type": "object", @@ -8,5 +8,5 @@ "middleName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetMiddleNameAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetMiddleNameAction.schema.json" } diff --git a/json-schemas/CustomerSetSalutationAction.schema.json b/json-schemas/CustomerSetSalutationAction.schema.json index 1c8f2709..1cfcfa55 100644 --- a/json-schemas/CustomerSetSalutationAction.schema.json +++ b/json-schemas/CustomerSetSalutationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetSalutationAction", "type": "object", @@ -8,5 +8,5 @@ "salutation": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/CustomerSetSalutationAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetSalutationAction.schema.json" } diff --git a/json-schemas/CustomerSetStoresAction.schema.json b/json-schemas/CustomerSetStoresAction.schema.json index 262a13bb..315e3b8a 100644 --- a/json-schemas/CustomerSetStoresAction.schema.json +++ b/json-schemas/CustomerSetStoresAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetStoresAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/CustomerSetStoresAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetStoresAction.schema.json" } diff --git a/json-schemas/CustomerSetTitleAction.schema.json b/json-schemas/CustomerSetTitleAction.schema.json index deaecc10..d52e8d53 100644 --- a/json-schemas/CustomerSetTitleAction.schema.json +++ b/json-schemas/CustomerSetTitleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetTitleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setTitle"]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetTitleAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetTitleAction.schema.json" } diff --git a/json-schemas/CustomerSetVatIdAction.schema.json b/json-schemas/CustomerSetVatIdAction.schema.json index 611944e5..7b56fdfd 100644 --- a/json-schemas/CustomerSetVatIdAction.schema.json +++ b/json-schemas/CustomerSetVatIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSetVatIdAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setVatId"]} }, "required": ["action"], - "$id": "https://example.com/CustomerSetVatIdAction.schema.json" + "$id": "https://api.commercetools.com/CustomerSetVatIdAction.schema.json" } diff --git a/json-schemas/CustomerSignInResult.schema.json b/json-schemas/CustomerSignInResult.schema.json index fbbb02c5..cc99bc1e 100644 --- a/json-schemas/CustomerSignInResult.schema.json +++ b/json-schemas/CustomerSignInResult.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSignInResult", "type": "object", @@ -8,5 +8,5 @@ "customer": {"$ref": "Customer.schema.json"} }, "required": ["customer"], - "$id": "https://example.com/CustomerSignInResult.schema.json" + "$id": "https://api.commercetools.com/CustomerSignInResult.schema.json" } diff --git a/json-schemas/CustomerSignin.schema.json b/json-schemas/CustomerSignin.schema.json index 4d10e04b..21d7ba09 100644 --- a/json-schemas/CustomerSignin.schema.json +++ b/json-schemas/CustomerSignin.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerSignin", "type": "object", @@ -16,5 +16,5 @@ "email", "password" ], - "$id": "https://example.com/CustomerSignin.schema.json" + "$id": "https://api.commercetools.com/CustomerSignin.schema.json" } diff --git a/json-schemas/CustomerTitleSetMessage.schema.json b/json-schemas/CustomerTitleSetMessage.schema.json new file mode 100644 index 00000000..27f0f1a7 --- /dev/null +++ b/json-schemas/CustomerTitleSetMessage.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerTitleSetMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["CustomerTitleSet"]}, + "title": {"type": "string"}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/CustomerTitleSetMessage.schema.json" +} diff --git a/json-schemas/CustomerTitleSetMessagePayload.schema.json b/json-schemas/CustomerTitleSetMessagePayload.schema.json new file mode 100644 index 00000000..e314bd04 --- /dev/null +++ b/json-schemas/CustomerTitleSetMessagePayload.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "CustomerTitleSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["CustomerTitleSet"]}, + "title": {"type": "string"} + }, + "required": ["type"], + "$id": "https://api.commercetools.com/CustomerTitleSetMessagePayload.schema.json" +} diff --git a/json-schemas/CustomerToken.schema.json b/json-schemas/CustomerToken.schema.json index 4ec20376..fce3a353 100644 --- a/json-schemas/CustomerToken.schema.json +++ b/json-schemas/CustomerToken.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerToken", "type": "object", @@ -27,5 +27,5 @@ "expiresAt", "value" ], - "$id": "https://example.com/CustomerToken.schema.json" + "$id": "https://api.commercetools.com/CustomerToken.schema.json" } diff --git a/json-schemas/CustomerUpdate.schema.json b/json-schemas/CustomerUpdate.schema.json index b2b96b3e..07590df5 100644 --- a/json-schemas/CustomerUpdate.schema.json +++ b/json-schemas/CustomerUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/CustomerUpdate.schema.json" + "$id": "https://api.commercetools.com/CustomerUpdate.schema.json" } diff --git a/json-schemas/CustomerUpdateAction.schema.json b/json-schemas/CustomerUpdateAction.schema.json index 56954f6a..5bcfb9f9 100644 --- a/json-schemas/CustomerUpdateAction.schema.json +++ b/json-schemas/CustomerUpdateAction.schema.json @@ -1,42 +1,75 @@ { "oneOf": [ - {"$ref": "https://example.com/CustomerAddAddressAction.schema.json"}, - {"$ref": "https://example.com/CustomerAddBillingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/CustomerAddShippingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/CustomerAddStoreAction.schema.json"}, - {"$ref": "https://example.com/CustomerChangeAddressAction.schema.json"}, - {"$ref": "https://example.com/CustomerChangeEmailAction.schema.json"}, - {"$ref": "https://example.com/CustomerRemoveAddressAction.schema.json"}, - {"$ref": "https://example.com/CustomerRemoveBillingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/CustomerRemoveShippingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/CustomerRemoveStoreAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetCompanyNameAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetCustomerGroupAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetCustomerNumberAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetDateOfBirthAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetDefaultBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetDefaultShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetExternalIdAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetFirstNameAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetKeyAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetLastNameAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetMiddleNameAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetSalutationAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetStoresAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetTitleAction.schema.json"}, - {"$ref": "https://example.com/CustomerSetVatIdAction.schema.json"} + {"$ref": "https://api.commercetools.com/CustomerAddAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddBillingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddShippingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddStoreAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerChangeAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerChangeEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerRemoveAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerRemoveBillingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerRemoveShippingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerRemoveStoreAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetAuthenticationModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetCompanyNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetCustomerGroupAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetCustomerNumberAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetDateOfBirthAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetDefaultBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetDefaultShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetExternalIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetFirstNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetLastNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetMiddleNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetSalutationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetStoresAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetTitleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerSetVatIdAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "CustomerUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addAddress", + "addBillingAddressId", + "addShippingAddressId", + "addStore", + "changeAddress", + "changeEmail", + "removeAddress", + "removeBillingAddressId", + "removeShippingAddressId", + "removeStore", + "setAddressCustomField", + "setAddressCustomType", + "setAuthenticationMode", + "setCompanyName", + "setCustomField", + "setCustomType", + "setCustomerGroup", + "setCustomerNumber", + "setDateOfBirth", + "setDefaultBillingAddress", + "setDefaultShippingAddress", + "setExternalId", + "setFirstName", + "setKey", + "setLastName", + "setLocale", + "setMiddleName", + "setSalutation", + "setStores", + "setTitle", + "setVatId" + ]}}, "required": ["action"], - "$id": "https://example.com/CustomerUpdateAction.schema.json", + "$id": "https://api.commercetools.com/CustomerUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/Delivery.schema.json b/json-schemas/Delivery.schema.json index 5bd474c8..1081d373 100644 --- a/json-schemas/Delivery.schema.json +++ b/json-schemas/Delivery.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Delivery", "type": "object", @@ -17,7 +17,8 @@ "parcels": { "type": "array", "items": {"$ref": "Parcel.schema.json"} - } + }, + "custom": {"$ref": "CustomFields.schema.json"} }, "required": [ "id", @@ -25,5 +26,5 @@ "items", "parcels" ], - "$id": "https://example.com/Delivery.schema.json" + "$id": "https://api.commercetools.com/Delivery.schema.json" } diff --git a/json-schemas/DeliveryAddedMessage.schema.json b/json-schemas/DeliveryAddedMessage.schema.json index 7467f0f4..e75befcf 100644 --- a/json-schemas/DeliveryAddedMessage.schema.json +++ b/json-schemas/DeliveryAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "delivery" ], - "$id": "https://example.com/DeliveryAddedMessage.schema.json" + "$id": "https://api.commercetools.com/DeliveryAddedMessage.schema.json" } diff --git a/json-schemas/DeliveryAddedMessagePayload.schema.json b/json-schemas/DeliveryAddedMessagePayload.schema.json index 406e05b4..de700c6c 100644 --- a/json-schemas/DeliveryAddedMessagePayload.schema.json +++ b/json-schemas/DeliveryAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "delivery" ], - "$id": "https://example.com/DeliveryAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/DeliveryAddedMessagePayload.schema.json" } diff --git a/json-schemas/DeliveryAddressSetMessage.schema.json b/json-schemas/DeliveryAddressSetMessage.schema.json index 15cc55ed..bf14e9d4 100644 --- a/json-schemas/DeliveryAddressSetMessage.schema.json +++ b/json-schemas/DeliveryAddressSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryAddressSetMessage", "type": "object", @@ -36,5 +36,5 @@ "type", "deliveryId" ], - "$id": "https://example.com/DeliveryAddressSetMessage.schema.json" + "$id": "https://api.commercetools.com/DeliveryAddressSetMessage.schema.json" } diff --git a/json-schemas/DeliveryAddressSetMessagePayload.schema.json b/json-schemas/DeliveryAddressSetMessagePayload.schema.json index 0db17350..4118646f 100644 --- a/json-schemas/DeliveryAddressSetMessagePayload.schema.json +++ b/json-schemas/DeliveryAddressSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryAddressSetMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "type", "deliveryId" ], - "$id": "https://example.com/DeliveryAddressSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/DeliveryAddressSetMessagePayload.schema.json" } diff --git a/json-schemas/DeliveryFormat.schema.json b/json-schemas/DeliveryFormat.schema.json index 2e1b6d92..0c9db4c4 100644 --- a/json-schemas/DeliveryFormat.schema.json +++ b/json-schemas/DeliveryFormat.schema.json @@ -1,14 +1,17 @@ { "oneOf": [ - {"$ref": "https://example.com/DeliveryCloudEventsFormat.schema.json"}, - {"$ref": "https://example.com/DeliveryPlatformFormat.schema.json"} + {"$ref": "https://api.commercetools.com/CloudEventsFormat.schema.json"}, + {"$ref": "https://api.commercetools.com/PlatformFormat.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryFormat", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "CloudEvents", + "Platform" + ]}}, "required": ["type"], - "$id": "https://example.com/DeliveryFormat.schema.json", + "$id": "https://api.commercetools.com/DeliveryFormat.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/DeliveryItem.schema.json b/json-schemas/DeliveryItem.schema.json index fa1c6670..ca9e874d 100644 --- a/json-schemas/DeliveryItem.schema.json +++ b/json-schemas/DeliveryItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryItem", "type": "object", @@ -11,5 +11,5 @@ "id", "quantity" ], - "$id": "https://example.com/DeliveryItem.schema.json" + "$id": "https://api.commercetools.com/DeliveryItem.schema.json" } diff --git a/json-schemas/DeliveryItemsUpdatedMessage.schema.json b/json-schemas/DeliveryItemsUpdatedMessage.schema.json index 29c75b72..e9e9d6f6 100644 --- a/json-schemas/DeliveryItemsUpdatedMessage.schema.json +++ b/json-schemas/DeliveryItemsUpdatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryItemsUpdatedMessage", "type": "object", @@ -44,5 +44,5 @@ "items", "oldItems" ], - "$id": "https://example.com/DeliveryItemsUpdatedMessage.schema.json" + "$id": "https://api.commercetools.com/DeliveryItemsUpdatedMessage.schema.json" } diff --git a/json-schemas/DeliveryItemsUpdatedMessagePayload.schema.json b/json-schemas/DeliveryItemsUpdatedMessagePayload.schema.json index bc335feb..2955ced0 100644 --- a/json-schemas/DeliveryItemsUpdatedMessagePayload.schema.json +++ b/json-schemas/DeliveryItemsUpdatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryItemsUpdatedMessagePayload", "type": "object", @@ -21,5 +21,5 @@ "items", "oldItems" ], - "$id": "https://example.com/DeliveryItemsUpdatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/DeliveryItemsUpdatedMessagePayload.schema.json" } diff --git a/json-schemas/DeliveryPayload.schema.json b/json-schemas/DeliveryPayload.schema.json new file mode 100644 index 00000000..14f0ae6e --- /dev/null +++ b/json-schemas/DeliveryPayload.schema.json @@ -0,0 +1,30 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/MessageDeliveryPayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ResourceCreatedDeliveryPayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ResourceDeletedDeliveryPayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ResourceUpdatedDeliveryPayload.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "DeliveryPayload", + "type": "object", + "properties": { + "projectKey": {"type": "string"}, + "notificationType": {"enum": [ + "Message", + "ResourceCreated", + "ResourceDeleted", + "ResourceUpdated" + ]}, + "resource": {"$ref": "Reference.schema.json"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"} + }, + "required": [ + "projectKey", + "notificationType", + "resource" + ], + "$id": "https://api.commercetools.com/DeliveryPayload.schema.json", + "discriminator": {"propertyName": "notificationType"} +} diff --git a/json-schemas/DeliveryPlatformFormat.schema.json b/json-schemas/DeliveryPlatformFormat.schema.json deleted file mode 100644 index 27fda6ae..00000000 --- a/json-schemas/DeliveryPlatformFormat.schema.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "DeliveryPlatformFormat", - "type": "object", - "properties": {"type": {"enum": ["Platform"]}}, - "required": ["type"], - "$id": "https://example.com/DeliveryPlatformFormat.schema.json" -} diff --git a/json-schemas/DeliveryRemovedMessage.schema.json b/json-schemas/DeliveryRemovedMessage.schema.json index d1677fde..df62c64b 100644 --- a/json-schemas/DeliveryRemovedMessage.schema.json +++ b/json-schemas/DeliveryRemovedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryRemovedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "delivery" ], - "$id": "https://example.com/DeliveryRemovedMessage.schema.json" + "$id": "https://api.commercetools.com/DeliveryRemovedMessage.schema.json" } diff --git a/json-schemas/DeliveryRemovedMessagePayload.schema.json b/json-schemas/DeliveryRemovedMessagePayload.schema.json index f64968f5..43c493af 100644 --- a/json-schemas/DeliveryRemovedMessagePayload.schema.json +++ b/json-schemas/DeliveryRemovedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DeliveryRemovedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "delivery" ], - "$id": "https://example.com/DeliveryRemovedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/DeliveryRemovedMessagePayload.schema.json" } diff --git a/json-schemas/Destination.schema.json b/json-schemas/Destination.schema.json index 4fe38ccb..646b4d63 100644 --- a/json-schemas/Destination.schema.json +++ b/json-schemas/Destination.schema.json @@ -1,18 +1,27 @@ { "oneOf": [ - {"$ref": "https://example.com/AzureEventGridDestination.schema.json"}, - {"$ref": "https://example.com/AzureServiceBusDestination.schema.json"}, - {"$ref": "https://example.com/GoogleCloudPubSubDestination.schema.json"}, - {"$ref": "https://example.com/IronMqDestination.schema.json"}, - {"$ref": "https://example.com/SnsDestination.schema.json"}, - {"$ref": "https://example.com/SqsDestination.schema.json"} + {"$ref": "https://api.commercetools.com/AzureEventGridDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/AzureServiceBusDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/EventBridgeDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/GoogleCloudPubSubDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/IronMqDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/SnsDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/SqsDestination.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Destination", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "EventGrid", + "AzureServiceBus", + "EventBridge", + "GoogleCloudPubSub", + "IronMQ", + "SNS", + "SQS" + ]}}, "required": ["type"], - "$id": "https://example.com/Destination.schema.json", + "$id": "https://api.commercetools.com/Destination.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/DirectDiscount.schema.json b/json-schemas/DirectDiscount.schema.json new file mode 100644 index 00000000..f9b9a136 --- /dev/null +++ b/json-schemas/DirectDiscount.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "DirectDiscount", + "type": "object", + "properties": { + "value": {"$ref": "CartDiscountValue.schema.json"}, + "id": {"type": "string"}, + "target": {"$ref": "CartDiscountTarget.schema.json"} + }, + "required": [ + "id", + "value" + ], + "$id": "https://api.commercetools.com/DirectDiscount.schema.json" +} diff --git a/json-schemas/DirectDiscountDraft.schema.json b/json-schemas/DirectDiscountDraft.schema.json new file mode 100644 index 00000000..28c7de5c --- /dev/null +++ b/json-schemas/DirectDiscountDraft.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "DirectDiscountDraft", + "type": "object", + "properties": { + "value": {"$ref": "CartDiscountValue.schema.json"}, + "target": {"$ref": "CartDiscountTarget.schema.json"} + }, + "required": ["value"], + "$id": "https://api.commercetools.com/DirectDiscountDraft.schema.json" +} diff --git a/json-schemas/DiscountCode.schema.json b/json-schemas/DiscountCode.schema.json index 7840ee1b..5727708d 100644 --- a/json-schemas/DiscountCode.schema.json +++ b/json-schemas/DiscountCode.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCode", "type": "object", @@ -8,6 +8,7 @@ "type": "array", "items": {"$ref": "CartDiscountReference.schema.json"} }, + "applicationVersion": {"type": "number"}, "lastModifiedAt": { "type": "string", "format": "date-time" @@ -56,5 +57,5 @@ "references", "groups" ], - "$id": "https://example.com/DiscountCode.schema.json" + "$id": "https://api.commercetools.com/DiscountCode.schema.json" } diff --git a/json-schemas/DiscountCodeChangeCartDiscountsAction.schema.json b/json-schemas/DiscountCodeChangeCartDiscountsAction.schema.json index b381525c..99c869c6 100644 --- a/json-schemas/DiscountCodeChangeCartDiscountsAction.schema.json +++ b/json-schemas/DiscountCodeChangeCartDiscountsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeChangeCartDiscountsAction", "type": "object", @@ -14,5 +14,5 @@ "action", "cartDiscounts" ], - "$id": "https://example.com/DiscountCodeChangeCartDiscountsAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeChangeCartDiscountsAction.schema.json" } diff --git a/json-schemas/DiscountCodeChangeGroupsAction.schema.json b/json-schemas/DiscountCodeChangeGroupsAction.schema.json index e0a63cb0..e45e99d4 100644 --- a/json-schemas/DiscountCodeChangeGroupsAction.schema.json +++ b/json-schemas/DiscountCodeChangeGroupsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeChangeGroupsAction", "type": "object", @@ -14,5 +14,5 @@ "action", "groups" ], - "$id": "https://example.com/DiscountCodeChangeGroupsAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeChangeGroupsAction.schema.json" } diff --git a/json-schemas/DiscountCodeChangeIsActiveAction.schema.json b/json-schemas/DiscountCodeChangeIsActiveAction.schema.json index 244708a4..56a5c068 100644 --- a/json-schemas/DiscountCodeChangeIsActiveAction.schema.json +++ b/json-schemas/DiscountCodeChangeIsActiveAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeChangeIsActiveAction", "type": "object", @@ -11,5 +11,5 @@ "action", "isActive" ], - "$id": "https://example.com/DiscountCodeChangeIsActiveAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeChangeIsActiveAction.schema.json" } diff --git a/json-schemas/DiscountCodeDraft.schema.json b/json-schemas/DiscountCodeDraft.schema.json index 0dc2f487..05861f48 100644 --- a/json-schemas/DiscountCodeDraft.schema.json +++ b/json-schemas/DiscountCodeDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeDraft", "type": "object", @@ -33,5 +33,5 @@ "code", "cartDiscounts" ], - "$id": "https://example.com/DiscountCodeDraft.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeDraft.schema.json" } diff --git a/json-schemas/DiscountCodeInfo.schema.json b/json-schemas/DiscountCodeInfo.schema.json index 483b262c..97bdfa3e 100644 --- a/json-schemas/DiscountCodeInfo.schema.json +++ b/json-schemas/DiscountCodeInfo.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeInfo", "type": "object", @@ -11,5 +11,5 @@ "discountCode", "state" ], - "$id": "https://example.com/DiscountCodeInfo.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeInfo.schema.json" } diff --git a/json-schemas/DiscountCodeNonApplicableError.schema.json b/json-schemas/DiscountCodeNonApplicableError.schema.json index 9efb4fb0..5cb55243 100644 --- a/json-schemas/DiscountCodeNonApplicableError.schema.json +++ b/json-schemas/DiscountCodeNonApplicableError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeNonApplicableError", "type": "object", @@ -26,5 +34,5 @@ "code", "message" ], - "$id": "https://example.com/DiscountCodeNonApplicableError.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeNonApplicableError.schema.json" } diff --git a/json-schemas/DiscountCodePagedQueryResponse.schema.json b/json-schemas/DiscountCodePagedQueryResponse.schema.json index 559a9653..202d314d 100644 --- a/json-schemas/DiscountCodePagedQueryResponse.schema.json +++ b/json-schemas/DiscountCodePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [DiscountCode](ctp:api:type:DiscountCode).", "additionalProperties": false, "title": "DiscountCodePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/DiscountCodePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/DiscountCodePagedQueryResponse.schema.json" } diff --git a/json-schemas/DiscountCodeReference.schema.json b/json-schemas/DiscountCodeReference.schema.json index cb2c4102..ff280c39 100644 --- a/json-schemas/DiscountCodeReference.schema.json +++ b/json-schemas/DiscountCodeReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode).", "additionalProperties": false, "title": "DiscountCodeReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/DiscountCodeReference.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeReference.schema.json" } diff --git a/json-schemas/DiscountCodeResourceIdentifier.schema.json b/json-schemas/DiscountCodeResourceIdentifier.schema.json index 20a54dea..ce6d6b87 100644 --- a/json-schemas/DiscountCodeResourceIdentifier.schema.json +++ b/json-schemas/DiscountCodeResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [DiscountCode](ctp:api:type:DiscountCode).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "DiscountCodeResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/DiscountCodeResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/DiscountCodeResourceIdentifier.schema.json" } diff --git a/json-schemas/DiscountCodeSetCartPredicateAction.schema.json b/json-schemas/DiscountCodeSetCartPredicateAction.schema.json index 83e0de18..9346700f 100644 --- a/json-schemas/DiscountCodeSetCartPredicateAction.schema.json +++ b/json-schemas/DiscountCodeSetCartPredicateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetCartPredicateAction", "type": "object", @@ -8,5 +8,5 @@ "cartPredicate": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetCartPredicateAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetCartPredicateAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetCustomFieldAction.schema.json b/json-schemas/DiscountCodeSetCustomFieldAction.schema.json index 894b9c0d..9ca4164d 100644 --- a/json-schemas/DiscountCodeSetCustomFieldAction.schema.json +++ b/json-schemas/DiscountCodeSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/DiscountCodeSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetCustomFieldAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetCustomTypeAction.schema.json b/json-schemas/DiscountCodeSetCustomTypeAction.schema.json index 89933684..0776f99c 100644 --- a/json-schemas/DiscountCodeSetCustomTypeAction.schema.json +++ b/json-schemas/DiscountCodeSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetCustomTypeAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetDescriptionAction.schema.json b/json-schemas/DiscountCodeSetDescriptionAction.schema.json index 5774230e..4135b634 100644 --- a/json-schemas/DiscountCodeSetDescriptionAction.schema.json +++ b/json-schemas/DiscountCodeSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetDescriptionAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetMaxApplicationsAction.schema.json b/json-schemas/DiscountCodeSetMaxApplicationsAction.schema.json index 04eb51fe..49a9848d 100644 --- a/json-schemas/DiscountCodeSetMaxApplicationsAction.schema.json +++ b/json-schemas/DiscountCodeSetMaxApplicationsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetMaxApplicationsAction", "type": "object", @@ -8,5 +8,5 @@ "maxApplications": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetMaxApplicationsAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetMaxApplicationsAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json b/json-schemas/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json index 3a92803a..7c77dadb 100644 --- a/json-schemas/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json +++ b/json-schemas/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetMaxApplicationsPerCustomerAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setMaxApplicationsPerCustomer"]} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetNameAction.schema.json b/json-schemas/DiscountCodeSetNameAction.schema.json index 917f5f5f..15d2f5e0 100644 --- a/json-schemas/DiscountCodeSetNameAction.schema.json +++ b/json-schemas/DiscountCodeSetNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetNameAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setName"]} }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetNameAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetNameAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetValidFromAction.schema.json b/json-schemas/DiscountCodeSetValidFromAction.schema.json index e484569b..ef9df56f 100644 --- a/json-schemas/DiscountCodeSetValidFromAction.schema.json +++ b/json-schemas/DiscountCodeSetValidFromAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetValidFromAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetValidFromAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetValidFromAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetValidFromAndUntilAction.schema.json b/json-schemas/DiscountCodeSetValidFromAndUntilAction.schema.json index 74f36653..f07440ed 100644 --- a/json-schemas/DiscountCodeSetValidFromAndUntilAction.schema.json +++ b/json-schemas/DiscountCodeSetValidFromAndUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetValidFromAndUntilAction", "type": "object", @@ -15,5 +15,5 @@ } }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetValidFromAndUntilAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetValidFromAndUntilAction.schema.json" } diff --git a/json-schemas/DiscountCodeSetValidUntilAction.schema.json b/json-schemas/DiscountCodeSetValidUntilAction.schema.json index f3f17a5d..1bc9157e 100644 --- a/json-schemas/DiscountCodeSetValidUntilAction.schema.json +++ b/json-schemas/DiscountCodeSetValidUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeSetValidUntilAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/DiscountCodeSetValidUntilAction.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeSetValidUntilAction.schema.json" } diff --git a/json-schemas/DiscountCodeStateEnum.schema.json b/json-schemas/DiscountCodeStateEnum.schema.json index 9dc99982..c2c3b7e8 100644 --- a/json-schemas/DiscountCodeStateEnum.schema.json +++ b/json-schemas/DiscountCodeStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "DiscountCodeState", "type": "string", "enum": [ @@ -10,5 +10,5 @@ "ApplicationStoppedByPreviousDiscount", "NotValid" ], - "$id": "https://example.com/DiscountCodeStateEnum.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeStateEnum.schema.json" } diff --git a/json-schemas/DiscountCodeUpdate.schema.json b/json-schemas/DiscountCodeUpdate.schema.json index 13f2d305..cdb1397e 100644 --- a/json-schemas/DiscountCodeUpdate.schema.json +++ b/json-schemas/DiscountCodeUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/DiscountCodeUpdate.schema.json" + "$id": "https://api.commercetools.com/DiscountCodeUpdate.schema.json" } diff --git a/json-schemas/DiscountCodeUpdateAction.schema.json b/json-schemas/DiscountCodeUpdateAction.schema.json index 727e768a..12abc58b 100644 --- a/json-schemas/DiscountCodeUpdateAction.schema.json +++ b/json-schemas/DiscountCodeUpdateAction.schema.json @@ -1,25 +1,39 @@ { "oneOf": [ - {"$ref": "https://example.com/DiscountCodeChangeCartDiscountsAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeChangeGroupsAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeChangeIsActiveAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetCartPredicateAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetMaxApplicationsAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetNameAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetValidFromAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetValidFromAndUntilAction.schema.json"}, - {"$ref": "https://example.com/DiscountCodeSetValidUntilAction.schema.json"} + {"$ref": "https://api.commercetools.com/DiscountCodeChangeCartDiscountsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeChangeGroupsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeChangeIsActiveAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetCartPredicateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetMaxApplicationsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetMaxApplicationsPerCustomerAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetValidFromAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetValidFromAndUntilAction.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeSetValidUntilAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountCodeUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeCartDiscounts", + "changeGroups", + "changeIsActive", + "setCartPredicate", + "setCustomField", + "setCustomType", + "setDescription", + "setMaxApplications", + "setMaxApplicationsPerCustomer", + "setName", + "setValidFrom", + "setValidFromAndUntil", + "setValidUntil" + ]}}, "required": ["action"], - "$id": "https://example.com/DiscountCodeUpdateAction.schema.json", + "$id": "https://api.commercetools.com/DiscountCodeUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/DiscountedLineItemPortion.schema.json b/json-schemas/DiscountedLineItemPortion.schema.json index a87cd07d..0f962563 100644 --- a/json-schemas/DiscountedLineItemPortion.schema.json +++ b/json-schemas/DiscountedLineItemPortion.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountedLineItemPortion", "type": "object", @@ -11,5 +11,5 @@ "discount", "discountedAmount" ], - "$id": "https://example.com/DiscountedLineItemPortion.schema.json" + "$id": "https://api.commercetools.com/DiscountedLineItemPortion.schema.json" } diff --git a/json-schemas/DiscountedLineItemPrice.schema.json b/json-schemas/DiscountedLineItemPrice.schema.json index a8b55527..ecd8dfdb 100644 --- a/json-schemas/DiscountedLineItemPrice.schema.json +++ b/json-schemas/DiscountedLineItemPrice.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountedLineItemPrice", "type": "object", @@ -14,5 +14,5 @@ "value", "includedDiscounts" ], - "$id": "https://example.com/DiscountedLineItemPrice.schema.json" + "$id": "https://api.commercetools.com/DiscountedLineItemPrice.schema.json" } diff --git a/json-schemas/DiscountedLineItemPriceDraft.schema.json b/json-schemas/DiscountedLineItemPriceDraft.schema.json index 9a32a242..3d40f68e 100644 --- a/json-schemas/DiscountedLineItemPriceDraft.schema.json +++ b/json-schemas/DiscountedLineItemPriceDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountedLineItemPriceDraft", "type": "object", @@ -14,5 +14,5 @@ "value", "includedDiscounts" ], - "$id": "https://example.com/DiscountedLineItemPriceDraft.schema.json" + "$id": "https://api.commercetools.com/DiscountedLineItemPriceDraft.schema.json" } diff --git a/json-schemas/DiscountedLineItemPriceForQuantity.schema.json b/json-schemas/DiscountedLineItemPriceForQuantity.schema.json index c1c05a2a..feeb0b75 100644 --- a/json-schemas/DiscountedLineItemPriceForQuantity.schema.json +++ b/json-schemas/DiscountedLineItemPriceForQuantity.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountedLineItemPriceForQuantity", "type": "object", @@ -11,5 +11,5 @@ "quantity", "discountedPrice" ], - "$id": "https://example.com/DiscountedLineItemPriceForQuantity.schema.json" + "$id": "https://api.commercetools.com/DiscountedLineItemPriceForQuantity.schema.json" } diff --git a/json-schemas/DiscountedPrice.schema.json b/json-schemas/DiscountedPrice.schema.json index 3b3d7a95..fc8d3ebf 100644 --- a/json-schemas/DiscountedPrice.schema.json +++ b/json-schemas/DiscountedPrice.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DiscountedPrice", "type": "object", "properties": { - "value": {"$ref": "Money.schema.json"}, + "value": {"$ref": "TypedMoney.schema.json"}, "discount": {"$ref": "ProductDiscountReference.schema.json"} }, "required": [ "value", "discount" ], - "$id": "https://example.com/DiscountedPrice.schema.json" + "$id": "https://api.commercetools.com/DiscountedPrice.schema.json" } diff --git a/json-schemas/DiscountedPriceDraft.schema.json b/json-schemas/DiscountedPriceDraft.schema.json new file mode 100644 index 00000000..e79167f5 --- /dev/null +++ b/json-schemas/DiscountedPriceDraft.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "DiscountedPriceDraft", + "type": "object", + "properties": { + "value": {"$ref": "Money.schema.json"}, + "discount": {"$ref": "ProductDiscountReference.schema.json"} + }, + "required": [ + "value", + "discount" + ], + "$id": "https://api.commercetools.com/DiscountedPriceDraft.schema.json" +} diff --git a/json-schemas/DuplicateAttributeValueError.schema.json b/json-schemas/DuplicateAttributeValueError.schema.json index b4a1a2d2..0bd9150b 100644 --- a/json-schemas/DuplicateAttributeValueError.schema.json +++ b/json-schemas/DuplicateAttributeValueError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateAttributeValueError", "type": "object", @@ -13,5 +21,5 @@ "message", "attribute" ], - "$id": "https://example.com/DuplicateAttributeValueError.schema.json" + "$id": "https://api.commercetools.com/DuplicateAttributeValueError.schema.json" } diff --git a/json-schemas/DuplicateAttributeValuesError.schema.json b/json-schemas/DuplicateAttributeValuesError.schema.json index 9ee4ef5c..c80f6520 100644 --- a/json-schemas/DuplicateAttributeValuesError.schema.json +++ b/json-schemas/DuplicateAttributeValuesError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateAttributeValuesError", "type": "object", @@ -16,5 +24,5 @@ "message", "attributes" ], - "$id": "https://example.com/DuplicateAttributeValuesError.schema.json" + "$id": "https://api.commercetools.com/DuplicateAttributeValuesError.schema.json" } diff --git a/json-schemas/DuplicateEnumValuesError.schema.json b/json-schemas/DuplicateEnumValuesError.schema.json index 521ad447..58fc02b1 100644 --- a/json-schemas/DuplicateEnumValuesError.schema.json +++ b/json-schemas/DuplicateEnumValuesError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateEnumValuesError", "type": "object", @@ -16,5 +24,5 @@ "message", "duplicates" ], - "$id": "https://example.com/DuplicateEnumValuesError.schema.json" + "$id": "https://api.commercetools.com/DuplicateEnumValuesError.schema.json" } diff --git a/json-schemas/DuplicateFieldError.schema.json b/json-schemas/DuplicateFieldError.schema.json index 09a40a3b..b841aeef 100644 --- a/json-schemas/DuplicateFieldError.schema.json +++ b/json-schemas/DuplicateFieldError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateFieldError", "type": "object", @@ -21,5 +29,5 @@ "code", "message" ], - "$id": "https://example.com/DuplicateFieldError.schema.json" + "$id": "https://api.commercetools.com/DuplicateFieldError.schema.json" } diff --git a/json-schemas/DuplicateFieldWithConflictingResourceError.schema.json b/json-schemas/DuplicateFieldWithConflictingResourceError.schema.json index 9a897e7d..3f5ab70c 100644 --- a/json-schemas/DuplicateFieldWithConflictingResourceError.schema.json +++ b/json-schemas/DuplicateFieldWithConflictingResourceError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateFieldWithConflictingResourceError", "type": "object", @@ -24,5 +32,5 @@ "duplicateValue", "conflictingResource" ], - "$id": "https://example.com/DuplicateFieldWithConflictingResourceError.schema.json" + "$id": "https://api.commercetools.com/DuplicateFieldWithConflictingResourceError.schema.json" } diff --git a/json-schemas/DuplicatePriceScopeError.schema.json b/json-schemas/DuplicatePriceScopeError.schema.json index 74ab9d9f..c1601c01 100644 --- a/json-schemas/DuplicatePriceScopeError.schema.json +++ b/json-schemas/DuplicatePriceScopeError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicatePriceScopeError", "type": "object", @@ -16,5 +24,5 @@ "message", "conflictingPrices" ], - "$id": "https://example.com/DuplicatePriceScopeError.schema.json" + "$id": "https://api.commercetools.com/DuplicatePriceScopeError.schema.json" } diff --git a/json-schemas/DuplicateStandalonePriceScopeError.schema.json b/json-schemas/DuplicateStandalonePriceScopeError.schema.json new file mode 100644 index 00000000..2de69e1b --- /dev/null +++ b/json-schemas/DuplicateStandalonePriceScopeError.schema.json @@ -0,0 +1,40 @@ +{ + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "DuplicateStandalonePriceScopeError", + "type": "object", + "properties": { + "country": {"type": "string"}, + "code": {"enum": ["DuplicateStandalonePriceScope"]}, + "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"}, + "channel": {"$ref": "ChannelResourceIdentifier.schema.json"}, + "validUntil": { + "type": "string", + "format": "date-time" + }, + "currency": {"type": "string"}, + "validFrom": { + "type": "string", + "format": "date-time" + }, + "message": {"type": "string"}, + "sku": {"type": "string"}, + "conflictingStandalonePrice": {"$ref": "StandalonePriceReference.schema.json"} + }, + "required": [ + "code", + "message", + "conflictingStandalonePrice", + "sku", + "currency" + ], + "$id": "https://api.commercetools.com/DuplicateStandalonePriceScopeError.schema.json" +} diff --git a/json-schemas/DuplicateVariantValuesError.schema.json b/json-schemas/DuplicateVariantValuesError.schema.json index 18c2b67e..349205e4 100644 --- a/json-schemas/DuplicateVariantValuesError.schema.json +++ b/json-schemas/DuplicateVariantValuesError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "DuplicateVariantValuesError", "type": "object", @@ -13,5 +21,5 @@ "message", "variantValues" ], - "$id": "https://example.com/DuplicateVariantValuesError.schema.json" + "$id": "https://api.commercetools.com/DuplicateVariantValuesError.schema.json" } diff --git a/json-schemas/EditPreviewFailedError.schema.json b/json-schemas/EditPreviewFailedError.schema.json index aec051bf..258fb6bc 100644 --- a/json-schemas/EditPreviewFailedError.schema.json +++ b/json-schemas/EditPreviewFailedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "EditPreviewFailedError", "type": "object", @@ -13,5 +21,5 @@ "message", "result" ], - "$id": "https://example.com/EditPreviewFailedError.schema.json" + "$id": "https://api.commercetools.com/EditPreviewFailedError.schema.json" } diff --git a/json-schemas/EnumKeyAlreadyExistsError.schema.json b/json-schemas/EnumKeyAlreadyExistsError.schema.json index 16182a64..febaacb3 100644 --- a/json-schemas/EnumKeyAlreadyExistsError.schema.json +++ b/json-schemas/EnumKeyAlreadyExistsError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "EnumKeyAlreadyExistsError", "type": "object", @@ -15,5 +23,5 @@ "conflictingEnumKey", "conflictingAttributeName" ], - "$id": "https://example.com/EnumKeyAlreadyExistsError.schema.json" + "$id": "https://api.commercetools.com/EnumKeyAlreadyExistsError.schema.json" } diff --git a/json-schemas/EnumKeyDoesNotExistError.schema.json b/json-schemas/EnumKeyDoesNotExistError.schema.json index ae5d3df3..b130c34c 100644 --- a/json-schemas/EnumKeyDoesNotExistError.schema.json +++ b/json-schemas/EnumKeyDoesNotExistError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "EnumKeyDoesNotExistError", "type": "object", @@ -15,5 +23,5 @@ "conflictingEnumKey", "conflictingAttributeName" ], - "$id": "https://example.com/EnumKeyDoesNotExistError.schema.json" + "$id": "https://api.commercetools.com/EnumKeyDoesNotExistError.schema.json" } diff --git a/json-schemas/EnumValueIsUsedError.schema.json b/json-schemas/EnumValueIsUsedError.schema.json index edbfd9b5..d6079fab 100644 --- a/json-schemas/EnumValueIsUsedError.schema.json +++ b/json-schemas/EnumValueIsUsedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "EnumValueIsUsedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/EnumValueIsUsedError.schema.json" + "$id": "https://api.commercetools.com/EnumValueIsUsedError.schema.json" } diff --git a/json-schemas/EnumValuesMustMatchError.schema.json b/json-schemas/EnumValuesMustMatchError.schema.json index 56044cf8..22eea2af 100644 --- a/json-schemas/EnumValuesMustMatchError.schema.json +++ b/json-schemas/EnumValuesMustMatchError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "EnumValuesMustMatchError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/EnumValuesMustMatchError.schema.json" + "$id": "https://api.commercetools.com/EnumValuesMustMatchError.schema.json" } diff --git a/json-schemas/ErrorByExtension.schema.json b/json-schemas/ErrorByExtension.schema.json index 9c5d2065..6111239d 100644 --- a/json-schemas/ErrorByExtension.schema.json +++ b/json-schemas/ErrorByExtension.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ErrorByExtension", "type": "object", @@ -8,5 +8,5 @@ "id": {"type": "string"} }, "required": ["id"], - "$id": "https://example.com/ErrorByExtension.schema.json" + "$id": "https://api.commercetools.com/ErrorByExtension.schema.json" } diff --git a/json-schemas/ErrorObject.schema.json b/json-schemas/ErrorObject.schema.json index b885cf7d..d41013e1 100644 --- a/json-schemas/ErrorObject.schema.json +++ b/json-schemas/ErrorObject.schema.json @@ -1,82 +1,161 @@ { + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, "oneOf": [ - {"$ref": "https://example.com/AccessDeniedError.schema.json"}, - {"$ref": "https://example.com/AnonymousIdAlreadyInUseError.schema.json"}, - {"$ref": "https://example.com/AttributeDefinitionAlreadyExistsError.schema.json"}, - {"$ref": "https://example.com/AttributeDefinitionTypeConflictError.schema.json"}, - {"$ref": "https://example.com/AttributeNameDoesNotExistError.schema.json"}, - {"$ref": "https://example.com/ConcurrentModificationError.schema.json"}, - {"$ref": "https://example.com/DiscountCodeNonApplicableError.schema.json"}, - {"$ref": "https://example.com/DuplicateAttributeValueError.schema.json"}, - {"$ref": "https://example.com/DuplicateAttributeValuesError.schema.json"}, - {"$ref": "https://example.com/DuplicateEnumValuesError.schema.json"}, - {"$ref": "https://example.com/DuplicateFieldError.schema.json"}, - {"$ref": "https://example.com/DuplicateFieldWithConflictingResourceError.schema.json"}, - {"$ref": "https://example.com/DuplicatePriceScopeError.schema.json"}, - {"$ref": "https://example.com/DuplicateVariantValuesError.schema.json"}, - {"$ref": "https://example.com/EditPreviewFailedError.schema.json"}, - {"$ref": "https://example.com/EnumKeyAlreadyExistsError.schema.json"}, - {"$ref": "https://example.com/EnumKeyDoesNotExistError.schema.json"}, - {"$ref": "https://example.com/EnumValueIsUsedError.schema.json"}, - {"$ref": "https://example.com/EnumValuesMustMatchError.schema.json"}, - {"$ref": "https://example.com/ExtensionBadResponseError.schema.json"}, - {"$ref": "https://example.com/ExtensionNoResponseError.schema.json"}, - {"$ref": "https://example.com/ExtensionUpdateActionsFailedError.schema.json"}, - {"$ref": "https://example.com/ExternalOAuthFailedError.schema.json"}, - {"$ref": "https://example.com/FeatureRemovedError.schema.json"}, - {"$ref": "https://example.com/GeneralError.schema.json"}, - {"$ref": "https://example.com/InsufficientScopeError.schema.json"}, - {"$ref": "https://example.com/InternalConstraintViolatedError.schema.json"}, - {"$ref": "https://example.com/InvalidCredentialsError.schema.json"}, - {"$ref": "https://example.com/InvalidCurrentPasswordError.schema.json"}, - {"$ref": "https://example.com/InvalidFieldError.schema.json"}, - {"$ref": "https://example.com/InvalidInputError.schema.json"}, - {"$ref": "https://example.com/InvalidItemShippingDetailsError.schema.json"}, - {"$ref": "https://example.com/InvalidJsonInputError.schema.json"}, - {"$ref": "https://example.com/InvalidOperationError.schema.json"}, - {"$ref": "https://example.com/InvalidSubjectError.schema.json"}, - {"$ref": "https://example.com/InvalidTokenError.schema.json"}, - {"$ref": "https://example.com/LanguageUsedInStoresError.schema.json"}, - {"$ref": "https://example.com/MatchingPriceNotFoundError.schema.json"}, - {"$ref": "https://example.com/MaxResourceLimitExceededError.schema.json"}, - {"$ref": "https://example.com/MissingRoleOnChannelError.schema.json"}, - {"$ref": "https://example.com/MissingTaxRateForCountryError.schema.json"}, - {"$ref": "https://example.com/NoMatchingProductDiscountFoundError.schema.json"}, - {"$ref": "https://example.com/NotEnabledError.schema.json"}, - {"$ref": "https://example.com/ObjectNotFoundError.schema.json"}, - {"$ref": "https://example.com/OutOfStockError.schema.json"}, - {"$ref": "https://example.com/OverCapacityError.schema.json"}, - {"$ref": "https://example.com/PendingOperationError.schema.json"}, - {"$ref": "https://example.com/PriceChangedError.schema.json"}, - {"$ref": "https://example.com/ProjectNotConfiguredForLanguagesError.schema.json"}, - {"$ref": "https://example.com/QueryComplexityLimitExceededError.schema.json"}, - {"$ref": "https://example.com/QueryTimedOutError.schema.json"}, - {"$ref": "https://example.com/ReferenceExistsError.schema.json"}, - {"$ref": "https://example.com/ReferencedResourceNotFoundError.schema.json"}, - {"$ref": "https://example.com/RequiredFieldError.schema.json"}, - {"$ref": "https://example.com/ResourceNotFoundError.schema.json"}, - {"$ref": "https://example.com/ResourceSizeLimitExceededError.schema.json"}, - {"$ref": "https://example.com/SearchDeactivatedError.schema.json"}, - {"$ref": "https://example.com/SearchExecutionFailureError.schema.json"}, - {"$ref": "https://example.com/SearchFacetPathNotFoundError.schema.json"}, - {"$ref": "https://example.com/SearchIndexingInProgressError.schema.json"}, - {"$ref": "https://example.com/SemanticErrorError.schema.json"}, - {"$ref": "https://example.com/ShippingMethodDoesNotMatchCartError.schema.json"}, - {"$ref": "https://example.com/SyntaxErrorError.schema.json"}, - {"$ref": "https://example.com/WeakPasswordError.schema.json"} + {"$ref": "https://api.commercetools.com/AccessDeniedError.schema.json"}, + {"$ref": "https://api.commercetools.com/AnonymousIdAlreadyInUseError.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeDefinitionAlreadyExistsError.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeDefinitionTypeConflictError.schema.json"}, + {"$ref": "https://api.commercetools.com/AttributeNameDoesNotExistError.schema.json"}, + {"$ref": "https://api.commercetools.com/BadGatewayError.schema.json"}, + {"$ref": "https://api.commercetools.com/ConcurrentModificationError.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeNonApplicableError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateAttributeValueError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateAttributeValuesError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateEnumValuesError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateFieldError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateFieldWithConflictingResourceError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicatePriceScopeError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateStandalonePriceScopeError.schema.json"}, + {"$ref": "https://api.commercetools.com/DuplicateVariantValuesError.schema.json"}, + {"$ref": "https://api.commercetools.com/EditPreviewFailedError.schema.json"}, + {"$ref": "https://api.commercetools.com/EnumKeyAlreadyExistsError.schema.json"}, + {"$ref": "https://api.commercetools.com/EnumKeyDoesNotExistError.schema.json"}, + {"$ref": "https://api.commercetools.com/EnumValueIsUsedError.schema.json"}, + {"$ref": "https://api.commercetools.com/EnumValuesMustMatchError.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionBadResponseError.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionNoResponseError.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionUpdateActionsFailedError.schema.json"}, + {"$ref": "https://api.commercetools.com/ExternalOAuthFailedError.schema.json"}, + {"$ref": "https://api.commercetools.com/FeatureRemovedError.schema.json"}, + {"$ref": "https://api.commercetools.com/GeneralError.schema.json"}, + {"$ref": "https://api.commercetools.com/InsufficientScopeError.schema.json"}, + {"$ref": "https://api.commercetools.com/InternalConstraintViolatedError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidCredentialsError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidCurrentPasswordError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidFieldError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidInputError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidItemShippingDetailsError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidJsonInputError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidOperationError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidSubjectError.schema.json"}, + {"$ref": "https://api.commercetools.com/InvalidTokenError.schema.json"}, + {"$ref": "https://api.commercetools.com/LanguageUsedInStoresError.schema.json"}, + {"$ref": "https://api.commercetools.com/MatchingPriceNotFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/MaxResourceLimitExceededError.schema.json"}, + {"$ref": "https://api.commercetools.com/MissingRoleOnChannelError.schema.json"}, + {"$ref": "https://api.commercetools.com/MissingTaxRateForCountryError.schema.json"}, + {"$ref": "https://api.commercetools.com/NoMatchingProductDiscountFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/NotEnabledError.schema.json"}, + {"$ref": "https://api.commercetools.com/ObjectNotFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/OutOfStockError.schema.json"}, + {"$ref": "https://api.commercetools.com/OverCapacityError.schema.json"}, + {"$ref": "https://api.commercetools.com/OverlappingStandalonePriceValidityError.schema.json"}, + {"$ref": "https://api.commercetools.com/PendingOperationError.schema.json"}, + {"$ref": "https://api.commercetools.com/PriceChangedError.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectNotConfiguredForLanguagesError.schema.json"}, + {"$ref": "https://api.commercetools.com/QueryComplexityLimitExceededError.schema.json"}, + {"$ref": "https://api.commercetools.com/QueryTimedOutError.schema.json"}, + {"$ref": "https://api.commercetools.com/ReferenceExistsError.schema.json"}, + {"$ref": "https://api.commercetools.com/ReferencedResourceNotFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/RequiredFieldError.schema.json"}, + {"$ref": "https://api.commercetools.com/ResourceNotFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/ResourceSizeLimitExceededError.schema.json"}, + {"$ref": "https://api.commercetools.com/SearchDeactivatedError.schema.json"}, + {"$ref": "https://api.commercetools.com/SearchExecutionFailureError.schema.json"}, + {"$ref": "https://api.commercetools.com/SearchFacetPathNotFoundError.schema.json"}, + {"$ref": "https://api.commercetools.com/SearchIndexingInProgressError.schema.json"}, + {"$ref": "https://api.commercetools.com/SemanticErrorError.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodDoesNotMatchCartError.schema.json"}, + {"$ref": "https://api.commercetools.com/SyntaxErrorError.schema.json"}, + {"$ref": "https://api.commercetools.com/WeakPasswordError.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ErrorObject", "type": "object", "properties": { "message": {"type": "string"}, - "code": {"type": "string"} + "code": {"enum": [ + "access_denied", + "AnonymousIdAlreadyInUse", + "AttributeDefinitionAlreadyExists", + "AttributeDefinitionTypeConflict", + "AttributeNameDoesNotExist", + "BadGateway", + "ConcurrentModification", + "DiscountCodeNonApplicable", + "DuplicateAttributeValue", + "DuplicateAttributeValues", + "DuplicateEnumValues", + "DuplicateField", + "DuplicateFieldWithConflictingResource", + "DuplicatePriceScope", + "DuplicateStandalonePriceScope", + "DuplicateVariantValues", + "EditPreviewFailed", + "EnumKeyAlreadyExists", + "EnumKeyDoesNotExist", + "EnumValueIsUsed", + "EnumValuesMustMatch", + "ExtensionBadResponse", + "ExtensionNoResponse", + "ExtensionUpdateActionsFailed", + "ExternalOAuthFailed", + "FeatureRemoved", + "General", + "insufficient_scope", + "InternalConstraintViolated", + "InvalidCredentials", + "InvalidCurrentPassword", + "InvalidField", + "InvalidInput", + "InvalidItemShippingDetails", + "InvalidJsonInput", + "InvalidOperation", + "InvalidSubject", + "invalid_token", + "LanguageUsedInStores", + "MatchingPriceNotFound", + "MaxResourceLimitExceeded", + "MissingRoleOnChannel", + "MissingTaxRateForCountry", + "NoMatchingProductDiscountFound", + "NotEnabled", + "ObjectNotFound", + "OutOfStock", + "OverCapacity", + "OverlappingStandalonePriceValidity", + "PendingOperation", + "PriceChanged", + "ProjectNotConfiguredForLanguages", + "QueryComplexityLimitExceeded", + "QueryTimedOut", + "ReferenceExists", + "ReferencedResourceNotFound", + "RequiredField", + "ResourceNotFound", + "ResourceSizeLimitExceeded", + "SearchDeactivated", + "SearchExecutionFailure", + "SearchFacetPathNotFound", + "SearchIndexingInProgress", + "SemanticError", + "ShippingMethodDoesNotMatchCart", + "SyntaxError", + "WeakPassword" + ]} }, "required": [ "code", "message" ], - "$id": "https://example.com/ErrorObject.schema.json", + "$id": "https://api.commercetools.com/ErrorObject.schema.json", "discriminator": {"propertyName": "code"} } diff --git a/json-schemas/ErrorResponse.schema.json b/json-schemas/ErrorResponse.schema.json index ed5394cb..3a3ec084 100644 --- a/json-schemas/ErrorResponse.schema.json +++ b/json-schemas/ErrorResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ErrorResponse", "type": "object", @@ -11,14 +11,11 @@ "type": "array", "items": {"$ref": "ErrorObject.schema.json"} }, - "statusCode": { - "type": "number", - "format": "integer" - } + "statusCode": {"type": "number"} }, "required": [ "statusCode", "message" ], - "$id": "https://example.com/ErrorResponse.schema.json" + "$id": "https://api.commercetools.com/ErrorResponse.schema.json" } diff --git a/json-schemas/EventBridgeDestination.schema.json b/json-schemas/EventBridgeDestination.schema.json new file mode 100644 index 00000000..1c33a16d --- /dev/null +++ b/json-schemas/EventBridgeDestination.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[AWS EventBridge](https://aws.amazon.com/eventbridge/) can be used to push events and messages to a serverless event bus that can forward them to AWS SQS, SNS, Lambda, and other AWS services based on forwarding rules.", + "additionalProperties": false, + "title": "EventBridgeDestination", + "type": "object", + "properties": { + "type": {"enum": ["EventBridge"]}, + "region": {"type": "string"}, + "accountId": {"type": "string"} + }, + "required": [ + "type", + "region", + "accountId" + ], + "$id": "https://api.commercetools.com/EventBridgeDestination.schema.json" +} diff --git a/json-schemas/Extension.schema.json b/json-schemas/Extension.schema.json index 0220a63e..0d9be96d 100644 --- a/json-schemas/Extension.schema.json +++ b/json-schemas/Extension.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Extension", "type": "object", @@ -13,10 +13,7 @@ "format": "date-time" }, "createdBy": {"$ref": "CreatedBy.schema.json"}, - "timeoutInMs": { - "type": "number", - "format": "integer" - }, + "timeoutInMs": {"type": "number"}, "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, "destination": {"$ref": "ExtensionDestination.schema.json"}, "id": {"type": "string"}, @@ -35,5 +32,5 @@ "destination", "triggers" ], - "$id": "https://example.com/Extension.schema.json" + "$id": "https://api.commercetools.com/Extension.schema.json" } diff --git a/json-schemas/ExtensionAWSLambdaDestination.schema.json b/json-schemas/ExtensionAWSLambdaDestination.schema.json deleted file mode 100644 index 2c25a01e..00000000 --- a/json-schemas/ExtensionAWSLambdaDestination.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "ExtensionAWSLambdaDestination", - "type": "object", - "properties": { - "type": {"enum": ["AWSLambda"]}, - "arn": {"type": "string"}, - "accessKey": {"type": "string"}, - "accessSecret": {"type": "string"} - }, - "required": [ - "type", - "arn", - "accessKey", - "accessSecret" - ], - "$id": "https://example.com/ExtensionAWSLambdaDestination.schema.json" -} diff --git a/json-schemas/ExtensionActionEnum.schema.json b/json-schemas/ExtensionActionEnum.schema.json index 3b6a86f7..c5e1cf0d 100644 --- a/json-schemas/ExtensionActionEnum.schema.json +++ b/json-schemas/ExtensionActionEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "An Extension gets called during any of the following requests of an API call, but before the result is persisted.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ExtensionAction", "type": "string", "enum": [ "Create", "Update" ], - "$id": "https://example.com/ExtensionActionEnum.schema.json" + "$id": "https://api.commercetools.com/ExtensionActionEnum.schema.json" } diff --git a/json-schemas/ExtensionAuthorizationHeaderAuthentication.schema.json b/json-schemas/ExtensionAuthorizationHeaderAuthentication.schema.json deleted file mode 100644 index 5658fa9e..00000000 --- a/json-schemas/ExtensionAuthorizationHeaderAuthentication.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "ExtensionAuthorizationHeaderAuthentication", - "type": "object", - "properties": { - "type": {"enum": ["AuthorizationHeader"]}, - "headerValue": {"type": "string"} - }, - "required": [ - "type", - "headerValue" - ], - "$id": "https://example.com/ExtensionAuthorizationHeaderAuthentication.schema.json" -} diff --git a/json-schemas/ExtensionAzureFunctionsAuthentication.schema.json b/json-schemas/ExtensionAzureFunctionsAuthentication.schema.json deleted file mode 100644 index bf2e9839..00000000 --- a/json-schemas/ExtensionAzureFunctionsAuthentication.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "ExtensionAzureFunctionsAuthentication", - "type": "object", - "properties": { - "type": {"enum": ["AzureFunctions"]}, - "key": {"type": "string"} - }, - "required": [ - "type", - "key" - ], - "$id": "https://example.com/ExtensionAzureFunctionsAuthentication.schema.json" -} diff --git a/json-schemas/ExtensionBadResponseError.schema.json b/json-schemas/ExtensionBadResponseError.schema.json index 5654eead..39d3e833 100644 --- a/json-schemas/ExtensionBadResponseError.schema.json +++ b/json-schemas/ExtensionBadResponseError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionBadResponseError", "type": "object", @@ -15,5 +23,5 @@ "message", "errorByExtension" ], - "$id": "https://example.com/ExtensionBadResponseError.schema.json" + "$id": "https://api.commercetools.com/ExtensionBadResponseError.schema.json" } diff --git a/json-schemas/ExtensionChangeDestinationAction.schema.json b/json-schemas/ExtensionChangeDestinationAction.schema.json index 5d7aa080..3c94a143 100644 --- a/json-schemas/ExtensionChangeDestinationAction.schema.json +++ b/json-schemas/ExtensionChangeDestinationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionChangeDestinationAction", "type": "object", @@ -11,5 +11,5 @@ "action", "destination" ], - "$id": "https://example.com/ExtensionChangeDestinationAction.schema.json" + "$id": "https://api.commercetools.com/ExtensionChangeDestinationAction.schema.json" } diff --git a/json-schemas/ExtensionChangeTriggersAction.schema.json b/json-schemas/ExtensionChangeTriggersAction.schema.json index 69b7826a..9f0a602a 100644 --- a/json-schemas/ExtensionChangeTriggersAction.schema.json +++ b/json-schemas/ExtensionChangeTriggersAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionChangeTriggersAction", "type": "object", @@ -14,5 +14,5 @@ "action", "triggers" ], - "$id": "https://example.com/ExtensionChangeTriggersAction.schema.json" + "$id": "https://api.commercetools.com/ExtensionChangeTriggersAction.schema.json" } diff --git a/json-schemas/ExtensionDestination.schema.json b/json-schemas/ExtensionDestination.schema.json index 76691407..ead56ed7 100644 --- a/json-schemas/ExtensionDestination.schema.json +++ b/json-schemas/ExtensionDestination.schema.json @@ -1,14 +1,18 @@ { "oneOf": [ - {"$ref": "https://example.com/ExtensionAWSLambdaDestination.schema.json"}, - {"$ref": "https://example.com/ExtensionHttpDestination.schema.json"} + {"$ref": "https://api.commercetools.com/AWSLambdaDestination.schema.json"}, + {"$ref": "https://api.commercetools.com/HttpDestination.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generic type for destinations.", "additionalProperties": false, "title": "ExtensionDestination", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "AWSLambda", + "HTTP" + ]}}, "required": ["type"], - "$id": "https://example.com/ExtensionDestination.schema.json", + "$id": "https://api.commercetools.com/ExtensionDestination.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ExtensionDraft.schema.json b/json-schemas/ExtensionDraft.schema.json index 901bdb7d..52a6e4be 100644 --- a/json-schemas/ExtensionDraft.schema.json +++ b/json-schemas/ExtensionDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionDraft", "type": "object", @@ -10,14 +10,11 @@ "items": {"$ref": "ExtensionTrigger.schema.json"} }, "key": {"type": "string"}, - "timeoutInMs": { - "type": "number", - "format": "integer" - } + "timeoutInMs": {"type": "number"} }, "required": [ "destination", "triggers" ], - "$id": "https://example.com/ExtensionDraft.schema.json" + "$id": "https://api.commercetools.com/ExtensionDraft.schema.json" } diff --git a/json-schemas/ExtensionHttpDestination.schema.json b/json-schemas/ExtensionHttpDestination.schema.json deleted file mode 100644 index 11ea25cf..00000000 --- a/json-schemas/ExtensionHttpDestination.schema.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "ExtensionHttpDestination", - "type": "object", - "properties": { - "type": {"enum": ["HTTP"]}, - "url": {"type": "string"}, - "authentication": {"$ref": "ExtensionHttpDestinationAuthentication.schema.json"} - }, - "required": [ - "type", - "url" - ], - "$id": "https://example.com/ExtensionHttpDestination.schema.json" -} diff --git a/json-schemas/ExtensionHttpDestinationAuthentication.schema.json b/json-schemas/ExtensionHttpDestinationAuthentication.schema.json deleted file mode 100644 index 104d5fc3..00000000 --- a/json-schemas/ExtensionHttpDestinationAuthentication.schema.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "oneOf": [ - {"$ref": "https://example.com/ExtensionAuthorizationHeaderAuthentication.schema.json"}, - {"$ref": "https://example.com/ExtensionAzureFunctionsAuthentication.schema.json"} - ], - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "ExtensionHttpDestinationAuthentication", - "type": "object", - "properties": {"type": {"type": "string"}}, - "required": ["type"], - "$id": "https://example.com/ExtensionHttpDestinationAuthentication.schema.json", - "discriminator": {"propertyName": "type"} -} diff --git a/json-schemas/ExtensionInput.schema.json b/json-schemas/ExtensionInput.schema.json index 377c20f6..9a88295c 100644 --- a/json-schemas/ExtensionInput.schema.json +++ b/json-schemas/ExtensionInput.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionInput", "type": "object", @@ -11,5 +11,5 @@ "action", "resource" ], - "$id": "https://example.com/ExtensionInput.schema.json" + "$id": "https://api.commercetools.com/ExtensionInput.schema.json" } diff --git a/json-schemas/ExtensionNoResponseError.schema.json b/json-schemas/ExtensionNoResponseError.schema.json index 9e4dd196..e09a4841 100644 --- a/json-schemas/ExtensionNoResponseError.schema.json +++ b/json-schemas/ExtensionNoResponseError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionNoResponseError", "type": "object", @@ -14,5 +22,5 @@ "message", "extensionId" ], - "$id": "https://example.com/ExtensionNoResponseError.schema.json" + "$id": "https://api.commercetools.com/ExtensionNoResponseError.schema.json" } diff --git a/json-schemas/ExtensionPagedQueryResponse.schema.json b/json-schemas/ExtensionPagedQueryResponse.schema.json index d75f13b1..2b31cdd0 100644 --- a/json-schemas/ExtensionPagedQueryResponse.schema.json +++ b/json-schemas/ExtensionPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [Extension](ctp:api:type:Extension).", "additionalProperties": false, "title": "ExtensionPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ExtensionPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ExtensionPagedQueryResponse.schema.json" } diff --git a/json-schemas/ExtensionResourceTypeIdEnum.schema.json b/json-schemas/ExtensionResourceTypeIdEnum.schema.json index 5346ba4f..a78145d5 100644 --- a/json-schemas/ExtensionResourceTypeIdEnum.schema.json +++ b/json-schemas/ExtensionResourceTypeIdEnum.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Extensions are available for:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ExtensionResourceTypeId", "type": "string", "enum": [ @@ -8,5 +9,5 @@ "payment", "customer" ], - "$id": "https://example.com/ExtensionResourceTypeIdEnum.schema.json" + "$id": "https://api.commercetools.com/ExtensionResourceTypeIdEnum.schema.json" } diff --git a/json-schemas/ExtensionSetKeyAction.schema.json b/json-schemas/ExtensionSetKeyAction.schema.json index 85209f9d..c8370bc6 100644 --- a/json-schemas/ExtensionSetKeyAction.schema.json +++ b/json-schemas/ExtensionSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ExtensionSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ExtensionSetKeyAction.schema.json" } diff --git a/json-schemas/ExtensionSetTimeoutInMsAction.schema.json b/json-schemas/ExtensionSetTimeoutInMsAction.schema.json index 6be06527..7940ed74 100644 --- a/json-schemas/ExtensionSetTimeoutInMsAction.schema.json +++ b/json-schemas/ExtensionSetTimeoutInMsAction.schema.json @@ -1,15 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionSetTimeoutInMsAction", "type": "object", "properties": { "action": {"enum": ["setTimeoutInMs"]}, - "timeoutInMs": { - "type": "number", - "format": "integer" - } + "timeoutInMs": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/ExtensionSetTimeoutInMsAction.schema.json" + "$id": "https://api.commercetools.com/ExtensionSetTimeoutInMsAction.schema.json" } diff --git a/json-schemas/ExtensionTrigger.schema.json b/json-schemas/ExtensionTrigger.schema.json index 78dd3483..76653e49 100644 --- a/json-schemas/ExtensionTrigger.schema.json +++ b/json-schemas/ExtensionTrigger.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionTrigger", "type": "object", @@ -8,11 +8,12 @@ "type": "array", "items": {"$ref": "ExtensionActionEnum.schema.json"} }, + "condition": {"type": "string"}, "resourceTypeId": {"$ref": "ExtensionResourceTypeIdEnum.schema.json"} }, "required": [ "resourceTypeId", "actions" ], - "$id": "https://example.com/ExtensionTrigger.schema.json" + "$id": "https://api.commercetools.com/ExtensionTrigger.schema.json" } diff --git a/json-schemas/ExtensionUpdate.schema.json b/json-schemas/ExtensionUpdate.schema.json index 22639a7c..e2e90c03 100644 --- a/json-schemas/ExtensionUpdate.schema.json +++ b/json-schemas/ExtensionUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ExtensionUpdate.schema.json" + "$id": "https://api.commercetools.com/ExtensionUpdate.schema.json" } diff --git a/json-schemas/ExtensionUpdateAction.schema.json b/json-schemas/ExtensionUpdateAction.schema.json index b8305772..aeb9ed51 100644 --- a/json-schemas/ExtensionUpdateAction.schema.json +++ b/json-schemas/ExtensionUpdateAction.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/ExtensionChangeDestinationAction.schema.json"}, - {"$ref": "https://example.com/ExtensionChangeTriggersAction.schema.json"}, - {"$ref": "https://example.com/ExtensionSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ExtensionSetTimeoutInMsAction.schema.json"} + {"$ref": "https://api.commercetools.com/ExtensionChangeDestinationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionChangeTriggersAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ExtensionSetTimeoutInMsAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeDestination", + "changeTriggers", + "setKey", + "setTimeoutInMs" + ]}}, "required": ["action"], - "$id": "https://example.com/ExtensionUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ExtensionUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ExtensionUpdateActionsFailedError.schema.json b/json-schemas/ExtensionUpdateActionsFailedError.schema.json index d32b8693..9e4f8e63 100644 --- a/json-schemas/ExtensionUpdateActionsFailedError.schema.json +++ b/json-schemas/ExtensionUpdateActionsFailedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExtensionUpdateActionsFailedError", "type": "object", @@ -15,5 +23,5 @@ "message", "errorByExtension" ], - "$id": "https://example.com/ExtensionUpdateActionsFailedError.schema.json" + "$id": "https://api.commercetools.com/ExtensionUpdateActionsFailedError.schema.json" } diff --git a/json-schemas/ExternalLineItemTotalPrice.schema.json b/json-schemas/ExternalLineItemTotalPrice.schema.json index a995648e..2ee954e5 100644 --- a/json-schemas/ExternalLineItemTotalPrice.schema.json +++ b/json-schemas/ExternalLineItemTotalPrice.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExternalLineItemTotalPrice", "type": "object", @@ -11,5 +11,5 @@ "price", "totalPrice" ], - "$id": "https://example.com/ExternalLineItemTotalPrice.schema.json" + "$id": "https://api.commercetools.com/ExternalLineItemTotalPrice.schema.json" } diff --git a/json-schemas/ExternalOAuth.schema.json b/json-schemas/ExternalOAuth.schema.json index 9ba2d748..2a85860c 100644 --- a/json-schemas/ExternalOAuth.schema.json +++ b/json-schemas/ExternalOAuth.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Represents a RFC 7662 compliant [OAuth 2.0 Token Introspection](https://datatracker.ietf.org/doc/html/rfc7662) endpoint. For more information, see [Requesting an access token using an external OAuth 2.0 server](/../api/authorization#requesting-an-access-token-using-an-external-oauth-server).\n\nYou can only configure **one** external OAuth 2.0 endpoint per Project. To authenticate using multiple external services (such as social network logins), use a middle layer authentication service.", "additionalProperties": false, "title": "ExternalOAuth", "type": "object", @@ -11,5 +12,5 @@ "url", "authorizationHeader" ], - "$id": "https://example.com/ExternalOAuth.schema.json" + "$id": "https://api.commercetools.com/ExternalOAuth.schema.json" } diff --git a/json-schemas/ExternalOAuthFailedError.schema.json b/json-schemas/ExternalOAuthFailedError.schema.json index 6150e52e..463b38c4 100644 --- a/json-schemas/ExternalOAuthFailedError.schema.json +++ b/json-schemas/ExternalOAuthFailedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExternalOAuthFailedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/ExternalOAuthFailedError.schema.json" + "$id": "https://api.commercetools.com/ExternalOAuthFailedError.schema.json" } diff --git a/json-schemas/ExternalTaxAmountDraft.schema.json b/json-schemas/ExternalTaxAmountDraft.schema.json index 9afb0758..7554ad35 100644 --- a/json-schemas/ExternalTaxAmountDraft.schema.json +++ b/json-schemas/ExternalTaxAmountDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExternalTaxAmountDraft", "type": "object", @@ -11,5 +11,5 @@ "totalGross", "taxRate" ], - "$id": "https://example.com/ExternalTaxAmountDraft.schema.json" + "$id": "https://api.commercetools.com/ExternalTaxAmountDraft.schema.json" } diff --git a/json-schemas/ExternalTaxRateDraft.schema.json b/json-schemas/ExternalTaxRateDraft.schema.json index baea6330..4b71b8f3 100644 --- a/json-schemas/ExternalTaxRateDraft.schema.json +++ b/json-schemas/ExternalTaxRateDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ExternalTaxRateDraft", "type": "object", @@ -18,5 +18,5 @@ "name", "country" ], - "$id": "https://example.com/ExternalTaxRateDraft.schema.json" + "$id": "https://api.commercetools.com/ExternalTaxRateDraft.schema.json" } diff --git a/json-schemas/FacetResultRange.schema.json b/json-schemas/FacetRange.schema.json similarity index 78% rename from json-schemas/FacetResultRange.schema.json rename to json-schemas/FacetRange.schema.json index 6f42f556..8163995c 100644 --- a/json-schemas/FacetResultRange.schema.json +++ b/json-schemas/FacetRange.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "FacetResultRange", + "title": "FacetRange", "type": "object", "properties": { "toStr": {"type": "string"}, @@ -26,5 +26,5 @@ "max", "mean" ], - "$id": "https://example.com/FacetResultRange.schema.json" + "$id": "https://api.commercetools.com/FacetRange.schema.json" } diff --git a/json-schemas/FacetResult.schema.json b/json-schemas/FacetResult.schema.json index 9e930f32..b53481d8 100644 --- a/json-schemas/FacetResult.schema.json +++ b/json-schemas/FacetResult.schema.json @@ -1,15 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/FilteredFacetResult.schema.json"}, - {"$ref": "https://example.com/RangeFacetResult.schema.json"}, - {"$ref": "https://example.com/TermFacetResult.schema.json"} + {"$ref": "https://api.commercetools.com/FilteredFacetResult.schema.json"}, + {"$ref": "https://api.commercetools.com/RangeFacetResult.schema.json"}, + {"$ref": "https://api.commercetools.com/TermFacetResult.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FacetResult", "type": "object", - "properties": {"type": {"$ref": "FacetTypesEnum.schema.json"}}, + "properties": {"type": {"enum": [ + "filter", + "range", + "terms" + ]}}, "required": ["type"], - "$id": "https://example.com/FacetResult.schema.json", + "$id": "https://api.commercetools.com/FacetResult.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/FacetResults.schema.json b/json-schemas/FacetResults.schema.json index f50cc43f..8181c9c2 100644 --- a/json-schemas/FacetResults.schema.json +++ b/json-schemas/FacetResults.schema.json @@ -1,9 +1,9 @@ { "patternProperties": {"^[a-z].*$": {"$ref": "FacetResult.schema.json"}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FacetResults", "type": "object", "properties": {}, - "$id": "https://example.com/FacetResults.schema.json" + "$id": "https://api.commercetools.com/FacetResults.schema.json" } diff --git a/json-schemas/FacetResultTerm.schema.json b/json-schemas/FacetTerm.schema.json similarity index 68% rename from json-schemas/FacetResultTerm.schema.json rename to json-schemas/FacetTerm.schema.json index 3a62cd1c..36d5d225 100644 --- a/json-schemas/FacetResultTerm.schema.json +++ b/json-schemas/FacetTerm.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "FacetResultTerm", + "title": "FacetTerm", "type": "object", "properties": { "count": {"type": "number"}, @@ -19,5 +19,5 @@ "term", "count" ], - "$id": "https://example.com/FacetResultTerm.schema.json" + "$id": "https://api.commercetools.com/FacetTerm.schema.json" } diff --git a/json-schemas/FacetTypesEnum.schema.json b/json-schemas/FacetTypesEnum.schema.json index df59c533..0a4771aa 100644 --- a/json-schemas/FacetTypesEnum.schema.json +++ b/json-schemas/FacetTypesEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "FacetTypes", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "range", "filter" ], - "$id": "https://example.com/FacetTypesEnum.schema.json" + "$id": "https://api.commercetools.com/FacetTypesEnum.schema.json" } diff --git a/json-schemas/FeatureRemovedError.schema.json b/json-schemas/FeatureRemovedError.schema.json index c3def859..eafd04f2 100644 --- a/json-schemas/FeatureRemovedError.schema.json +++ b/json-schemas/FeatureRemovedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FeatureRemovedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/FeatureRemovedError.schema.json" + "$id": "https://api.commercetools.com/FeatureRemovedError.schema.json" } diff --git a/json-schemas/FieldContainer.schema.json b/json-schemas/FieldContainer.schema.json index 3051cb35..694c7bef 100644 --- a/json-schemas/FieldContainer.schema.json +++ b/json-schemas/FieldContainer.schema.json @@ -1,5 +1,5 @@ { - "patternProperties": {"": {"type": [ + "patternProperties": {"^[a-zA-Z0-9_-]{2,36}$": {"type": [ "number", "string", "boolean", @@ -7,10 +7,10 @@ "array", "null" ]}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FieldContainer", "type": "object", "properties": {}, - "$id": "https://example.com/FieldContainer.schema.json" + "$id": "https://api.commercetools.com/FieldContainer.schema.json" } diff --git a/json-schemas/FieldDefinition.schema.json b/json-schemas/FieldDefinition.schema.json index 510bbbcb..916fe4f3 100644 --- a/json-schemas/FieldDefinition.schema.json +++ b/json-schemas/FieldDefinition.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Defines a [Custom Field](/../api/projects/custom-fields) and its meta-information.\nThis FieldDefinition is similar to an [AttributeDefinition](ctp:api:type:AttributeDefinition) of [Product Types](/../api/projects/productTypes).", "additionalProperties": false, "title": "FieldDefinition", "type": "object", @@ -16,5 +17,5 @@ "label", "required" ], - "$id": "https://example.com/FieldDefinition.schema.json" + "$id": "https://api.commercetools.com/FieldDefinition.schema.json" } diff --git a/json-schemas/FieldType.schema.json b/json-schemas/FieldType.schema.json index f9333078..a7028e0f 100644 --- a/json-schemas/FieldType.schema.json +++ b/json-schemas/FieldType.schema.json @@ -1,13 +1,37 @@ { "oneOf": [ - { "$ref": "https://example.com/CustomFieldBooleanType.schema.json" } + {"$ref": "https://api.commercetools.com/CustomFieldBooleanType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldDateTimeType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldDateType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldEnumType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldLocalizedEnumType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldLocalizedStringType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldMoneyType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldNumberType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldReferenceType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldSetType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldStringType.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomFieldTimeType.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FieldType", "type": "object", - "properties": { "name": { "type": "string" } }, + "properties": {"name": {"enum": [ + "Boolean", + "DateTime", + "Date", + "Enum", + "LocalizedEnum", + "LocalizedString", + "Money", + "Number", + "Reference", + "Set", + "String", + "Time" + ]}}, "required": ["name"], - "$id": "https://example.com/FieldType.schema.json", - "discriminator": { "propertyName": "name" } + "$id": "https://api.commercetools.com/FieldType.schema.json", + "discriminator": {"propertyName": "name"} } diff --git a/json-schemas/FilteredFacetResult.schema.json b/json-schemas/FilteredFacetResult.schema.json index 1f4b2ad0..bb9175eb 100644 --- a/json-schemas/FilteredFacetResult.schema.json +++ b/json-schemas/FilteredFacetResult.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "FilteredFacetResult", "type": "object", @@ -12,5 +12,5 @@ "type", "count" ], - "$id": "https://example.com/FilteredFacetResult.schema.json" + "$id": "https://api.commercetools.com/FilteredFacetResult.schema.json" } diff --git a/json-schemas/GeneralError.schema.json b/json-schemas/GeneralError.schema.json index 888a87fb..e30f4ead 100644 --- a/json-schemas/GeneralError.schema.json +++ b/json-schemas/GeneralError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GeneralError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/GeneralError.schema.json" + "$id": "https://api.commercetools.com/GeneralError.schema.json" } diff --git a/json-schemas/GeoJson.schema.json b/json-schemas/GeoJson.schema.json index d4599a18..d17c57d6 100644 --- a/json-schemas/GeoJson.schema.json +++ b/json-schemas/GeoJson.schema.json @@ -1,11 +1,12 @@ { - "oneOf": [{"$ref": "https://example.com/GeoJsonPoint.schema.json"}], - "$schema": "http://json-schema.org/draft-07/schema#", + "oneOf": [{"$ref": "https://api.commercetools.com/GeoJsonPoint.schema.json"}], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "GeoJSON Geometry represents a [Geometry Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1) as defined in the GeoJSON standard.", "additionalProperties": false, "title": "GeoJson", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": ["Point"]}}, "required": ["type"], - "$id": "https://example.com/GeoJson.schema.json", + "$id": "https://api.commercetools.com/GeoJson.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/GeoJsonPoint.schema.json b/json-schemas/GeoJsonPoint.schema.json index e8798e38..1a72d8f4 100644 --- a/json-schemas/GeoJsonPoint.schema.json +++ b/json-schemas/GeoJsonPoint.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GeoJsonPoint", "type": "object", @@ -14,5 +14,5 @@ "type", "coordinates" ], - "$id": "https://example.com/GeoJsonPoint.schema.json" + "$id": "https://api.commercetools.com/GeoJsonPoint.schema.json" } diff --git a/json-schemas/GoogleCloudPubSubDestination.schema.json b/json-schemas/GoogleCloudPubSubDestination.schema.json index dda56583..86a90b83 100644 --- a/json-schemas/GoogleCloudPubSubDestination.schema.json +++ b/json-schemas/GoogleCloudPubSubDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GoogleCloudPubSubDestination", "type": "object", @@ -13,5 +13,5 @@ "projectId", "topic" ], - "$id": "https://example.com/GoogleCloudPubSubDestination.schema.json" + "$id": "https://api.commercetools.com/GoogleCloudPubSubDestination.schema.json" } diff --git a/json-schemas/GraphQLError.schema.json b/json-schemas/GraphQLError.schema.json index c9b4b207..e62ca06a 100644 --- a/json-schemas/GraphQLError.schema.json +++ b/json-schemas/GraphQLError.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GraphQLError", "type": "object", @@ -26,5 +26,5 @@ "locations", "path" ], - "$id": "https://example.com/GraphQLError.schema.json" + "$id": "https://api.commercetools.com/GraphQLError.schema.json" } diff --git a/json-schemas/GraphQLErrorLocation.schema.json b/json-schemas/GraphQLErrorLocation.schema.json index 2fdd472c..d8b3742d 100644 --- a/json-schemas/GraphQLErrorLocation.schema.json +++ b/json-schemas/GraphQLErrorLocation.schema.json @@ -1,21 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GraphQLErrorLocation", "type": "object", "properties": { - "column": { - "type": "number", - "format": "integer" - }, - "line": { - "type": "number", - "format": "integer" - } + "column": {"type": "number"}, + "line": {"type": "number"} }, "required": [ "line", "column" ], - "$id": "https://example.com/GraphQLErrorLocation.schema.json" + "$id": "https://api.commercetools.com/GraphQLErrorLocation.schema.json" } diff --git a/json-schemas/GraphQLRequest.schema.json b/json-schemas/GraphQLRequest.schema.json index db57de71..de5d273d 100644 --- a/json-schemas/GraphQLRequest.schema.json +++ b/json-schemas/GraphQLRequest.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GraphQLRequest", "type": "object", @@ -9,5 +9,5 @@ "query": {"type": "string"} }, "required": ["query"], - "$id": "https://example.com/GraphQLRequest.schema.json" + "$id": "https://api.commercetools.com/GraphQLRequest.schema.json" } diff --git a/json-schemas/GraphQLResponse.schema.json b/json-schemas/GraphQLResponse.schema.json index 499a56eb..1932e551 100644 --- a/json-schemas/GraphQLResponse.schema.json +++ b/json-schemas/GraphQLResponse.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "GraphQLResponse", "type": "object", "properties": { @@ -17,5 +17,5 @@ "items": {"$ref": "GraphQLError.schema.json"} } }, - "$id": "https://example.com/GraphQLResponse.schema.json" + "$id": "https://api.commercetools.com/GraphQLResponse.schema.json" } diff --git a/json-schemas/GraphQLVariablesMap.schema.json b/json-schemas/GraphQLVariablesMap.schema.json index d8a20b8d..26b26250 100644 --- a/json-schemas/GraphQLVariablesMap.schema.json +++ b/json-schemas/GraphQLVariablesMap.schema.json @@ -7,10 +7,10 @@ "array", "null" ]}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "GraphQLVariablesMap", "type": "object", "properties": {}, - "$id": "https://example.com/GraphQLVariablesMap.schema.json" + "$id": "https://api.commercetools.com/GraphQLVariablesMap.schema.json" } diff --git a/json-schemas/HighPrecisionMoney.schema.json b/json-schemas/HighPrecisionMoney.schema.json index ae9d8626..f3e052db 100644 --- a/json-schemas/HighPrecisionMoney.schema.json +++ b/json-schemas/HighPrecisionMoney.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Money object that stores an amount of a fraction of the smallest indivisible unit of the specified currency.", "additionalProperties": false, "title": "HighPrecisionMoney", "type": "object", @@ -11,11 +12,11 @@ "preciseAmount": {"type": "number"} }, "required": [ - "type", - "fractionDigits", "centAmount", "currencyCode", + "type", + "fractionDigits", "preciseAmount" ], - "$id": "https://example.com/HighPrecisionMoney.schema.json" + "$id": "https://api.commercetools.com/HighPrecisionMoney.schema.json" } diff --git a/json-schemas/HighPrecisionMoneyDraft.schema.json b/json-schemas/HighPrecisionMoneyDraft.schema.json index 45a4d7f4..6512f690 100644 --- a/json-schemas/HighPrecisionMoneyDraft.schema.json +++ b/json-schemas/HighPrecisionMoneyDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Money draft object to store an amount of a fraction of the smallest indivisible unit of the specified currency.", "additionalProperties": false, "title": "HighPrecisionMoneyDraft", "type": "object", @@ -11,10 +12,10 @@ "preciseAmount": {"type": "number"} }, "required": [ - "centAmount", "currencyCode", "type", + "fractionDigits", "preciseAmount" ], - "$id": "https://example.com/HighPrecisionMoneyDraft.schema.json" + "$id": "https://api.commercetools.com/HighPrecisionMoneyDraft.schema.json" } diff --git a/json-schemas/Hit.schema.json b/json-schemas/Hit.schema.json new file mode 100644 index 00000000..b85f6e64 --- /dev/null +++ b/json-schemas/Hit.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "Hit", + "type": "object", + "properties": { + "version": {"type": "number"}, + "relevance": {"type": "number"}, + "id": {"type": "string"} + }, + "required": [ + "id", + "version", + "relevance" + ], + "$id": "https://api.commercetools.com/Hit.schema.json" +} diff --git a/json-schemas/HttpDestination.schema.json b/json-schemas/HttpDestination.schema.json new file mode 100644 index 00000000..659a2c62 --- /dev/null +++ b/json-schemas/HttpDestination.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "We recommend an encrypted `HTTPS` connection for production setups. However, we also accept unencrypted `HTTP` connections for development purposes. HTTP redirects will not be followed and cache headers will be ignored.", + "additionalProperties": false, + "title": "HttpDestination", + "type": "object", + "properties": { + "type": {"enum": ["HTTP"]}, + "url": {"type": "string"}, + "authentication": {"$ref": "HttpDestinationAuthentication.schema.json"} + }, + "required": [ + "type", + "url" + ], + "$id": "https://api.commercetools.com/HttpDestination.schema.json" +} diff --git a/json-schemas/HttpDestinationAuthentication.schema.json b/json-schemas/HttpDestinationAuthentication.schema.json new file mode 100644 index 00000000..f14bcea3 --- /dev/null +++ b/json-schemas/HttpDestinationAuthentication.schema.json @@ -0,0 +1,17 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/AuthorizationHeaderAuthentication.schema.json"}, + {"$ref": "https://api.commercetools.com/AzureFunctionsAuthentication.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "HttpDestinationAuthentication", + "type": "object", + "properties": {"type": {"enum": [ + "AuthorizationHeader", + "AzureFunctions" + ]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/HttpDestinationAuthentication.schema.json", + "discriminator": {"propertyName": "type"} +} diff --git a/json-schemas/Image.schema.json b/json-schemas/Image.schema.json index ef1805e9..428e0675 100644 --- a/json-schemas/Image.schema.json +++ b/json-schemas/Image.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Image", "type": "object", @@ -12,5 +12,5 @@ "url", "dimensions" ], - "$id": "https://example.com/Image.schema.json" + "$id": "https://api.commercetools.com/Image.schema.json" } diff --git a/json-schemas/ImageDimensions.schema.json b/json-schemas/ImageDimensions.schema.json index da312e0d..3134e4bd 100644 --- a/json-schemas/ImageDimensions.schema.json +++ b/json-schemas/ImageDimensions.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ImageDimensions", "type": "object", @@ -11,5 +11,5 @@ "w", "h" ], - "$id": "https://example.com/ImageDimensions.schema.json" + "$id": "https://api.commercetools.com/ImageDimensions.schema.json" } diff --git a/json-schemas/IndividualProductSelectionType.schema.json b/json-schemas/IndividualProductSelectionType.schema.json new file mode 100644 index 00000000..10b5b6bd --- /dev/null +++ b/json-schemas/IndividualProductSelectionType.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "IndividualProductSelectionType", + "type": "object", + "properties": { + "type": {"enum": ["individual"]}, + "name": {"$ref": "LocalizedString.schema.json"} + }, + "required": [ + "type", + "name" + ], + "$id": "https://api.commercetools.com/IndividualProductSelectionType.schema.json" +} diff --git a/json-schemas/InsufficientScopeError.schema.json b/json-schemas/InsufficientScopeError.schema.json index 7adcc6c8..d6fadf29 100644 --- a/json-schemas/InsufficientScopeError.schema.json +++ b/json-schemas/InsufficientScopeError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InsufficientScopeError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InsufficientScopeError.schema.json" + "$id": "https://api.commercetools.com/InsufficientScopeError.schema.json" } diff --git a/json-schemas/InternalConstraintViolatedError.schema.json b/json-schemas/InternalConstraintViolatedError.schema.json index 966a48ab..73872e14 100644 --- a/json-schemas/InternalConstraintViolatedError.schema.json +++ b/json-schemas/InternalConstraintViolatedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InternalConstraintViolatedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InternalConstraintViolatedError.schema.json" + "$id": "https://api.commercetools.com/InternalConstraintViolatedError.schema.json" } diff --git a/json-schemas/InvalidCredentialsError.schema.json b/json-schemas/InvalidCredentialsError.schema.json index 9e4a55bb..e11f327d 100644 --- a/json-schemas/InvalidCredentialsError.schema.json +++ b/json-schemas/InvalidCredentialsError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidCredentialsError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidCredentialsError.schema.json" + "$id": "https://api.commercetools.com/InvalidCredentialsError.schema.json" } diff --git a/json-schemas/InvalidCurrentPasswordError.schema.json b/json-schemas/InvalidCurrentPasswordError.schema.json index 17a9212c..071d9705 100644 --- a/json-schemas/InvalidCurrentPasswordError.schema.json +++ b/json-schemas/InvalidCurrentPasswordError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidCurrentPasswordError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidCurrentPasswordError.schema.json" + "$id": "https://api.commercetools.com/InvalidCurrentPasswordError.schema.json" } diff --git a/json-schemas/InvalidFieldError.schema.json b/json-schemas/InvalidFieldError.schema.json index ef3cd38b..7a7c3d7b 100644 --- a/json-schemas/InvalidFieldError.schema.json +++ b/json-schemas/InvalidFieldError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidFieldError", "type": "object", @@ -33,5 +41,5 @@ "field", "invalidValue" ], - "$id": "https://example.com/InvalidFieldError.schema.json" + "$id": "https://api.commercetools.com/InvalidFieldError.schema.json" } diff --git a/json-schemas/InvalidInputError.schema.json b/json-schemas/InvalidInputError.schema.json index 64f95fe7..0a96eb7f 100644 --- a/json-schemas/InvalidInputError.schema.json +++ b/json-schemas/InvalidInputError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidInputError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidInputError.schema.json" + "$id": "https://api.commercetools.com/InvalidInputError.schema.json" } diff --git a/json-schemas/InvalidItemShippingDetailsError.schema.json b/json-schemas/InvalidItemShippingDetailsError.schema.json index 8e94ccde..d57a9f37 100644 --- a/json-schemas/InvalidItemShippingDetailsError.schema.json +++ b/json-schemas/InvalidItemShippingDetailsError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidItemShippingDetailsError", "type": "object", @@ -15,5 +23,5 @@ "subject", "itemId" ], - "$id": "https://example.com/InvalidItemShippingDetailsError.schema.json" + "$id": "https://api.commercetools.com/InvalidItemShippingDetailsError.schema.json" } diff --git a/json-schemas/InvalidJsonInputError.schema.json b/json-schemas/InvalidJsonInputError.schema.json index 1cf8f673..3a288ff7 100644 --- a/json-schemas/InvalidJsonInputError.schema.json +++ b/json-schemas/InvalidJsonInputError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidJsonInputError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidJsonInputError.schema.json" + "$id": "https://api.commercetools.com/InvalidJsonInputError.schema.json" } diff --git a/json-schemas/InvalidOperationError.schema.json b/json-schemas/InvalidOperationError.schema.json index 20088003..613b7903 100644 --- a/json-schemas/InvalidOperationError.schema.json +++ b/json-schemas/InvalidOperationError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidOperationError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidOperationError.schema.json" + "$id": "https://api.commercetools.com/InvalidOperationError.schema.json" } diff --git a/json-schemas/InvalidSubjectError.schema.json b/json-schemas/InvalidSubjectError.schema.json index 3144c7dd..ef3880b8 100644 --- a/json-schemas/InvalidSubjectError.schema.json +++ b/json-schemas/InvalidSubjectError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidSubjectError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidSubjectError.schema.json" + "$id": "https://api.commercetools.com/InvalidSubjectError.schema.json" } diff --git a/json-schemas/InvalidTokenError.schema.json b/json-schemas/InvalidTokenError.schema.json index 927dff8c..d599fe5a 100644 --- a/json-schemas/InvalidTokenError.schema.json +++ b/json-schemas/InvalidTokenError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InvalidTokenError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/InvalidTokenError.schema.json" + "$id": "https://api.commercetools.com/InvalidTokenError.schema.json" } diff --git a/json-schemas/InventoryEntry.schema.json b/json-schemas/InventoryEntry.schema.json index b7e50232..aa9dc0dd 100644 --- a/json-schemas/InventoryEntry.schema.json +++ b/json-schemas/InventoryEntry.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntry", "type": "object", @@ -23,9 +23,10 @@ "format": "date-time" }, "createdBy": {"$ref": "CreatedBy.schema.json"}, - "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"}, + "supplyChannel": {"$ref": "ChannelReference.schema.json"}, "id": {"type": "string"}, - "sku": {"type": "string"} + "sku": {"type": "string"}, + "key": {"type": "string"} }, "required": [ "id", @@ -36,5 +37,5 @@ "quantityOnStock", "availableQuantity" ], - "$id": "https://example.com/InventoryEntry.schema.json" + "$id": "https://api.commercetools.com/InventoryEntry.schema.json" } diff --git a/json-schemas/InventoryEntryAddQuantityAction.schema.json b/json-schemas/InventoryEntryAddQuantityAction.schema.json index 0afbfacb..06544d77 100644 --- a/json-schemas/InventoryEntryAddQuantityAction.schema.json +++ b/json-schemas/InventoryEntryAddQuantityAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates `availableQuantity` based on the new `quantityOnStock` and amount of active reservations.", "additionalProperties": false, "title": "InventoryEntryAddQuantityAction", "type": "object", @@ -11,5 +12,5 @@ "action", "quantity" ], - "$id": "https://example.com/InventoryEntryAddQuantityAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryAddQuantityAction.schema.json" } diff --git a/json-schemas/InventoryEntryChangeQuantityAction.schema.json b/json-schemas/InventoryEntryChangeQuantityAction.schema.json index 599f039d..9b3e7848 100644 --- a/json-schemas/InventoryEntryChangeQuantityAction.schema.json +++ b/json-schemas/InventoryEntryChangeQuantityAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates `availableQuantity` based on the new `quantityOnStock` and amount of active reservations.", "additionalProperties": false, "title": "InventoryEntryChangeQuantityAction", "type": "object", @@ -11,5 +12,5 @@ "action", "quantity" ], - "$id": "https://example.com/InventoryEntryChangeQuantityAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryChangeQuantityAction.schema.json" } diff --git a/json-schemas/InventoryEntryCreatedMessage.schema.json b/json-schemas/InventoryEntryCreatedMessage.schema.json index 02477c4f..63a48629 100644 --- a/json-schemas/InventoryEntryCreatedMessage.schema.json +++ b/json-schemas/InventoryEntryCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "inventoryEntry" ], - "$id": "https://example.com/InventoryEntryCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryCreatedMessage.schema.json" } diff --git a/json-schemas/InventoryEntryCreatedMessagePayload.schema.json b/json-schemas/InventoryEntryCreatedMessagePayload.schema.json index 03120958..428d6945 100644 --- a/json-schemas/InventoryEntryCreatedMessagePayload.schema.json +++ b/json-schemas/InventoryEntryCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "inventoryEntry" ], - "$id": "https://example.com/InventoryEntryCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryCreatedMessagePayload.schema.json" } diff --git a/json-schemas/InventoryEntryDeletedMessage.schema.json b/json-schemas/InventoryEntryDeletedMessage.schema.json index 26e7f7a8..71b621bb 100644 --- a/json-schemas/InventoryEntryDeletedMessage.schema.json +++ b/json-schemas/InventoryEntryDeletedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryDeletedMessage", "type": "object", @@ -33,8 +33,7 @@ "resource", "resourceVersion", "type", - "sku", - "supplyChannel" + "sku" ], - "$id": "https://example.com/InventoryEntryDeletedMessage.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryDeletedMessage.schema.json" } diff --git a/json-schemas/InventoryEntryDeletedMessagePayload.schema.json b/json-schemas/InventoryEntryDeletedMessagePayload.schema.json index 9b53cd07..fb151d1e 100644 --- a/json-schemas/InventoryEntryDeletedMessagePayload.schema.json +++ b/json-schemas/InventoryEntryDeletedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryDeletedMessagePayload", "type": "object", @@ -10,8 +10,7 @@ }, "required": [ "type", - "sku", - "supplyChannel" + "sku" ], - "$id": "https://example.com/InventoryEntryDeletedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryDeletedMessagePayload.schema.json" } diff --git a/json-schemas/InventoryEntryDraft.schema.json b/json-schemas/InventoryEntryDraft.schema.json index ffed253a..3938126b 100644 --- a/json-schemas/InventoryEntryDraft.schema.json +++ b/json-schemas/InventoryEntryDraft.schema.json @@ -1,22 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryDraft", "type": "object", "properties": { - "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"}, - "sku": {"type": "string"}, - "restockableInDays": {"type": "number"}, "expectedDelivery": { "type": "string", "format": "date-time" }, "quantityOnStock": {"type": "number"}, - "custom": {"$ref": "CustomFieldsDraft.schema.json"} + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, + "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"}, + "sku": {"type": "string"}, + "restockableInDays": {"type": "number"}, + "key": {"type": "string"} }, "required": [ "sku", "quantityOnStock" ], - "$id": "https://example.com/InventoryEntryDraft.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryDraft.schema.json" } diff --git a/json-schemas/InventoryEntryQuantitySetMessage.schema.json b/json-schemas/InventoryEntryQuantitySetMessage.schema.json index 19c40ca0..8dd2e261 100644 --- a/json-schemas/InventoryEntryQuantitySetMessage.schema.json +++ b/json-schemas/InventoryEntryQuantitySetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryQuantitySetMessage", "type": "object", @@ -24,6 +24,7 @@ }, "createdBy": {"$ref": "CreatedBy.schema.json"}, "newAvailableQuantity": {"type": "number"}, + "supplyChannel": {"$ref": "ChannelReference.schema.json"}, "id": {"type": "string"} }, "required": [ @@ -40,5 +41,5 @@ "oldAvailableQuantity", "newAvailableQuantity" ], - "$id": "https://example.com/InventoryEntryQuantitySetMessage.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryQuantitySetMessage.schema.json" } diff --git a/json-schemas/InventoryEntryQuantitySetMessagePayload.schema.json b/json-schemas/InventoryEntryQuantitySetMessagePayload.schema.json index cbbb9748..0642f1ac 100644 --- a/json-schemas/InventoryEntryQuantitySetMessagePayload.schema.json +++ b/json-schemas/InventoryEntryQuantitySetMessagePayload.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryQuantitySetMessagePayload", "type": "object", "properties": { "newAvailableQuantity": {"type": "number"}, + "supplyChannel": {"$ref": "ChannelReference.schema.json"}, "type": {"enum": ["InventoryEntryQuantitySet"]}, "newQuantityOnStock": {"type": "number"}, "oldQuantityOnStock": {"type": "number"}, @@ -17,5 +18,5 @@ "oldAvailableQuantity", "newAvailableQuantity" ], - "$id": "https://example.com/InventoryEntryQuantitySetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryQuantitySetMessagePayload.schema.json" } diff --git a/json-schemas/InventoryEntryReference.schema.json b/json-schemas/InventoryEntryReference.schema.json index f33eb174..0fc84942 100644 --- a/json-schemas/InventoryEntryReference.schema.json +++ b/json-schemas/InventoryEntryReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to an [InventoryEntry](ctp:api:type:InventoryEntry).", "additionalProperties": false, "title": "InventoryEntryReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/InventoryEntryReference.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryReference.schema.json" } diff --git a/json-schemas/InventoryEntryRemoveQuantityAction.schema.json b/json-schemas/InventoryEntryRemoveQuantityAction.schema.json index 1e3ca704..6b3d3364 100644 --- a/json-schemas/InventoryEntryRemoveQuantityAction.schema.json +++ b/json-schemas/InventoryEntryRemoveQuantityAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates `availableQuantity` based on the new `quantityOnStock` and amount of active reservations.", "additionalProperties": false, "title": "InventoryEntryRemoveQuantityAction", "type": "object", @@ -11,5 +12,5 @@ "action", "quantity" ], - "$id": "https://example.com/InventoryEntryRemoveQuantityAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryRemoveQuantityAction.schema.json" } diff --git a/json-schemas/InventoryEntryResourceIdentifier.schema.json b/json-schemas/InventoryEntryResourceIdentifier.schema.json index 16646e00..631bbe5c 100644 --- a/json-schemas/InventoryEntryResourceIdentifier.schema.json +++ b/json-schemas/InventoryEntryResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to an [InventoryEntry](ctp:api:type:InventoryEntry).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "InventoryEntryResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/InventoryEntryResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/InventoryEntryResourceIdentifier.schema.json" } diff --git a/json-schemas/InventoryEntrySetCustomFieldAction.schema.json b/json-schemas/InventoryEntrySetCustomFieldAction.schema.json index 99eef116..a6238943 100644 --- a/json-schemas/InventoryEntrySetCustomFieldAction.schema.json +++ b/json-schemas/InventoryEntrySetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntrySetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/InventoryEntrySetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntrySetCustomFieldAction.schema.json" } diff --git a/json-schemas/InventoryEntrySetCustomTypeAction.schema.json b/json-schemas/InventoryEntrySetCustomTypeAction.schema.json index 9223731f..ddc07c84 100644 --- a/json-schemas/InventoryEntrySetCustomTypeAction.schema.json +++ b/json-schemas/InventoryEntrySetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntrySetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/InventoryEntrySetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntrySetCustomTypeAction.schema.json" } diff --git a/json-schemas/InventoryEntrySetExpectedDeliveryAction.schema.json b/json-schemas/InventoryEntrySetExpectedDeliveryAction.schema.json index e0b44091..20478dc6 100644 --- a/json-schemas/InventoryEntrySetExpectedDeliveryAction.schema.json +++ b/json-schemas/InventoryEntrySetExpectedDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntrySetExpectedDeliveryAction", "type": "object", @@ -11,5 +11,5 @@ "action": {"enum": ["setExpectedDelivery"]} }, "required": ["action"], - "$id": "https://example.com/InventoryEntrySetExpectedDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntrySetExpectedDeliveryAction.schema.json" } diff --git a/json-schemas/InventoryEntrySetKeyAction.schema.json b/json-schemas/InventoryEntrySetKeyAction.schema.json new file mode 100644 index 00000000..5fd0872c --- /dev/null +++ b/json-schemas/InventoryEntrySetKeyAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "InventoryEntrySetKeyAction", + "type": "object", + "properties": { + "action": {"enum": ["setKey"]}, + "key": {"type": "string"} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/InventoryEntrySetKeyAction.schema.json" +} diff --git a/json-schemas/InventoryEntrySetRestockableInDaysAction.schema.json b/json-schemas/InventoryEntrySetRestockableInDaysAction.schema.json index cdd214bd..4631775b 100644 --- a/json-schemas/InventoryEntrySetRestockableInDaysAction.schema.json +++ b/json-schemas/InventoryEntrySetRestockableInDaysAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntrySetRestockableInDaysAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setRestockableInDays"]} }, "required": ["action"], - "$id": "https://example.com/InventoryEntrySetRestockableInDaysAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntrySetRestockableInDaysAction.schema.json" } diff --git a/json-schemas/InventoryEntrySetSupplyChannelAction.schema.json b/json-schemas/InventoryEntrySetSupplyChannelAction.schema.json index 2fff6578..c5b855f5 100644 --- a/json-schemas/InventoryEntrySetSupplyChannelAction.schema.json +++ b/json-schemas/InventoryEntrySetSupplyChannelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "If an entry with the same `sku` and `supplyChannel` already exists, this action will fail and a [400 Bad Request](/../api/errors#400-bad-request-1) `DuplicateField` error will be returned.", "additionalProperties": false, "title": "InventoryEntrySetSupplyChannelAction", "type": "object", @@ -8,5 +9,5 @@ "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/InventoryEntrySetSupplyChannelAction.schema.json" + "$id": "https://api.commercetools.com/InventoryEntrySetSupplyChannelAction.schema.json" } diff --git a/json-schemas/InventoryEntryUpdate.schema.json b/json-schemas/InventoryEntryUpdate.schema.json index 2a5e6bcd..50e1d92b 100644 --- a/json-schemas/InventoryEntryUpdate.schema.json +++ b/json-schemas/InventoryEntryUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/InventoryEntryUpdate.schema.json" + "$id": "https://api.commercetools.com/InventoryEntryUpdate.schema.json" } diff --git a/json-schemas/InventoryEntryUpdateAction.schema.json b/json-schemas/InventoryEntryUpdateAction.schema.json index ec38e294..6fe3ef86 100644 --- a/json-schemas/InventoryEntryUpdateAction.schema.json +++ b/json-schemas/InventoryEntryUpdateAction.schema.json @@ -1,20 +1,31 @@ { "oneOf": [ - {"$ref": "https://example.com/InventoryEntryAddQuantityAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntryChangeQuantityAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntryRemoveQuantityAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntrySetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntrySetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntrySetExpectedDeliveryAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntrySetRestockableInDaysAction.schema.json"}, - {"$ref": "https://example.com/InventoryEntrySetSupplyChannelAction.schema.json"} + {"$ref": "https://api.commercetools.com/InventoryEntryAddQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryChangeQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryRemoveQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetExpectedDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetRestockableInDaysAction.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntrySetSupplyChannelAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryEntryUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addQuantity", + "changeQuantity", + "removeQuantity", + "setCustomField", + "setCustomType", + "setExpectedDelivery", + "setKey", + "setRestockableInDays", + "setSupplyChannel" + ]}}, "required": ["action"], - "$id": "https://example.com/InventoryEntryUpdateAction.schema.json", + "$id": "https://api.commercetools.com/InventoryEntryUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/InventoryModeEnum.schema.json b/json-schemas/InventoryModeEnum.schema.json index 30a4e84f..6012322b 100644 --- a/json-schemas/InventoryModeEnum.schema.json +++ b/json-schemas/InventoryModeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "InventoryMode", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "ReserveOnOrder", "None" ], - "$id": "https://example.com/InventoryModeEnum.schema.json" + "$id": "https://api.commercetools.com/InventoryModeEnum.schema.json" } diff --git a/json-schemas/InventoryPagedQueryResponse.schema.json b/json-schemas/InventoryPagedQueryResponse.schema.json index 05c44814..e4e30572 100644 --- a/json-schemas/InventoryPagedQueryResponse.schema.json +++ b/json-schemas/InventoryPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "InventoryPagedQueryResponse", "type": "object", @@ -15,9 +15,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/InventoryPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/InventoryPagedQueryResponse.schema.json" } diff --git a/json-schemas/IronMqDestination.schema.json b/json-schemas/IronMqDestination.schema.json index 6a56325a..2ca8564c 100644 --- a/json-schemas/IronMqDestination.schema.json +++ b/json-schemas/IronMqDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "IronMqDestination", "type": "object", @@ -11,5 +11,5 @@ "type", "uri" ], - "$id": "https://example.com/IronMqDestination.schema.json" + "$id": "https://api.commercetools.com/IronMqDestination.schema.json" } diff --git a/json-schemas/ItemShippingDetails.schema.json b/json-schemas/ItemShippingDetails.schema.json index 8f1c8c8f..b9b1f6ac 100644 --- a/json-schemas/ItemShippingDetails.schema.json +++ b/json-schemas/ItemShippingDetails.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ItemShippingDetails", "type": "object", @@ -14,5 +14,5 @@ "targets", "valid" ], - "$id": "https://example.com/ItemShippingDetails.schema.json" + "$id": "https://api.commercetools.com/ItemShippingDetails.schema.json" } diff --git a/json-schemas/ItemShippingDetailsDraft.schema.json b/json-schemas/ItemShippingDetailsDraft.schema.json index 34c74994..893dbda0 100644 --- a/json-schemas/ItemShippingDetailsDraft.schema.json +++ b/json-schemas/ItemShippingDetailsDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ItemShippingDetailsDraft", "type": "object", @@ -8,5 +8,5 @@ "items": {"$ref": "ItemShippingTarget.schema.json"} }}, "required": ["targets"], - "$id": "https://example.com/ItemShippingDetailsDraft.schema.json" + "$id": "https://api.commercetools.com/ItemShippingDetailsDraft.schema.json" } diff --git a/json-schemas/ItemShippingTarget.schema.json b/json-schemas/ItemShippingTarget.schema.json index 12c986a1..fb6169d8 100644 --- a/json-schemas/ItemShippingTarget.schema.json +++ b/json-schemas/ItemShippingTarget.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ItemShippingTarget", "type": "object", @@ -11,5 +11,5 @@ "addressKey", "quantity" ], - "$id": "https://example.com/ItemShippingTarget.schema.json" + "$id": "https://api.commercetools.com/ItemShippingTarget.schema.json" } diff --git a/json-schemas/ItemState.schema.json b/json-schemas/ItemState.schema.json index 0e569d35..189ddc17 100644 --- a/json-schemas/ItemState.schema.json +++ b/json-schemas/ItemState.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ItemState", "type": "object", @@ -11,5 +11,5 @@ "quantity", "state" ], - "$id": "https://example.com/ItemState.schema.json" + "$id": "https://api.commercetools.com/ItemState.schema.json" } diff --git a/json-schemas/KeyReference.schema.json b/json-schemas/KeyReference.schema.json index 2d08c7c0..4b935c98 100644 --- a/json-schemas/KeyReference.schema.json +++ b/json-schemas/KeyReference.schema.json @@ -1,17 +1,18 @@ { - "oneOf": [{"$ref": "https://example.com/StoreKeyReference.schema.json"}], - "$schema": "http://json-schema.org/draft-07/schema#", + "oneOf": [{"$ref": "https://api.commercetools.com/StoreKeyReference.schema.json"}], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "A KeyReference represents a loose reference to another resource in the same Project identified by the resource's `key` field. If available, the `key` is immutable and mandatory. KeyReferences do not support [Reference Expansion](/general-concepts#reference-expansion).", "additionalProperties": false, "title": "KeyReference", "type": "object", "properties": { - "typeId": {"$ref": "ReferenceTypeIdEnum.schema.json"}, + "typeId": {"enum": ["store"]}, "key": {"type": "string"} }, "required": [ "typeId", "key" ], - "$id": "https://example.com/KeyReference.schema.json", + "$id": "https://api.commercetools.com/KeyReference.schema.json", "discriminator": {"propertyName": "typeId"} } diff --git a/json-schemas/LanguageUsedInStoresError.schema.json b/json-schemas/LanguageUsedInStoresError.schema.json index 33fd57cb..d8302898 100644 --- a/json-schemas/LanguageUsedInStoresError.schema.json +++ b/json-schemas/LanguageUsedInStoresError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LanguageUsedInStoresError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/LanguageUsedInStoresError.schema.json" + "$id": "https://api.commercetools.com/LanguageUsedInStoresError.schema.json" } diff --git a/json-schemas/LastModifiedBy.schema.json b/json-schemas/LastModifiedBy.schema.json index 2489ddcd..61925dc7 100644 --- a/json-schemas/LastModifiedBy.schema.json +++ b/json-schemas/LastModifiedBy.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Present on resources modified after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "LastModifiedBy", "type": "object", "properties": { @@ -9,5 +10,5 @@ "externalUserId": {"type": "string"}, "customer": {"$ref": "CustomerReference.schema.json"} }, - "$id": "https://example.com/LastModifiedBy.schema.json" + "$id": "https://api.commercetools.com/LastModifiedBy.schema.json" } diff --git a/json-schemas/LineItem.schema.json b/json-schemas/LineItem.schema.json index a5c4db40..8f007ba5 100644 --- a/json-schemas/LineItem.schema.json +++ b/json-schemas/LineItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LineItem", "type": "object", @@ -18,6 +18,7 @@ "totalPrice": {"$ref": "TypedMoney.schema.json"}, "taxedPrice": {"$ref": "TaxedItemPrice.schema.json"}, "custom": {"$ref": "CustomFields.schema.json"}, + "productKey": {"type": "string"}, "productSlug": {"$ref": "LocalizedString.schema.json"}, "discountedPricePerQuantity": { "type": "array", @@ -52,5 +53,5 @@ "priceMode", "lineItemMode" ], - "$id": "https://example.com/LineItem.schema.json" + "$id": "https://api.commercetools.com/LineItem.schema.json" } diff --git a/json-schemas/LineItemDraft.schema.json b/json-schemas/LineItemDraft.schema.json index 49364898..87c1091f 100644 --- a/json-schemas/LineItemDraft.schema.json +++ b/json-schemas/LineItemDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "LineItemDraft", "type": "object", "properties": { @@ -20,5 +20,5 @@ "distributionChannel": {"$ref": "ChannelResourceIdentifier.schema.json"}, "externalPrice": {"$ref": "Money.schema.json"} }, - "$id": "https://example.com/LineItemDraft.schema.json" + "$id": "https://api.commercetools.com/LineItemDraft.schema.json" } diff --git a/json-schemas/LineItemImportDraft.schema.json b/json-schemas/LineItemImportDraft.schema.json index 1e1682a1..49befc0a 100644 --- a/json-schemas/LineItemImportDraft.schema.json +++ b/json-schemas/LineItemImportDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LineItemImportDraft", "type": "object", @@ -25,5 +25,5 @@ "price", "quantity" ], - "$id": "https://example.com/LineItemImportDraft.schema.json" + "$id": "https://api.commercetools.com/LineItemImportDraft.schema.json" } diff --git a/json-schemas/LineItemModeEnum.schema.json b/json-schemas/LineItemModeEnum.schema.json index bdfdaf5d..73b4ec9c 100644 --- a/json-schemas/LineItemModeEnum.schema.json +++ b/json-schemas/LineItemModeEnum.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "LineItemMode", "type": "string", "enum": [ "Standard", "GiftLineItem" ], - "$id": "https://example.com/LineItemModeEnum.schema.json" + "$id": "https://api.commercetools.com/LineItemModeEnum.schema.json" } diff --git a/json-schemas/LineItemPriceModeEnum.schema.json b/json-schemas/LineItemPriceModeEnum.schema.json index 42d3ed81..d6fea43a 100644 --- a/json-schemas/LineItemPriceModeEnum.schema.json +++ b/json-schemas/LineItemPriceModeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "LineItemPriceMode", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "ExternalTotal", "ExternalPrice" ], - "$id": "https://example.com/LineItemPriceModeEnum.schema.json" + "$id": "https://api.commercetools.com/LineItemPriceModeEnum.schema.json" } diff --git a/json-schemas/LineItemReturnItem.schema.json b/json-schemas/LineItemReturnItem.schema.json index 7fd8000d..41d3c09d 100644 --- a/json-schemas/LineItemReturnItem.schema.json +++ b/json-schemas/LineItemReturnItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LineItemReturnItem", "type": "object", @@ -15,6 +15,7 @@ "format": "date-time" }, "lineItemId": {"type": "string"}, + "custom": {"$ref": "CustomFields.schema.json"}, "comment": {"type": "string"}, "id": {"type": "string"}, "type": {"enum": ["LineItemReturnItem"]}, @@ -30,5 +31,5 @@ "createdAt", "lineItemId" ], - "$id": "https://example.com/LineItemReturnItem.schema.json" + "$id": "https://api.commercetools.com/LineItemReturnItem.schema.json" } diff --git a/json-schemas/LineItemStateTransitionMessage.schema.json b/json-schemas/LineItemStateTransitionMessage.schema.json index 865026e3..35c7d71d 100644 --- a/json-schemas/LineItemStateTransitionMessage.schema.json +++ b/json-schemas/LineItemStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LineItemStateTransitionMessage", "type": "object", @@ -45,5 +45,5 @@ "fromState", "toState" ], - "$id": "https://example.com/LineItemStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/LineItemStateTransitionMessage.schema.json" } diff --git a/json-schemas/LineItemStateTransitionMessagePayload.schema.json b/json-schemas/LineItemStateTransitionMessagePayload.schema.json index 1d81cf19..fa7d8008 100644 --- a/json-schemas/LineItemStateTransitionMessagePayload.schema.json +++ b/json-schemas/LineItemStateTransitionMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "LineItemStateTransitionMessagePayload", "type": "object", @@ -22,5 +22,5 @@ "fromState", "toState" ], - "$id": "https://example.com/LineItemStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/LineItemStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/LocalizedString.schema.json b/json-schemas/LocalizedString.schema.json index c37fa608..753fff91 100644 --- a/json-schemas/LocalizedString.schema.json +++ b/json-schemas/LocalizedString.schema.json @@ -1,9 +1,10 @@ { "patternProperties": {"^[a-z]{2}(-[A-Z]{2})?$": {"type": "string"}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "JSON object where the keys are of type [Locale](ctp:api:type:Locale), and the values are the strings used for the corresponding language.", "additionalProperties": false, "title": "LocalizedString", "type": "object", "properties": {}, - "$id": "https://example.com/LocalizedString.schema.json" + "$id": "https://api.commercetools.com/LocalizedString.schema.json" } diff --git a/json-schemas/Location.schema.json b/json-schemas/Location.schema.json index 1321fc3a..2b0cade0 100644 --- a/json-schemas/Location.schema.json +++ b/json-schemas/Location.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.", "additionalProperties": false, "title": "Location", "type": "object", @@ -8,5 +9,5 @@ "state": {"type": "string"} }, "required": ["country"], - "$id": "https://example.com/Location.schema.json" + "$id": "https://api.commercetools.com/Location.schema.json" } diff --git a/json-schemas/MatchingPriceNotFoundError.schema.json b/json-schemas/MatchingPriceNotFoundError.schema.json index caa26da8..1b110838 100644 --- a/json-schemas/MatchingPriceNotFoundError.schema.json +++ b/json-schemas/MatchingPriceNotFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MatchingPriceNotFoundError", "type": "object", @@ -10,10 +18,7 @@ "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, "channel": {"$ref": "ChannelReference.schema.json"}, "currency": {"type": "string"}, - "variantId": { - "type": "number", - "format": "integer" - }, + "variantId": {"type": "number"}, "message": {"type": "string"} }, "required": [ @@ -22,5 +27,5 @@ "productId", "variantId" ], - "$id": "https://example.com/MatchingPriceNotFoundError.schema.json" + "$id": "https://api.commercetools.com/MatchingPriceNotFoundError.schema.json" } diff --git a/json-schemas/MaxResourceLimitExceededError.schema.json b/json-schemas/MaxResourceLimitExceededError.schema.json index 489bb671..bf9f31f9 100644 --- a/json-schemas/MaxResourceLimitExceededError.schema.json +++ b/json-schemas/MaxResourceLimitExceededError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MaxResourceLimitExceededError", "type": "object", @@ -13,5 +21,5 @@ "message", "exceededResource" ], - "$id": "https://example.com/MaxResourceLimitExceededError.schema.json" + "$id": "https://api.commercetools.com/MaxResourceLimitExceededError.schema.json" } diff --git a/json-schemas/Message.schema.json b/json-schemas/Message.schema.json index f3fb5231..8901ea8d 100644 --- a/json-schemas/Message.schema.json +++ b/json-schemas/Message.schema.json @@ -1,81 +1,75 @@ { "oneOf": [ - {"$ref": "https://example.com/CategoryCreatedMessage.schema.json"}, - {"$ref": "https://example.com/CategorySlugChangedMessage.schema.json"}, - {"$ref": "https://example.com/CustomLineItemStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/CustomerAddressAddedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerAddressChangedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerAddressRemovedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerCompanyNameSetMessage.schema.json"}, - {"$ref": "https://example.com/CustomerCreatedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerDateOfBirthSetMessage.schema.json"}, - {"$ref": "https://example.com/CustomerEmailChangedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerEmailVerifiedMessage.schema.json"}, - {"$ref": "https://example.com/CustomerGroupSetMessage.schema.json"}, - {"$ref": "https://example.com/CustomerPasswordUpdatedMessage.schema.json"}, - {"$ref": "https://example.com/DeliveryAddedMessage.schema.json"}, - {"$ref": "https://example.com/DeliveryAddressSetMessage.schema.json"}, - {"$ref": "https://example.com/DeliveryItemsUpdatedMessage.schema.json"}, - {"$ref": "https://example.com/DeliveryRemovedMessage.schema.json"}, - {"$ref": "https://example.com/InventoryEntryCreatedMessage.schema.json"}, - {"$ref": "https://example.com/InventoryEntryDeletedMessage.schema.json"}, - {"$ref": "https://example.com/InventoryEntryQuantitySetMessage.schema.json"}, - {"$ref": "https://example.com/LineItemStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/OrderBillingAddressSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderCreatedMessage.schema.json"}, - {"$ref": "https://example.com/OrderCustomLineItemDiscountSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderCustomerEmailSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderCustomerGroupSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderCustomerSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderDeletedMessage.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeAddedMessage.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeRemovedMessage.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeStateSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderEditAppliedMessage.schema.json"}, - {"$ref": "https://example.com/OrderImportedMessage.schema.json"}, - {"$ref": "https://example.com/OrderLineItemAddedMessage.schema.json"}, - {"$ref": "https://example.com/OrderLineItemDiscountSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderPaymentStateChangedMessage.schema.json"}, - {"$ref": "https://example.com/OrderReturnInfoAddedMessage.schema.json"}, - {"$ref": "https://example.com/OrderReturnShipmentStateChangedMessage.schema.json"}, - {"$ref": "https://example.com/OrderShipmentStateChangedMessage.schema.json"}, - {"$ref": "https://example.com/OrderShippingAddressSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderShippingInfoSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderShippingRateInputSetMessage.schema.json"}, - {"$ref": "https://example.com/OrderStateChangedMessage.schema.json"}, - {"$ref": "https://example.com/OrderStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/OrderStoreSetMessage.schema.json"}, - {"$ref": "https://example.com/ParcelAddedToDeliveryMessage.schema.json"}, - {"$ref": "https://example.com/ParcelItemsUpdatedMessage.schema.json"}, - {"$ref": "https://example.com/ParcelMeasurementsUpdatedMessage.schema.json"}, - {"$ref": "https://example.com/ParcelRemovedFromDeliveryMessage.schema.json"}, - {"$ref": "https://example.com/ParcelTrackingDataUpdatedMessage.schema.json"}, - {"$ref": "https://example.com/PaymentCreatedMessage.schema.json"}, - {"$ref": "https://example.com/PaymentInteractionAddedMessage.schema.json"}, - {"$ref": "https://example.com/PaymentStatusInterfaceCodeSetMessage.schema.json"}, - {"$ref": "https://example.com/PaymentStatusStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/PaymentTransactionAddedMessage.schema.json"}, - {"$ref": "https://example.com/PaymentTransactionStateChangedMessage.schema.json"}, - {"$ref": "https://example.com/ProductAddedToCategoryMessage.schema.json"}, - {"$ref": "https://example.com/ProductCreatedMessage.schema.json"}, - {"$ref": "https://example.com/ProductDeletedMessage.schema.json"}, - {"$ref": "https://example.com/ProductImageAddedMessage.schema.json"}, - {"$ref": "https://example.com/ProductPriceDiscountsSetMessage.schema.json"}, - {"$ref": "https://example.com/ProductPriceExternalDiscountSetMessage.schema.json"}, - {"$ref": "https://example.com/ProductPublishedMessage.schema.json"}, - {"$ref": "https://example.com/ProductRemovedFromCategoryMessage.schema.json"}, - {"$ref": "https://example.com/ProductRevertedStagedChangesMessage.schema.json"}, - {"$ref": "https://example.com/ProductSlugChangedMessage.schema.json"}, - {"$ref": "https://example.com/ProductStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/ProductUnpublishedMessage.schema.json"}, - {"$ref": "https://example.com/ProductVariantAddedMessage.schema.json"}, - {"$ref": "https://example.com/ProductVariantDeletedMessage.schema.json"}, - {"$ref": "https://example.com/ReviewCreatedMessage.schema.json"}, - {"$ref": "https://example.com/ReviewRatingSetMessage.schema.json"}, - {"$ref": "https://example.com/ReviewStateTransitionMessage.schema.json"}, - {"$ref": "https://example.com/ShoppingListStoreSetMessage.schema.json"} + {"$ref": "https://api.commercetools.com/CategoryCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySlugChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressRemovedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerCompanyNameSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerDateOfBirthSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerEmailChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerEmailVerifiedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerFirstNameSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerLastNameSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerPasswordUpdatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerTitleSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryQuantitySetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderPaymentAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentInteractionAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentStatusInterfaceCodeSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentStatusStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentTransactionAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentTransactionStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddedToCategoryMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductImageAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPriceDiscountsSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPriceExternalDiscountSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPublishedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemovedFromCategoryMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRevertedStagedChangesMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionProductAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionProductRemovedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionVariantSelectionChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSlugChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductUnpublishedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductVariantAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductVariantDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewRatingSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSellerCommentSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteValidToSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceDiscountSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceExternalDiscountSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceValueChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreProductSelectionsChangedMessage.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Message", "type": "object", @@ -95,7 +89,76 @@ "resourceVersion": {"type": "number"}, "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, "id": {"type": "string"}, - "type": {"type": "string"}, + "type": {"enum": [ + "CategoryCreated", + "CategorySlugChanged", + "CustomerAddressAdded", + "CustomerAddressChanged", + "CustomerAddressRemoved", + "CustomerCompanyNameSet", + "CustomerCreated", + "CustomerDateOfBirthSet", + "CustomerDeleted", + "CustomerEmailChanged", + "CustomerEmailVerified", + "CustomerFirstNameSet", + "CustomerGroupSet", + "CustomerLastNameSet", + "CustomerPasswordUpdated", + "CustomerTitleSet", + "InventoryEntryCreated", + "InventoryEntryDeleted", + "InventoryEntryQuantitySet", + null, + "OrderPaymentAdded", + "PaymentCreated", + "PaymentInteractionAdded", + "PaymentStatusInterfaceCodeSet", + "PaymentStatusStateTransition", + "PaymentTransactionAdded", + "PaymentTransactionStateChanged", + "ProductAddedToCategory", + "ProductCreated", + "ProductDeleted", + "ProductImageAdded", + "ProductPriceDiscountsSet", + "ProductPriceExternalDiscountSet", + "ProductPublished", + "ProductRemovedFromCategory", + "ProductRevertedStagedChanges", + "ProductSelectionCreated", + "ProductSelectionDeleted", + "ProductSelectionProductAdded", + "ProductSelectionProductRemoved", + "ProductSelectionVariantSelectionChanged", + "ProductSlugChanged", + "ProductStateTransition", + "ProductUnpublished", + "ProductVariantAdded", + "ProductVariantDeleted", + "QuoteCreated", + "QuoteDeleted", + "QuoteRequestCreated", + "QuoteRequestDeleted", + "QuoteRequestStateChanged", + "QuoteStateChanged", + "ReviewCreated", + "ReviewRatingSet", + "ReviewStateTransition", + "StagedQuoteCreated", + "StagedQuoteDeleted", + "StagedQuoteSellerCommentSet", + "StagedQuoteStateChanged", + "StagedQuoteValidToSet", + "StandalonePriceCreated", + "StandalonePriceDeleted", + "StandalonePriceDiscountSet", + "StandalonePriceExternalDiscountSet", + "StandalonePriceValueChanged", + "StoreCreated", + "StoreDeleted", + "StoreProductSelectionsChanged" + ]}, "version": {"type": "number"} }, "required": [ @@ -108,6 +171,6 @@ "resourceVersion", "type" ], - "$id": "https://example.com/Message.schema.json", + "$id": "https://api.commercetools.com/Message.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/MessageConfiguration.schema.json b/json-schemas/MessageConfiguration.schema.json deleted file mode 100644 index 966c7616..00000000 --- a/json-schemas/MessageConfiguration.schema.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "MessageConfiguration", - "type": "object", - "properties": { - "deleteDaysAfterCreation": {"type": "number"}, - "enabled": {"type": "boolean"} - }, - "required": ["enabled"], - "$id": "https://example.com/MessageConfiguration.schema.json" -} diff --git a/json-schemas/MessageConfigurationDraft.schema.json b/json-schemas/MessageConfigurationDraft.schema.json deleted file mode 100644 index c5d7006c..00000000 --- a/json-schemas/MessageConfigurationDraft.schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "MessageConfigurationDraft", - "type": "object", - "properties": { - "deleteDaysAfterCreation": {"type": "number"}, - "enabled": {"type": "boolean"} - }, - "required": [ - "enabled", - "deleteDaysAfterCreation" - ], - "$id": "https://example.com/MessageConfigurationDraft.schema.json" -} diff --git a/json-schemas/MessageDelivery.schema.json b/json-schemas/MessageDeliveryPayload.schema.json similarity index 83% rename from json-schemas/MessageDelivery.schema.json rename to json-schemas/MessageDeliveryPayload.schema.json index 7d5e8f87..948b91ce 100644 --- a/json-schemas/MessageDelivery.schema.json +++ b/json-schemas/MessageDeliveryPayload.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "MessageDelivery", + "title": "MessageDeliveryPayload", "type": "object", "properties": { "createdAt": { @@ -34,5 +34,5 @@ "resourceVersion", "payloadNotIncluded" ], - "$id": "https://example.com/MessageDelivery.schema.json" + "$id": "https://api.commercetools.com/MessageDeliveryPayload.schema.json" } diff --git a/json-schemas/MessagePagedQueryResponse.schema.json b/json-schemas/MessagePagedQueryResponse.schema.json index 2e9dda0a..d7c3f09f 100644 --- a/json-schemas/MessagePagedQueryResponse.schema.json +++ b/json-schemas/MessagePagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MessagePagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/MessagePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/MessagePagedQueryResponse.schema.json" } diff --git a/json-schemas/MessagePayload.schema.json b/json-schemas/MessagePayload.schema.json index a2c1036b..451811cf 100644 --- a/json-schemas/MessagePayload.schema.json +++ b/json-schemas/MessagePayload.schema.json @@ -1,86 +1,151 @@ { "oneOf": [ - {"$ref": "https://example.com/CategoryCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CategorySlugChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomLineItemStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerAddressAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerAddressChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerAddressRemovedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerCompanyNameSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerDateOfBirthSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerEmailChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerEmailVerifiedMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerGroupSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/CustomerPasswordUpdatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/DeliveryAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/DeliveryAddressSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/DeliveryItemsUpdatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/DeliveryRemovedMessagePayload.schema.json"}, - {"$ref": "https://example.com/InventoryEntryCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/InventoryEntryDeletedMessagePayload.schema.json"}, - {"$ref": "https://example.com/InventoryEntryQuantitySetMessagePayload.schema.json"}, - {"$ref": "https://example.com/LineItemStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderBillingAddressSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderCustomLineItemDiscountSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderCustomerEmailSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderCustomerGroupSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderCustomerSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderDeletedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeRemovedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderDiscountCodeStateSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderEditAppliedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderImportedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderLineItemAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderLineItemDiscountSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderPaymentStateChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderReturnInfoAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderReturnShipmentStateChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderShipmentStateChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderShippingAddressSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderShippingInfoSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderShippingRateInputSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderStateChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/OrderStoreSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/ParcelAddedToDeliveryMessagePayload.schema.json"}, - {"$ref": "https://example.com/ParcelItemsUpdatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ParcelMeasurementsUpdatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ParcelRemovedFromDeliveryMessagePayload.schema.json"}, - {"$ref": "https://example.com/ParcelTrackingDataUpdatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentInteractionAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentStatusInterfaceCodeSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentStatusStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentTransactionAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/PaymentTransactionStateChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductAddedToCategoryMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductDeletedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductImageAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductPriceDiscountsSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductPriceExternalDiscountSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductPublishedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductRemovedFromCategoryMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductRevertedStagedChangesMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductSlugChangedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductUnpublishedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductVariantAddedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ProductVariantDeletedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ReviewCreatedMessagePayload.schema.json"}, - {"$ref": "https://example.com/ReviewRatingSetMessagePayload.schema.json"}, - {"$ref": "https://example.com/ReviewStateTransitionMessagePayload.schema.json"}, - {"$ref": "https://example.com/ShoppingListStoreSetMessagePayload.schema.json"} + {"$ref": "https://api.commercetools.com/CategoryCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CategorySlugChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerAddressRemovedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerCompanyNameSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerDateOfBirthSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerEmailChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerEmailVerifiedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerFirstNameSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerLastNameSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerPasswordUpdatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerTitleSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryQuantitySetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderPaymentAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentInteractionAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentStatusInterfaceCodeSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentStatusStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentTransactionAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentTransactionStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddedToCategoryMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductImageAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPriceDiscountsSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPriceExternalDiscountSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPublishedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemovedFromCategoryMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRevertedStagedChangesMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionProductAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionProductRemovedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionVariantSelectionChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSlugChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductUnpublishedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductVariantAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductVariantDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewRatingSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListStoreSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSellerCommentSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteValidToSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceDiscountSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceExternalDiscountSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceValueChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreProductSelectionsChangedMessagePayload.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MessagePayload", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "CategoryCreated", + "CategorySlugChanged", + "CustomerAddressAdded", + "CustomerAddressChanged", + "CustomerAddressRemoved", + "CustomerCompanyNameSet", + "CustomerCreated", + "CustomerDateOfBirthSet", + "CustomerDeleted", + "CustomerEmailChanged", + "CustomerEmailVerified", + "CustomerFirstNameSet", + "CustomerGroupSet", + "CustomerLastNameSet", + "CustomerPasswordUpdated", + "CustomerTitleSet", + "InventoryEntryCreated", + "InventoryEntryDeleted", + "InventoryEntryQuantitySet", + null, + "OrderPaymentAdded", + "PaymentCreated", + "PaymentInteractionAdded", + "PaymentStatusInterfaceCodeSet", + "PaymentStatusStateTransition", + "PaymentTransactionAdded", + "PaymentTransactionStateChanged", + "ProductAddedToCategory", + "ProductCreated", + "ProductDeleted", + "ProductImageAdded", + "ProductPriceDiscountsSet", + "ProductPriceExternalDiscountSet", + "ProductPublished", + "ProductRemovedFromCategory", + "ProductRevertedStagedChanges", + "ProductSelectionCreated", + "ProductSelectionDeleted", + "ProductSelectionProductAdded", + "ProductSelectionProductRemoved", + "ProductSelectionVariantSelectionChanged", + "ProductSlugChanged", + "ProductStateTransition", + "ProductUnpublished", + "ProductVariantAdded", + "ProductVariantDeleted", + "QuoteCreated", + "QuoteDeleted", + "QuoteRequestCreated", + "QuoteRequestDeleted", + "QuoteRequestStateChanged", + "QuoteStateChanged", + "ReviewCreated", + "ReviewRatingSet", + "ReviewStateTransition", + "ShoppingListStoreSet", + "StagedQuoteCreated", + "StagedQuoteDeleted", + "StagedQuoteSellerCommentSet", + "StagedQuoteStateChanged", + "StagedQuoteValidToSet", + "StandalonePriceCreated", + "StandalonePriceDeleted", + "StandalonePriceDiscountSet", + "StandalonePriceExternalDiscountSet", + "StandalonePriceValueChanged", + "StoreCreated", + "StoreDeleted", + "StoreProductSelectionsChanged" + ]}}, "required": ["type"], - "$id": "https://example.com/MessagePayload.schema.json", + "$id": "https://api.commercetools.com/MessagePayload.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/MessageSubscription.schema.json b/json-schemas/MessageSubscription.schema.json index d3f2b7df..231a7a3e 100644 --- a/json-schemas/MessageSubscription.schema.json +++ b/json-schemas/MessageSubscription.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MessageSubscription", "type": "object", @@ -11,5 +11,5 @@ "resourceTypeId": {"type": "string"} }, "required": ["resourceTypeId"], - "$id": "https://example.com/MessageSubscription.schema.json" + "$id": "https://api.commercetools.com/MessageSubscription.schema.json" } diff --git a/json-schemas/MessagesConfiguration.schema.json b/json-schemas/MessagesConfiguration.schema.json new file mode 100644 index 00000000..442d4379 --- /dev/null +++ b/json-schemas/MessagesConfiguration.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Holds the configuration for the [Messages Query](/../api/projects/messages) feature for the Project.", + "additionalProperties": false, + "title": "MessagesConfiguration", + "type": "object", + "properties": { + "deleteDaysAfterCreation": {"type": "number"}, + "enabled": {"type": "boolean"} + }, + "required": ["enabled"], + "$id": "https://api.commercetools.com/MessagesConfiguration.schema.json" +} diff --git a/json-schemas/MessagesConfigurationDraft.schema.json b/json-schemas/MessagesConfigurationDraft.schema.json new file mode 100644 index 00000000..a4ccc787 --- /dev/null +++ b/json-schemas/MessagesConfigurationDraft.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Defines the configuration for the [Messages Query](/../api/projects/messages) feature for the Project.", + "additionalProperties": false, + "title": "MessagesConfigurationDraft", + "type": "object", + "properties": { + "deleteDaysAfterCreation": {"type": "number"}, + "enabled": {"type": "boolean"} + }, + "required": [ + "enabled", + "deleteDaysAfterCreation" + ], + "$id": "https://api.commercetools.com/MessagesConfigurationDraft.schema.json" +} diff --git a/json-schemas/MissingRoleOnChannelError.schema.json b/json-schemas/MissingRoleOnChannelError.schema.json index d5703546..20a9e7f4 100644 --- a/json-schemas/MissingRoleOnChannelError.schema.json +++ b/json-schemas/MissingRoleOnChannelError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MissingRoleOnChannelError", "type": "object", @@ -14,5 +22,5 @@ "message", "missingRole" ], - "$id": "https://example.com/MissingRoleOnChannelError.schema.json" + "$id": "https://api.commercetools.com/MissingRoleOnChannelError.schema.json" } diff --git a/json-schemas/MissingTaxRateForCountryError.schema.json b/json-schemas/MissingTaxRateForCountryError.schema.json index 4c55e847..b27e1a38 100644 --- a/json-schemas/MissingTaxRateForCountryError.schema.json +++ b/json-schemas/MissingTaxRateForCountryError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MissingTaxRateForCountryError", "type": "object", @@ -15,5 +23,5 @@ "message", "taxCategoryId" ], - "$id": "https://example.com/MissingTaxRateForCountryError.schema.json" + "$id": "https://api.commercetools.com/MissingTaxRateForCountryError.schema.json" } diff --git a/json-schemas/Money.schema.json b/json-schemas/Money.schema.json index 5a5efb9e..545c24f7 100644 --- a/json-schemas/Money.schema.json +++ b/json-schemas/Money.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Draft type that stores amounts in cent precision for the specified currency.\n\nFor storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead.", "additionalProperties": false, "title": "Money", "type": "object", @@ -11,5 +12,5 @@ "centAmount", "currencyCode" ], - "$id": "https://example.com/Money.schema.json" + "$id": "https://api.commercetools.com/Money.schema.json" } diff --git a/json-schemas/MoneyTypeEnum.schema.json b/json-schemas/MoneyTypeEnum.schema.json index 5348dd6c..5050b436 100644 --- a/json-schemas/MoneyTypeEnum.schema.json +++ b/json-schemas/MoneyTypeEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "MoneyType supports two different values, one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "MoneyType", "type": "string", "enum": [ "centPrecision", "highPrecision" ], - "$id": "https://example.com/MoneyTypeEnum.schema.json" + "$id": "https://api.commercetools.com/MoneyTypeEnum.schema.json" } diff --git a/json-schemas/MultiBuyCustomLineItemsTarget.schema.json b/json-schemas/MultiBuyCustomLineItemsTarget.schema.json index 4014089a..6298228b 100644 --- a/json-schemas/MultiBuyCustomLineItemsTarget.schema.json +++ b/json-schemas/MultiBuyCustomLineItemsTarget.schema.json @@ -1,23 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This Discount target is similar to `MultiBuyLineItems`, but is applied on Custom Line Items instead of Line Items.", "additionalProperties": false, "title": "MultiBuyCustomLineItemsTarget", "type": "object", "properties": { - "discountedQuantity": { - "type": "number", - "format": "integer" - }, + "discountedQuantity": {"type": "number"}, "predicate": {"type": "string"}, - "triggerQuantity": { - "type": "number", - "format": "integer" - }, + "triggerQuantity": {"type": "number"}, "type": {"enum": ["multiBuyCustomLineItems"]}, - "maxOccurrence": { - "type": "number", - "format": "integer" - }, + "maxOccurrence": {"type": "number"}, "selectionMode": {"$ref": "SelectionModeEnum.schema.json"} }, "required": [ @@ -27,5 +19,5 @@ "discountedQuantity", "selectionMode" ], - "$id": "https://example.com/MultiBuyCustomLineItemsTarget.schema.json" + "$id": "https://api.commercetools.com/MultiBuyCustomLineItemsTarget.schema.json" } diff --git a/json-schemas/MultiBuyLineItemsTarget.schema.json b/json-schemas/MultiBuyLineItemsTarget.schema.json index f7dd6c2d..b12c5fb7 100644 --- a/json-schemas/MultiBuyLineItemsTarget.schema.json +++ b/json-schemas/MultiBuyLineItemsTarget.schema.json @@ -1,23 +1,14 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MultiBuyLineItemsTarget", "type": "object", "properties": { - "discountedQuantity": { - "type": "number", - "format": "integer" - }, + "discountedQuantity": {"type": "number"}, "predicate": {"type": "string"}, - "triggerQuantity": { - "type": "number", - "format": "integer" - }, + "triggerQuantity": {"type": "number"}, "type": {"enum": ["multiBuyLineItems"]}, - "maxOccurrence": { - "type": "number", - "format": "integer" - }, + "maxOccurrence": {"type": "number"}, "selectionMode": {"$ref": "SelectionModeEnum.schema.json"} }, "required": [ @@ -27,5 +18,5 @@ "discountedQuantity", "selectionMode" ], - "$id": "https://example.com/MultiBuyLineItemsTarget.schema.json" + "$id": "https://api.commercetools.com/MultiBuyLineItemsTarget.schema.json" } diff --git a/json-schemas/MyCartAddDiscountCodeAction.schema.json b/json-schemas/MyCartAddDiscountCodeAction.schema.json index 05b6eead..dc656a61 100644 --- a/json-schemas/MyCartAddDiscountCodeAction.schema.json +++ b/json-schemas/MyCartAddDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartAddDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "code" ], - "$id": "https://example.com/MyCartAddDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/MyCartAddDiscountCodeAction.schema.json" } diff --git a/json-schemas/MyCartAddItemShippingAddressAction.schema.json b/json-schemas/MyCartAddItemShippingAddressAction.schema.json index 63682326..502d65c1 100644 --- a/json-schemas/MyCartAddItemShippingAddressAction.schema.json +++ b/json-schemas/MyCartAddItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartAddItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["addItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/MyCartAddItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCartAddItemShippingAddressAction.schema.json" } diff --git a/json-schemas/MyCartAddLineItemAction.schema.json b/json-schemas/MyCartAddLineItemAction.schema.json index f843dd8a..38f42d3e 100644 --- a/json-schemas/MyCartAddLineItemAction.schema.json +++ b/json-schemas/MyCartAddLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartAddLineItemAction", "type": "object", @@ -22,5 +22,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCartAddLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyCartAddLineItemAction.schema.json" } diff --git a/json-schemas/MyCartAddPaymentAction.schema.json b/json-schemas/MyCartAddPaymentAction.schema.json index 48bf907b..842c38ef 100644 --- a/json-schemas/MyCartAddPaymentAction.schema.json +++ b/json-schemas/MyCartAddPaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartAddPaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/MyCartAddPaymentAction.schema.json" + "$id": "https://api.commercetools.com/MyCartAddPaymentAction.schema.json" } diff --git a/json-schemas/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json b/json-schemas/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json index 81bf8717..ac73d2a6 100644 --- a/json-schemas/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json +++ b/json-schemas/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartApplyDeltaToLineItemShippingDetailsTargetsAction", "type": "object", @@ -16,5 +16,5 @@ "lineItemId", "targetsDelta" ], - "$id": "https://example.com/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json" + "$id": "https://api.commercetools.com/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json" } diff --git a/json-schemas/MyCartChangeLineItemQuantityAction.schema.json b/json-schemas/MyCartChangeLineItemQuantityAction.schema.json index da9147ef..69700326 100644 --- a/json-schemas/MyCartChangeLineItemQuantityAction.schema.json +++ b/json-schemas/MyCartChangeLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartChangeLineItemQuantityAction", "type": "object", @@ -15,5 +15,5 @@ "lineItemId", "quantity" ], - "$id": "https://example.com/MyCartChangeLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/MyCartChangeLineItemQuantityAction.schema.json" } diff --git a/json-schemas/MyCartChangeTaxModeAction.schema.json b/json-schemas/MyCartChangeTaxModeAction.schema.json index 54634f1e..034a0e5f 100644 --- a/json-schemas/MyCartChangeTaxModeAction.schema.json +++ b/json-schemas/MyCartChangeTaxModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartChangeTaxModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxMode" ], - "$id": "https://example.com/MyCartChangeTaxModeAction.schema.json" + "$id": "https://api.commercetools.com/MyCartChangeTaxModeAction.schema.json" } diff --git a/json-schemas/MyCartDraft.schema.json b/json-schemas/MyCartDraft.schema.json index 35aeeaeb..db497d78 100644 --- a/json-schemas/MyCartDraft.schema.json +++ b/json-schemas/MyCartDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartDraft", "type": "object", @@ -22,13 +22,13 @@ "taxMode": {"$ref": "TaxModeEnum.schema.json"}, "itemShippingAddresses": { "type": "array", - "items": {"$ref": "Address.schema.json"} + "items": {"$ref": "BaseAddress.schema.json"} }, "customerEmail": {"type": "string"}, - "shippingAddress": {"$ref": "Address.schema.json"}, + "shippingAddress": {"$ref": "BaseAddress.schema.json"}, "currency": {"type": "string"}, - "billingAddress": {"$ref": "Address.schema.json"} + "billingAddress": {"$ref": "BaseAddress.schema.json"} }, "required": ["currency"], - "$id": "https://example.com/MyCartDraft.schema.json" + "$id": "https://api.commercetools.com/MyCartDraft.schema.json" } diff --git a/json-schemas/MyCartRecalculateAction.schema.json b/json-schemas/MyCartRecalculateAction.schema.json index 579d96cb..69996ed3 100644 --- a/json-schemas/MyCartRecalculateAction.schema.json +++ b/json-schemas/MyCartRecalculateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartRecalculateAction", "type": "object", @@ -8,5 +8,5 @@ "updateProductData": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/MyCartRecalculateAction.schema.json" + "$id": "https://api.commercetools.com/MyCartRecalculateAction.schema.json" } diff --git a/json-schemas/MyCartRemoveDiscountCodeAction.schema.json b/json-schemas/MyCartRemoveDiscountCodeAction.schema.json index f3eadb33..3b7cc3e7 100644 --- a/json-schemas/MyCartRemoveDiscountCodeAction.schema.json +++ b/json-schemas/MyCartRemoveDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartRemoveDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "discountCode" ], - "$id": "https://example.com/MyCartRemoveDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/MyCartRemoveDiscountCodeAction.schema.json" } diff --git a/json-schemas/MyCartRemoveItemShippingAddressAction.schema.json b/json-schemas/MyCartRemoveItemShippingAddressAction.schema.json index af893a04..cec1bad6 100644 --- a/json-schemas/MyCartRemoveItemShippingAddressAction.schema.json +++ b/json-schemas/MyCartRemoveItemShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartRemoveItemShippingAddressAction", "type": "object", @@ -11,5 +11,5 @@ "action", "addressKey" ], - "$id": "https://example.com/MyCartRemoveItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCartRemoveItemShippingAddressAction.schema.json" } diff --git a/json-schemas/MyCartRemoveLineItemAction.schema.json b/json-schemas/MyCartRemoveLineItemAction.schema.json index bc3b7fd9..106858ba 100644 --- a/json-schemas/MyCartRemoveLineItemAction.schema.json +++ b/json-schemas/MyCartRemoveLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartRemoveLineItemAction", "type": "object", @@ -15,5 +15,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyCartRemoveLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyCartRemoveLineItemAction.schema.json" } diff --git a/json-schemas/MyCartRemovePaymentAction.schema.json b/json-schemas/MyCartRemovePaymentAction.schema.json index 8ee39a5c..33b4645d 100644 --- a/json-schemas/MyCartRemovePaymentAction.schema.json +++ b/json-schemas/MyCartRemovePaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartRemovePaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/MyCartRemovePaymentAction.schema.json" + "$id": "https://api.commercetools.com/MyCartRemovePaymentAction.schema.json" } diff --git a/json-schemas/MyCartSetBillingAddressAction.schema.json b/json-schemas/MyCartSetBillingAddressAction.schema.json index 4f1f2d91..ad831133 100644 --- a/json-schemas/MyCartSetBillingAddressAction.schema.json +++ b/json-schemas/MyCartSetBillingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetBillingAddressAction", "type": "object", "properties": { "action": {"enum": ["setBillingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/MyCartSetBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetBillingAddressAction.schema.json" } diff --git a/json-schemas/MyCartSetCountryAction.schema.json b/json-schemas/MyCartSetCountryAction.schema.json index 258a87a1..9393a137 100644 --- a/json-schemas/MyCartSetCountryAction.schema.json +++ b/json-schemas/MyCartSetCountryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetCountryAction", "type": "object", @@ -8,5 +8,5 @@ "country": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCartSetCountryAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetCountryAction.schema.json" } diff --git a/json-schemas/MyCartSetCustomFieldAction.schema.json b/json-schemas/MyCartSetCustomFieldAction.schema.json index 6d2aea87..e03ea746 100644 --- a/json-schemas/MyCartSetCustomFieldAction.schema.json +++ b/json-schemas/MyCartSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/MyCartSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetCustomFieldAction.schema.json" } diff --git a/json-schemas/MyCartSetCustomShippingMethodAction.schema.json b/json-schemas/MyCartSetCustomShippingMethodAction.schema.json deleted file mode 100644 index d533ab36..00000000 --- a/json-schemas/MyCartSetCustomShippingMethodAction.schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "MyCartSetCustomShippingMethodAction", - "type": "object", - "properties": { - "action": {"enum": ["setCustomShippingMethod"]}, - "shippingMethodName": {"type": "string"}, - "shippingRate": {"$ref": "ShippingRateDraft.schema.json"}, - "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"}, - "taxCategory": {"$ref": "TaxCategoryResourceIdentifier.schema.json"} - }, - "required": [ - "action", - "shippingMethodName", - "shippingRate" - ], - "$id": "https://example.com/MyCartSetCustomShippingMethodAction.schema.json" -} diff --git a/json-schemas/MyCartSetCustomTypeAction.schema.json b/json-schemas/MyCartSetCustomTypeAction.schema.json index f8ad5c0e..9b1b031e 100644 --- a/json-schemas/MyCartSetCustomTypeAction.schema.json +++ b/json-schemas/MyCartSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/MyCartSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetCustomTypeAction.schema.json" } diff --git a/json-schemas/MyCartSetCustomerEmailAction.schema.json b/json-schemas/MyCartSetCustomerEmailAction.schema.json new file mode 100644 index 00000000..2601d0c0 --- /dev/null +++ b/json-schemas/MyCartSetCustomerEmailAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyCartSetCustomerEmailAction", + "type": "object", + "properties": { + "action": {"enum": ["setCustomerEmail"]}, + "email": {"type": "string"} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/MyCartSetCustomerEmailAction.schema.json" +} diff --git a/json-schemas/MyCartSetDeleteDaysAfterLastModificationAction.schema.json b/json-schemas/MyCartSetDeleteDaysAfterLastModificationAction.schema.json index 70981ac2..7c9d202f 100644 --- a/json-schemas/MyCartSetDeleteDaysAfterLastModificationAction.schema.json +++ b/json-schemas/MyCartSetDeleteDaysAfterLastModificationAction.schema.json @@ -1,15 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetDeleteDaysAfterLastModificationAction", "type": "object", "properties": { "action": {"enum": ["setDeleteDaysAfterLastModification"]}, - "deleteDaysAfterLastModification": { - "type": "number", - "format": "integer" - } + "deleteDaysAfterLastModification": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/MyCartSetDeleteDaysAfterLastModificationAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetDeleteDaysAfterLastModificationAction.schema.json" } diff --git a/json-schemas/MyCartSetLineItemCustomFieldAction.schema.json b/json-schemas/MyCartSetLineItemCustomFieldAction.schema.json index 31ae239e..e435bb8a 100644 --- a/json-schemas/MyCartSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/MyCartSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/MyCartSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/MyCartSetLineItemCustomTypeAction.schema.json b/json-schemas/MyCartSetLineItemCustomTypeAction.schema.json index accb125b..d76ab684 100644 --- a/json-schemas/MyCartSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/MyCartSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyCartSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/MyCartSetLineItemDistributionChannelAction.schema.json b/json-schemas/MyCartSetLineItemDistributionChannelAction.schema.json index 82c47899..6e357ef3 100644 --- a/json-schemas/MyCartSetLineItemDistributionChannelAction.schema.json +++ b/json-schemas/MyCartSetLineItemDistributionChannelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetLineItemDistributionChannelAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyCartSetLineItemDistributionChannelAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetLineItemDistributionChannelAction.schema.json" } diff --git a/json-schemas/MyCartSetLineItemShippingDetailsAction.schema.json b/json-schemas/MyCartSetLineItemShippingDetailsAction.schema.json index 1dc94f32..595fff32 100644 --- a/json-schemas/MyCartSetLineItemShippingDetailsAction.schema.json +++ b/json-schemas/MyCartSetLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyCartSetLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/MyCartSetLineItemSupplyChannelAction.schema.json b/json-schemas/MyCartSetLineItemSupplyChannelAction.schema.json new file mode 100644 index 00000000..884128d8 --- /dev/null +++ b/json-schemas/MyCartSetLineItemSupplyChannelAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyCartSetLineItemSupplyChannelAction", + "type": "object", + "properties": { + "action": {"enum": ["setLineItemSupplyChannel"]}, + "lineItemId": {"type": "string"}, + "supplyChannel": {"$ref": "ChannelResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "lineItemId" + ], + "$id": "https://api.commercetools.com/MyCartSetLineItemSupplyChannelAction.schema.json" +} diff --git a/json-schemas/MyCartSetLocaleAction.schema.json b/json-schemas/MyCartSetLocaleAction.schema.json index 000d1186..1c12d741 100644 --- a/json-schemas/MyCartSetLocaleAction.schema.json +++ b/json-schemas/MyCartSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/MyCartSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetLocaleAction.schema.json" } diff --git a/json-schemas/MyCartSetShippingAddressAction.schema.json b/json-schemas/MyCartSetShippingAddressAction.schema.json index b65e3ffe..66a06beb 100644 --- a/json-schemas/MyCartSetShippingAddressAction.schema.json +++ b/json-schemas/MyCartSetShippingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["setShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/MyCartSetShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetShippingAddressAction.schema.json" } diff --git a/json-schemas/MyCartSetShippingMethodAction.schema.json b/json-schemas/MyCartSetShippingMethodAction.schema.json index 212f9144..807a82f1 100644 --- a/json-schemas/MyCartSetShippingMethodAction.schema.json +++ b/json-schemas/MyCartSetShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartSetShippingMethodAction", "type": "object", @@ -9,5 +9,5 @@ "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/MyCartSetShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/MyCartSetShippingMethodAction.schema.json" } diff --git a/json-schemas/MyCartUpdate.schema.json b/json-schemas/MyCartUpdate.schema.json index d4f0f5f6..82ca827e 100644 --- a/json-schemas/MyCartUpdate.schema.json +++ b/json-schemas/MyCartUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/MyCartUpdate.schema.json" + "$id": "https://api.commercetools.com/MyCartUpdate.schema.json" } diff --git a/json-schemas/MyCartUpdateAction.schema.json b/json-schemas/MyCartUpdateAction.schema.json index bc45a07b..77f34ba8 100644 --- a/json-schemas/MyCartUpdateAction.schema.json +++ b/json-schemas/MyCartUpdateAction.schema.json @@ -1,38 +1,67 @@ { "oneOf": [ - {"$ref": "https://example.com/MyCartAddDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/MyCartAddItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCartAddLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyCartAddPaymentAction.schema.json"}, - {"$ref": "https://example.com/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json"}, - {"$ref": "https://example.com/MyCartChangeLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/MyCartChangeTaxModeAction.schema.json"}, - {"$ref": "https://example.com/MyCartRecalculateAction.schema.json"}, - {"$ref": "https://example.com/MyCartRemoveDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/MyCartRemoveItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCartRemoveLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyCartRemovePaymentAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetCountryAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetCustomShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetDeleteDaysAfterLastModificationAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetLineItemDistributionChannelAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCartSetShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/MyCartUpdateItemShippingAddressAction.schema.json"} + {"$ref": "https://api.commercetools.com/MyCartAddDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartAddItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartAddLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartAddPaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartApplyDeltaToLineItemShippingDetailsTargetsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartChangeLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartChangeTaxModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartRecalculateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartRemoveDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartRemoveItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartRemoveLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartRemovePaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetCountryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetCustomerEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetDeleteDaysAfterLastModificationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLineItemDistributionChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLineItemSupplyChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartSetShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCartUpdateItemShippingAddressAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addDiscountCode", + "addItemShippingAddress", + "addLineItem", + "addPayment", + "applyDeltaToLineItemShippingDetailsTargets", + "changeLineItemQuantity", + "changeTaxMode", + "recalculate", + "removeDiscountCode", + "removeItemShippingAddress", + "removeLineItem", + "removePayment", + "setBillingAddress", + "setCountry", + "setCustomField", + "setCustomType", + "setCustomerEmail", + "setDeleteDaysAfterLastModification", + "setLineItemCustomField", + "setLineItemCustomType", + "setLineItemDistributionChannel", + "setLineItemShippingDetails", + "setLineItemSupplyChannel", + "setLocale", + "setShippingAddress", + "setShippingMethod", + "updateItemShippingAddress" + ]}}, "required": ["action"], - "$id": "https://example.com/MyCartUpdateAction.schema.json", + "$id": "https://api.commercetools.com/MyCartUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/MyCartUpdateItemShippingAddressAction.schema.json b/json-schemas/MyCartUpdateItemShippingAddressAction.schema.json index 406b2c42..d6ac6a67 100644 --- a/json-schemas/MyCartUpdateItemShippingAddressAction.schema.json +++ b/json-schemas/MyCartUpdateItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCartUpdateItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["updateItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/MyCartUpdateItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCartUpdateItemShippingAddressAction.schema.json" } diff --git a/json-schemas/MyCustomer.schema.json b/json-schemas/MyCustomer.schema.json deleted file mode 100644 index 90c31402..00000000 --- a/json-schemas/MyCustomer.schema.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "MyCustomer", - "type": "object", - "properties": { - "lastName": {"type": "string"}, - "addresses": { - "type": "array", - "items": {"$ref": "Address.schema.json"} - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time" - }, - "companyName": {"type": "string"}, - "vatId": {"type": "string"}, - "title": {"type": "string"}, - "locale": {"type": "string"}, - "shippingAddressIds": { - "type": "array", - "items": {"type": "string"} - }, - "isEmailVerified": {"type": "boolean"}, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "password": {"type": "string"}, - "id": {"type": "string"}, - "email": {"type": "string"}, - "key": {"type": "string"}, - "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, - "stores": { - "type": "array", - "items": {"$ref": "StoreKeyReference.schema.json"} - }, - "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, - "custom": {"$ref": "CustomFields.schema.json"}, - "externalId": {"type": "string"}, - "dateOfBirth": {"type": [ - "number", - "string", - "boolean", - "object", - "array", - "null" - ]}, - "customerNumber": {"type": "string"}, - "defaultShippingAddressId": {"type": "string"}, - "billingAddressIds": { - "type": "array", - "items": {"type": "string"} - }, - "version": {"type": "number"}, - "defaultBillingAddressId": {"type": "string"}, - "firstName": {"type": "string"}, - "createdBy": {"$ref": "CreatedBy.schema.json"}, - "middleName": {"type": "string"}, - "salutation": {"type": "string"} - }, - "required": [ - "id", - "version", - "createdAt", - "lastModifiedAt", - "email", - "password", - "addresses", - "isEmailVerified" - ], - "$id": "https://example.com/MyCustomer.schema.json" -} diff --git a/json-schemas/MyCustomerAddAddressAction.schema.json b/json-schemas/MyCustomerAddAddressAction.schema.json index 3dc84ca8..010b7d81 100644 --- a/json-schemas/MyCustomerAddAddressAction.schema.json +++ b/json-schemas/MyCustomerAddAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerAddAddressAction", "type": "object", "properties": { "action": {"enum": ["addAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/MyCustomerAddAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerAddAddressAction.schema.json" } diff --git a/json-schemas/MyCustomerAddBillingAddressIdAction.schema.json b/json-schemas/MyCustomerAddBillingAddressIdAction.schema.json index 10b29e4b..4b17939a 100644 --- a/json-schemas/MyCustomerAddBillingAddressIdAction.schema.json +++ b/json-schemas/MyCustomerAddBillingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerAddBillingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerAddBillingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerAddBillingAddressIdAction.schema.json" } diff --git a/json-schemas/MyCustomerAddShippingAddressIdAction.schema.json b/json-schemas/MyCustomerAddShippingAddressIdAction.schema.json index c80bbb8e..ea6249e8 100644 --- a/json-schemas/MyCustomerAddShippingAddressIdAction.schema.json +++ b/json-schemas/MyCustomerAddShippingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerAddShippingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerAddShippingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerAddShippingAddressIdAction.schema.json" } diff --git a/json-schemas/MyCustomerChangeAddressAction.schema.json b/json-schemas/MyCustomerChangeAddressAction.schema.json index e6cabe48..e3d78a66 100644 --- a/json-schemas/MyCustomerChangeAddressAction.schema.json +++ b/json-schemas/MyCustomerChangeAddressAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerChangeAddressAction", "type": "object", "properties": { "action": {"enum": ["changeAddress"]}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "addressKey": {"type": "string"}, "addressId": {"type": "string"} }, @@ -13,5 +13,5 @@ "action", "address" ], - "$id": "https://example.com/MyCustomerChangeAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerChangeAddressAction.schema.json" } diff --git a/json-schemas/MyCustomerChangeEmailAction.schema.json b/json-schemas/MyCustomerChangeEmailAction.schema.json index 45f455d0..a75e58e5 100644 --- a/json-schemas/MyCustomerChangeEmailAction.schema.json +++ b/json-schemas/MyCustomerChangeEmailAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerChangeEmailAction", "type": "object", @@ -11,5 +11,5 @@ "action", "email" ], - "$id": "https://example.com/MyCustomerChangeEmailAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerChangeEmailAction.schema.json" } diff --git a/json-schemas/MyCustomerChangePassword.schema.json b/json-schemas/MyCustomerChangePassword.schema.json new file mode 100644 index 00000000..5a2f3396 --- /dev/null +++ b/json-schemas/MyCustomerChangePassword.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyCustomerChangePassword", + "type": "object", + "properties": { + "version": {"type": "number"}, + "newPassword": {"type": "string"}, + "currentPassword": {"type": "string"} + }, + "required": [ + "version", + "currentPassword", + "newPassword" + ], + "$id": "https://api.commercetools.com/MyCustomerChangePassword.schema.json" +} diff --git a/json-schemas/MyCustomerDraft.schema.json b/json-schemas/MyCustomerDraft.schema.json index 39ea2948..7ffc47d9 100644 --- a/json-schemas/MyCustomerDraft.schema.json +++ b/json-schemas/MyCustomerDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerDraft", "type": "object", @@ -7,7 +7,7 @@ "lastName": {"type": "string"}, "addresses": { "type": "array", - "items": {"$ref": "Address.schema.json"} + "items": {"$ref": "BaseAddress.schema.json"} }, "defaultShippingAddress": {"type": "number"}, "stores": { @@ -15,7 +15,7 @@ "items": {"$ref": "StoreResourceIdentifier.schema.json"} }, "companyName": {"type": "string"}, - "custom": {"$ref": "CustomFields.schema.json"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, "vatId": {"type": "string"}, "dateOfBirth": {"type": [ "number", @@ -37,5 +37,5 @@ "email", "password" ], - "$id": "https://example.com/MyCustomerDraft.schema.json" + "$id": "https://api.commercetools.com/MyCustomerDraft.schema.json" } diff --git a/json-schemas/MyCustomerRemoveAddressAction.schema.json b/json-schemas/MyCustomerRemoveAddressAction.schema.json index 61d47c80..2800cfbb 100644 --- a/json-schemas/MyCustomerRemoveAddressAction.schema.json +++ b/json-schemas/MyCustomerRemoveAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerRemoveAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerRemoveAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerRemoveAddressAction.schema.json" } diff --git a/json-schemas/MyCustomerRemoveBillingAddressIdAction.schema.json b/json-schemas/MyCustomerRemoveBillingAddressIdAction.schema.json index b42d7f36..270179f0 100644 --- a/json-schemas/MyCustomerRemoveBillingAddressIdAction.schema.json +++ b/json-schemas/MyCustomerRemoveBillingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerRemoveBillingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerRemoveBillingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerRemoveBillingAddressIdAction.schema.json" } diff --git a/json-schemas/MyCustomerRemoveShippingAddressIdAction.schema.json b/json-schemas/MyCustomerRemoveShippingAddressIdAction.schema.json index 413df092..991f225d 100644 --- a/json-schemas/MyCustomerRemoveShippingAddressIdAction.schema.json +++ b/json-schemas/MyCustomerRemoveShippingAddressIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerRemoveShippingAddressIdAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerRemoveShippingAddressIdAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerRemoveShippingAddressIdAction.schema.json" } diff --git a/json-schemas/MyCustomerResetPassword.schema.json b/json-schemas/MyCustomerResetPassword.schema.json new file mode 100644 index 00000000..e1ab7e5d --- /dev/null +++ b/json-schemas/MyCustomerResetPassword.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyCustomerResetPassword", + "type": "object", + "properties": { + "tokenValue": {"type": "string"}, + "newPassword": {"type": "string"} + }, + "required": [ + "tokenValue", + "newPassword" + ], + "$id": "https://api.commercetools.com/MyCustomerResetPassword.schema.json" +} diff --git a/json-schemas/MyCustomerSetCompanyNameAction.schema.json b/json-schemas/MyCustomerSetCompanyNameAction.schema.json index 6987fa18..7b4e0c3f 100644 --- a/json-schemas/MyCustomerSetCompanyNameAction.schema.json +++ b/json-schemas/MyCustomerSetCompanyNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetCompanyNameAction", "type": "object", @@ -8,5 +8,5 @@ "companyName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetCompanyNameAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetCompanyNameAction.schema.json" } diff --git a/json-schemas/MyCustomerSetCustomFieldAction.schema.json b/json-schemas/MyCustomerSetCustomFieldAction.schema.json index 507d1b6e..b80791c4 100644 --- a/json-schemas/MyCustomerSetCustomFieldAction.schema.json +++ b/json-schemas/MyCustomerSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/MyCustomerSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetCustomFieldAction.schema.json" } diff --git a/json-schemas/MyCustomerSetCustomTypeAction.schema.json b/json-schemas/MyCustomerSetCustomTypeAction.schema.json index ec6f125e..a8ffe9fd 100644 --- a/json-schemas/MyCustomerSetCustomTypeAction.schema.json +++ b/json-schemas/MyCustomerSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetCustomTypeAction.schema.json" } diff --git a/json-schemas/MyCustomerSetDateOfBirthAction.schema.json b/json-schemas/MyCustomerSetDateOfBirthAction.schema.json index 36dc33df..30489655 100644 --- a/json-schemas/MyCustomerSetDateOfBirthAction.schema.json +++ b/json-schemas/MyCustomerSetDateOfBirthAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetDateOfBirthAction", "type": "object", @@ -15,5 +15,5 @@ ]} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetDateOfBirthAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetDateOfBirthAction.schema.json" } diff --git a/json-schemas/MyCustomerSetDefaultBillingAddressAction.schema.json b/json-schemas/MyCustomerSetDefaultBillingAddressAction.schema.json index 3cf10fd1..3ac199a2 100644 --- a/json-schemas/MyCustomerSetDefaultBillingAddressAction.schema.json +++ b/json-schemas/MyCustomerSetDefaultBillingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetDefaultBillingAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetDefaultBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetDefaultBillingAddressAction.schema.json" } diff --git a/json-schemas/MyCustomerSetDefaultShippingAddressAction.schema.json b/json-schemas/MyCustomerSetDefaultShippingAddressAction.schema.json index 94525449..d4428487 100644 --- a/json-schemas/MyCustomerSetDefaultShippingAddressAction.schema.json +++ b/json-schemas/MyCustomerSetDefaultShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetDefaultShippingAddressAction", "type": "object", @@ -9,5 +9,5 @@ "addressId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetDefaultShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetDefaultShippingAddressAction.schema.json" } diff --git a/json-schemas/MyCustomerSetFirstNameAction.schema.json b/json-schemas/MyCustomerSetFirstNameAction.schema.json index 2a7e40d2..db48b0cd 100644 --- a/json-schemas/MyCustomerSetFirstNameAction.schema.json +++ b/json-schemas/MyCustomerSetFirstNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetFirstNameAction", "type": "object", @@ -8,5 +8,5 @@ "firstName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetFirstNameAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetFirstNameAction.schema.json" } diff --git a/json-schemas/MyCustomerSetLastNameAction.schema.json b/json-schemas/MyCustomerSetLastNameAction.schema.json index d78943df..17c0d427 100644 --- a/json-schemas/MyCustomerSetLastNameAction.schema.json +++ b/json-schemas/MyCustomerSetLastNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetLastNameAction", "type": "object", @@ -8,5 +8,5 @@ "lastName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetLastNameAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetLastNameAction.schema.json" } diff --git a/json-schemas/MyCustomerSetLocaleAction.schema.json b/json-schemas/MyCustomerSetLocaleAction.schema.json index 3468f996..91237968 100644 --- a/json-schemas/MyCustomerSetLocaleAction.schema.json +++ b/json-schemas/MyCustomerSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetLocaleAction.schema.json" } diff --git a/json-schemas/MyCustomerSetMiddleNameAction.schema.json b/json-schemas/MyCustomerSetMiddleNameAction.schema.json index 17876fee..552108a9 100644 --- a/json-schemas/MyCustomerSetMiddleNameAction.schema.json +++ b/json-schemas/MyCustomerSetMiddleNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetMiddleNameAction", "type": "object", @@ -8,5 +8,5 @@ "middleName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetMiddleNameAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetMiddleNameAction.schema.json" } diff --git a/json-schemas/MyCustomerSetSalutationAction.schema.json b/json-schemas/MyCustomerSetSalutationAction.schema.json index a699d6e0..8245f6a7 100644 --- a/json-schemas/MyCustomerSetSalutationAction.schema.json +++ b/json-schemas/MyCustomerSetSalutationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetSalutationAction", "type": "object", @@ -8,5 +8,5 @@ "salutation": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetSalutationAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetSalutationAction.schema.json" } diff --git a/json-schemas/MyCustomerSetTitleAction.schema.json b/json-schemas/MyCustomerSetTitleAction.schema.json index c5723aaf..2a08ea98 100644 --- a/json-schemas/MyCustomerSetTitleAction.schema.json +++ b/json-schemas/MyCustomerSetTitleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetTitleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setTitle"]} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetTitleAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetTitleAction.schema.json" } diff --git a/json-schemas/MyCustomerSetVatIdAction.schema.json b/json-schemas/MyCustomerSetVatIdAction.schema.json index 54eb8441..2be381f0 100644 --- a/json-schemas/MyCustomerSetVatIdAction.schema.json +++ b/json-schemas/MyCustomerSetVatIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerSetVatIdAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setVatId"]} }, "required": ["action"], - "$id": "https://example.com/MyCustomerSetVatIdAction.schema.json" + "$id": "https://api.commercetools.com/MyCustomerSetVatIdAction.schema.json" } diff --git a/json-schemas/MyCustomerSignin.schema.json b/json-schemas/MyCustomerSignin.schema.json new file mode 100644 index 00000000..56b429b4 --- /dev/null +++ b/json-schemas/MyCustomerSignin.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyCustomerSignin", + "type": "object", + "properties": { + "activeCartSignInMode": {"$ref": "AnonymousCartSignInModeEnum.schema.json"}, + "updateProductData": {"type": "boolean"}, + "password": {"type": "string"}, + "email": {"type": "string"} + }, + "required": [ + "email", + "password" + ], + "$id": "https://api.commercetools.com/MyCustomerSignin.schema.json" +} diff --git a/json-schemas/MyCustomerUpdate.schema.json b/json-schemas/MyCustomerUpdate.schema.json index 20559005..fdb0e68d 100644 --- a/json-schemas/MyCustomerUpdate.schema.json +++ b/json-schemas/MyCustomerUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/MyCustomerUpdate.schema.json" + "$id": "https://api.commercetools.com/MyCustomerUpdate.schema.json" } diff --git a/json-schemas/MyCustomerUpdateAction.schema.json b/json-schemas/MyCustomerUpdateAction.schema.json index dc4fc807..6d4cbe1b 100644 --- a/json-schemas/MyCustomerUpdateAction.schema.json +++ b/json-schemas/MyCustomerUpdateAction.schema.json @@ -1,33 +1,55 @@ { "oneOf": [ - {"$ref": "https://example.com/MyCustomerAddAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerAddBillingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerAddShippingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerChangeAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerChangeEmailAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerRemoveAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerRemoveBillingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerRemoveShippingAddressIdAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetCompanyNameAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetDateOfBirthAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetDefaultBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetDefaultShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetFirstNameAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetLastNameAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetMiddleNameAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetSalutationAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetTitleAction.schema.json"}, - {"$ref": "https://example.com/MyCustomerSetVatIdAction.schema.json"} + {"$ref": "https://api.commercetools.com/MyCustomerAddAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerAddBillingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerAddShippingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerChangeAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerChangeEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerRemoveAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerRemoveBillingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerRemoveShippingAddressIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetCompanyNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetDateOfBirthAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetDefaultBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetDefaultShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetFirstNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetLastNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetMiddleNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetSalutationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetTitleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyCustomerSetVatIdAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyCustomerUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addAddress", + "addBillingAddressId", + "addShippingAddressId", + "changeAddress", + "changeEmail", + "removeAddress", + "removeBillingAddressId", + "removeShippingAddressId", + "setCompanyName", + "setCustomField", + "setCustomType", + "setDateOfBirth", + "setDefaultBillingAddress", + "setDefaultShippingAddress", + "setFirstName", + "setLastName", + "setLocale", + "setMiddleName", + "setSalutation", + "setTitle", + "setVatId" + ]}}, "required": ["action"], - "$id": "https://example.com/MyCustomerUpdateAction.schema.json", + "$id": "https://api.commercetools.com/MyCustomerUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/MyLineItemDraft.schema.json b/json-schemas/MyLineItemDraft.schema.json index 5775ec87..687c6f86 100644 --- a/json-schemas/MyLineItemDraft.schema.json +++ b/json-schemas/MyLineItemDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyLineItemDraft", "type": "object", @@ -17,10 +17,6 @@ "distributionChannel": {"$ref": "ChannelResourceIdentifier.schema.json"}, "sku": {"type": "string"} }, - "required": [ - "productId", - "variantId", - "quantity" - ], - "$id": "https://example.com/MyLineItemDraft.schema.json" + "required": ["quantity"], + "$id": "https://api.commercetools.com/MyLineItemDraft.schema.json" } diff --git a/json-schemas/MyOrderFromCartDraft.schema.json b/json-schemas/MyOrderFromCartDraft.schema.json index 70a5e9e7..c238453f 100644 --- a/json-schemas/MyOrderFromCartDraft.schema.json +++ b/json-schemas/MyOrderFromCartDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyOrderFromCartDraft", "type": "object", @@ -11,5 +11,5 @@ "id", "version" ], - "$id": "https://example.com/MyOrderFromCartDraft.schema.json" + "$id": "https://api.commercetools.com/MyOrderFromCartDraft.schema.json" } diff --git a/json-schemas/MyPayment.schema.json b/json-schemas/MyPayment.schema.json index 7f959235..ee075421 100644 --- a/json-schemas/MyPayment.schema.json +++ b/json-schemas/MyPayment.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPayment", "type": "object", @@ -23,5 +23,5 @@ "paymentMethodInfo", "transactions" ], - "$id": "https://example.com/MyPayment.schema.json" + "$id": "https://api.commercetools.com/MyPayment.schema.json" } diff --git a/json-schemas/MyPaymentAddTransactionAction.schema.json b/json-schemas/MyPaymentAddTransactionAction.schema.json index 1bddf4f2..b05e3756 100644 --- a/json-schemas/MyPaymentAddTransactionAction.schema.json +++ b/json-schemas/MyPaymentAddTransactionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentAddTransactionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "transaction" ], - "$id": "https://example.com/MyPaymentAddTransactionAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentAddTransactionAction.schema.json" } diff --git a/json-schemas/MyPaymentChangeAmountPlannedAction.schema.json b/json-schemas/MyPaymentChangeAmountPlannedAction.schema.json index 5f214c18..bd598f40 100644 --- a/json-schemas/MyPaymentChangeAmountPlannedAction.schema.json +++ b/json-schemas/MyPaymentChangeAmountPlannedAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentChangeAmountPlannedAction", "type": "object", @@ -11,5 +11,5 @@ "action", "amount" ], - "$id": "https://example.com/MyPaymentChangeAmountPlannedAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentChangeAmountPlannedAction.schema.json" } diff --git a/json-schemas/MyPaymentDraft.schema.json b/json-schemas/MyPaymentDraft.schema.json index 913f9ed8..de6a2373 100644 --- a/json-schemas/MyPaymentDraft.schema.json +++ b/json-schemas/MyPaymentDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentDraft", "type": "object", @@ -10,5 +10,5 @@ "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["amountPlanned"], - "$id": "https://example.com/MyPaymentDraft.schema.json" + "$id": "https://api.commercetools.com/MyPaymentDraft.schema.json" } diff --git a/json-schemas/MyPaymentPagedQueryResponse.schema.json b/json-schemas/MyPaymentPagedQueryResponse.schema.json index d6d205df..1286f857 100644 --- a/json-schemas/MyPaymentPagedQueryResponse.schema.json +++ b/json-schemas/MyPaymentPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/MyPaymentPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/MyPaymentPagedQueryResponse.schema.json" } diff --git a/json-schemas/MyPaymentSetCustomFieldAction.schema.json b/json-schemas/MyPaymentSetCustomFieldAction.schema.json index d12ca70c..c887a510 100644 --- a/json-schemas/MyPaymentSetCustomFieldAction.schema.json +++ b/json-schemas/MyPaymentSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/MyPaymentSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentSetCustomFieldAction.schema.json" } diff --git a/json-schemas/MyPaymentSetMethodInfoInterfaceAction.schema.json b/json-schemas/MyPaymentSetMethodInfoInterfaceAction.schema.json index 38a89cc0..457b59ea 100644 --- a/json-schemas/MyPaymentSetMethodInfoInterfaceAction.schema.json +++ b/json-schemas/MyPaymentSetMethodInfoInterfaceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentSetMethodInfoInterfaceAction", "type": "object", @@ -11,5 +11,5 @@ "action", "interface" ], - "$id": "https://example.com/MyPaymentSetMethodInfoInterfaceAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentSetMethodInfoInterfaceAction.schema.json" } diff --git a/json-schemas/MyPaymentSetMethodInfoMethodAction.schema.json b/json-schemas/MyPaymentSetMethodInfoMethodAction.schema.json index 55450ced..110c43c7 100644 --- a/json-schemas/MyPaymentSetMethodInfoMethodAction.schema.json +++ b/json-schemas/MyPaymentSetMethodInfoMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentSetMethodInfoMethodAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setMethodInfoMethod"]} }, "required": ["action"], - "$id": "https://example.com/MyPaymentSetMethodInfoMethodAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentSetMethodInfoMethodAction.schema.json" } diff --git a/json-schemas/MyPaymentSetMethodInfoNameAction.schema.json b/json-schemas/MyPaymentSetMethodInfoNameAction.schema.json index 8b9d5699..e89c7acd 100644 --- a/json-schemas/MyPaymentSetMethodInfoNameAction.schema.json +++ b/json-schemas/MyPaymentSetMethodInfoNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentSetMethodInfoNameAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setMethodInfoName"]} }, "required": ["action"], - "$id": "https://example.com/MyPaymentSetMethodInfoNameAction.schema.json" + "$id": "https://api.commercetools.com/MyPaymentSetMethodInfoNameAction.schema.json" } diff --git a/json-schemas/MyPaymentSetTransactionCustomFieldAction.schema.json b/json-schemas/MyPaymentSetTransactionCustomFieldAction.schema.json new file mode 100644 index 00000000..a8d4ce2a --- /dev/null +++ b/json-schemas/MyPaymentSetTransactionCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyPaymentSetTransactionCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setTransactionCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/MyPaymentSetTransactionCustomFieldAction.schema.json" +} diff --git a/json-schemas/MyPaymentUpdate.schema.json b/json-schemas/MyPaymentUpdate.schema.json index f1eb289f..d431cda2 100644 --- a/json-schemas/MyPaymentUpdate.schema.json +++ b/json-schemas/MyPaymentUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/MyPaymentUpdate.schema.json" + "$id": "https://api.commercetools.com/MyPaymentUpdate.schema.json" } diff --git a/json-schemas/MyPaymentUpdateAction.schema.json b/json-schemas/MyPaymentUpdateAction.schema.json index e976be71..d630d1c1 100644 --- a/json-schemas/MyPaymentUpdateAction.schema.json +++ b/json-schemas/MyPaymentUpdateAction.schema.json @@ -1,18 +1,27 @@ { "oneOf": [ - {"$ref": "https://example.com/MyPaymentAddTransactionAction.schema.json"}, - {"$ref": "https://example.com/MyPaymentChangeAmountPlannedAction.schema.json"}, - {"$ref": "https://example.com/MyPaymentSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyPaymentSetMethodInfoInterfaceAction.schema.json"}, - {"$ref": "https://example.com/MyPaymentSetMethodInfoMethodAction.schema.json"}, - {"$ref": "https://example.com/MyPaymentSetMethodInfoNameAction.schema.json"} + {"$ref": "https://api.commercetools.com/MyPaymentAddTransactionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentChangeAmountPlannedAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentSetMethodInfoInterfaceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentSetMethodInfoMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentSetMethodInfoNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyPaymentSetTransactionCustomFieldAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyPaymentUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addTransaction", + "changeAmountPlanned", + "setCustomField", + "setMethodInfoInterface", + "setMethodInfoMethod", + "setMethodInfoName", + "setTransactionCustomField" + ]}}, "required": ["action"], - "$id": "https://example.com/MyPaymentUpdateAction.schema.json", + "$id": "https://api.commercetools.com/MyPaymentUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/MyQuoteRequestCancelAction.schema.json b/json-schemas/MyQuoteRequestCancelAction.schema.json new file mode 100644 index 00000000..34416d95 --- /dev/null +++ b/json-schemas/MyQuoteRequestCancelAction.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Transitions the `quoteRequestState` of the Quote Request to `Cancelled`. Can only be used when the Quote Request is in state `Submitted`.", + "additionalProperties": false, + "title": "MyQuoteRequestCancelAction", + "type": "object", + "properties": {"action": {"enum": ["cancelQuoteRequest"]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/MyQuoteRequestCancelAction.schema.json" +} diff --git a/json-schemas/MyQuoteRequestDraft.schema.json b/json-schemas/MyQuoteRequestDraft.schema.json new file mode 100644 index 00000000..3f87412b --- /dev/null +++ b/json-schemas/MyQuoteRequestDraft.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyQuoteRequestDraft", + "type": "object", + "properties": { + "version": {"type": "number"}, + "cart": {"$ref": "CartResourceIdentifier.schema.json"}, + "comment": {"type": "string"} + }, + "required": [ + "cart", + "version", + "comment" + ], + "$id": "https://api.commercetools.com/MyQuoteRequestDraft.schema.json" +} diff --git a/json-schemas/MyQuoteRequestUpdate.schema.json b/json-schemas/MyQuoteRequestUpdate.schema.json new file mode 100644 index 00000000..6a409864 --- /dev/null +++ b/json-schemas/MyQuoteRequestUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyQuoteRequestUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "MyQuoteRequestUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/MyQuoteRequestUpdate.schema.json" +} diff --git a/json-schemas/MyQuoteRequestUpdateAction.schema.json b/json-schemas/MyQuoteRequestUpdateAction.schema.json new file mode 100644 index 00000000..ec387ae3 --- /dev/null +++ b/json-schemas/MyQuoteRequestUpdateAction.schema.json @@ -0,0 +1,11 @@ +{ + "oneOf": [{"$ref": "https://api.commercetools.com/MyQuoteRequestCancelAction.schema.json"}], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "MyQuoteRequestUpdateAction", + "type": "object", + "properties": {"action": {"enum": ["cancelQuoteRequest"]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/MyQuoteRequestUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/MyShoppingList.schema.json b/json-schemas/MyShoppingList.schema.json deleted file mode 100644 index e366935a..00000000 --- a/json-schemas/MyShoppingList.schema.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "MyShoppingList", - "type": "object", - "properties": { - "textLineItems": { - "type": "array", - "items": {"$ref": "TextLineItem.schema.json"} - }, - "anonymousId": {"type": "string"}, - "lastModifiedAt": { - "type": "string", - "format": "date-time" - }, - "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, - "custom": {"$ref": "CustomFields.schema.json"}, - "deleteDaysAfterLastModification": {"type": "number"}, - "description": {"$ref": "LocalizedString.schema.json"}, - "version": {"type": "number"}, - "lineItems": { - "type": "array", - "items": {"$ref": "ShoppingListLineItem.schema.json"} - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": {"$ref": "CreatedBy.schema.json"}, - "name": {"$ref": "LocalizedString.schema.json"}, - "id": {"type": "string"}, - "key": {"type": "string"}, - "slug": {"$ref": "LocalizedString.schema.json"}, - "customer": {"$ref": "CustomerReference.schema.json"} - }, - "required": [ - "id", - "version", - "createdAt", - "lastModifiedAt", - "name" - ], - "$id": "https://example.com/MyShoppingList.schema.json" -} diff --git a/json-schemas/MyShoppingListAddLineItemAction.schema.json b/json-schemas/MyShoppingListAddLineItemAction.schema.json index 897d14af..7b423006 100644 --- a/json-schemas/MyShoppingListAddLineItemAction.schema.json +++ b/json-schemas/MyShoppingListAddLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListAddLineItemAction", "type": "object", @@ -16,5 +16,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/MyShoppingListAddLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListAddLineItemAction.schema.json" } diff --git a/json-schemas/MyShoppingListAddTextLineItemAction.schema.json b/json-schemas/MyShoppingListAddTextLineItemAction.schema.json index 95c8c2bb..0a178841 100644 --- a/json-schemas/MyShoppingListAddTextLineItemAction.schema.json +++ b/json-schemas/MyShoppingListAddTextLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListAddTextLineItemAction", "type": "object", @@ -18,5 +18,5 @@ "action", "name" ], - "$id": "https://example.com/MyShoppingListAddTextLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListAddTextLineItemAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeLineItemQuantityAction.schema.json b/json-schemas/MyShoppingListChangeLineItemQuantityAction.schema.json index 758ec013..b9cd618b 100644 --- a/json-schemas/MyShoppingListChangeLineItemQuantityAction.schema.json +++ b/json-schemas/MyShoppingListChangeLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "lineItemId", "quantity" ], - "$id": "https://example.com/MyShoppingListChangeLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeLineItemQuantityAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeLineItemsOrderAction.schema.json b/json-schemas/MyShoppingListChangeLineItemsOrderAction.schema.json index 799513f1..66be9ff2 100644 --- a/json-schemas/MyShoppingListChangeLineItemsOrderAction.schema.json +++ b/json-schemas/MyShoppingListChangeLineItemsOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeLineItemsOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "lineItemOrder" ], - "$id": "https://example.com/MyShoppingListChangeLineItemsOrderAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeLineItemsOrderAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeNameAction.schema.json b/json-schemas/MyShoppingListChangeNameAction.schema.json index ba723630..9999780b 100644 --- a/json-schemas/MyShoppingListChangeNameAction.schema.json +++ b/json-schemas/MyShoppingListChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/MyShoppingListChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeNameAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeTextLineItemNameAction.schema.json b/json-schemas/MyShoppingListChangeTextLineItemNameAction.schema.json index 84e8db78..8d6e5d59 100644 --- a/json-schemas/MyShoppingListChangeTextLineItemNameAction.schema.json +++ b/json-schemas/MyShoppingListChangeTextLineItemNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeTextLineItemNameAction", "type": "object", @@ -13,5 +13,5 @@ "textLineItemId", "name" ], - "$id": "https://example.com/MyShoppingListChangeTextLineItemNameAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeTextLineItemNameAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeTextLineItemQuantityAction.schema.json b/json-schemas/MyShoppingListChangeTextLineItemQuantityAction.schema.json index b9a214b9..2d39b917 100644 --- a/json-schemas/MyShoppingListChangeTextLineItemQuantityAction.schema.json +++ b/json-schemas/MyShoppingListChangeTextLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeTextLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "textLineItemId", "quantity" ], - "$id": "https://example.com/MyShoppingListChangeTextLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeTextLineItemQuantityAction.schema.json" } diff --git a/json-schemas/MyShoppingListChangeTextLineItemsOrderAction.schema.json b/json-schemas/MyShoppingListChangeTextLineItemsOrderAction.schema.json index 3fa043da..3e3a1620 100644 --- a/json-schemas/MyShoppingListChangeTextLineItemsOrderAction.schema.json +++ b/json-schemas/MyShoppingListChangeTextLineItemsOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListChangeTextLineItemsOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "textLineItemOrder" ], - "$id": "https://example.com/MyShoppingListChangeTextLineItemsOrderAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListChangeTextLineItemsOrderAction.schema.json" } diff --git a/json-schemas/MyShoppingListDraft.schema.json b/json-schemas/MyShoppingListDraft.schema.json index 758a9361..1b8d3f9b 100644 --- a/json-schemas/MyShoppingListDraft.schema.json +++ b/json-schemas/MyShoppingListDraft.schema.json @@ -1,22 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListDraft", "type": "object", "properties": { - "name": {"$ref": "LocalizedString.schema.json"}, "lineItems": { "type": "array", "items": {"$ref": "ShoppingListLineItemDraft.schema.json"} }, - "description": {"$ref": "LocalizedString.schema.json"}, "textLineItems": { "type": "array", "items": {"$ref": "TextLineItemDraft.schema.json"} }, "custom": {"$ref": "CustomFieldsDraft.schema.json"}, - "deleteDaysAfterLastModification": {"type": "number"} + "deleteDaysAfterLastModification": {"type": "number"}, + "name": {"$ref": "LocalizedString.schema.json"}, + "description": {"$ref": "LocalizedString.schema.json"}, + "store": {"$ref": "StoreResourceIdentifier.schema.json"} }, "required": ["name"], - "$id": "https://example.com/MyShoppingListDraft.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListDraft.schema.json" } diff --git a/json-schemas/MyShoppingListRemoveLineItemAction.schema.json b/json-schemas/MyShoppingListRemoveLineItemAction.schema.json index 65c1e5da..83c1521e 100644 --- a/json-schemas/MyShoppingListRemoveLineItemAction.schema.json +++ b/json-schemas/MyShoppingListRemoveLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListRemoveLineItemAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyShoppingListRemoveLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListRemoveLineItemAction.schema.json" } diff --git a/json-schemas/MyShoppingListRemoveTextLineItemAction.schema.json b/json-schemas/MyShoppingListRemoveTextLineItemAction.schema.json index 252f7482..dbd0a8f4 100644 --- a/json-schemas/MyShoppingListRemoveTextLineItemAction.schema.json +++ b/json-schemas/MyShoppingListRemoveTextLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListRemoveTextLineItemAction", "type": "object", @@ -12,5 +12,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/MyShoppingListRemoveTextLineItemAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListRemoveTextLineItemAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetCustomFieldAction.schema.json b/json-schemas/MyShoppingListSetCustomFieldAction.schema.json index 896a7e22..36f8bf3f 100644 --- a/json-schemas/MyShoppingListSetCustomFieldAction.schema.json +++ b/json-schemas/MyShoppingListSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/MyShoppingListSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetCustomFieldAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetCustomTypeAction.schema.json b/json-schemas/MyShoppingListSetCustomTypeAction.schema.json index 1b2fe499..5ae1c323 100644 --- a/json-schemas/MyShoppingListSetCustomTypeAction.schema.json +++ b/json-schemas/MyShoppingListSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/MyShoppingListSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetCustomTypeAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json b/json-schemas/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json index ae55d78c..1cad4943 100644 --- a/json-schemas/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json +++ b/json-schemas/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetDeleteDaysAfterLastModificationAction", "type": "object", @@ -8,5 +8,5 @@ "deleteDaysAfterLastModification": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetDescriptionAction.schema.json b/json-schemas/MyShoppingListSetDescriptionAction.schema.json index d4d61fe3..807b24c2 100644 --- a/json-schemas/MyShoppingListSetDescriptionAction.schema.json +++ b/json-schemas/MyShoppingListSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/MyShoppingListSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetDescriptionAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetLineItemCustomFieldAction.schema.json b/json-schemas/MyShoppingListSetLineItemCustomFieldAction.schema.json index 2854080e..71af1eb3 100644 --- a/json-schemas/MyShoppingListSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/MyShoppingListSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/MyShoppingListSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetLineItemCustomTypeAction.schema.json b/json-schemas/MyShoppingListSetLineItemCustomTypeAction.schema.json index 0b6f4f93..a8fac0a7 100644 --- a/json-schemas/MyShoppingListSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/MyShoppingListSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/MyShoppingListSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetTextLineItemCustomFieldAction.schema.json b/json-schemas/MyShoppingListSetTextLineItemCustomFieldAction.schema.json index 8020bd97..6c89e45b 100644 --- a/json-schemas/MyShoppingListSetTextLineItemCustomFieldAction.schema.json +++ b/json-schemas/MyShoppingListSetTextLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetTextLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "textLineItemId", "name" ], - "$id": "https://example.com/MyShoppingListSetTextLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetTextLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetTextLineItemCustomTypeAction.schema.json b/json-schemas/MyShoppingListSetTextLineItemCustomTypeAction.schema.json index 56d5ea48..bf905bbc 100644 --- a/json-schemas/MyShoppingListSetTextLineItemCustomTypeAction.schema.json +++ b/json-schemas/MyShoppingListSetTextLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetTextLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/MyShoppingListSetTextLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetTextLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/MyShoppingListSetTextLineItemDescriptionAction.schema.json b/json-schemas/MyShoppingListSetTextLineItemDescriptionAction.schema.json index e2d5c5aa..677dd8ce 100644 --- a/json-schemas/MyShoppingListSetTextLineItemDescriptionAction.schema.json +++ b/json-schemas/MyShoppingListSetTextLineItemDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListSetTextLineItemDescriptionAction", "type": "object", @@ -12,5 +12,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/MyShoppingListSetTextLineItemDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListSetTextLineItemDescriptionAction.schema.json" } diff --git a/json-schemas/MyShoppingListUpdate.schema.json b/json-schemas/MyShoppingListUpdate.schema.json index f9164112..a76afaa4 100644 --- a/json-schemas/MyShoppingListUpdate.schema.json +++ b/json-schemas/MyShoppingListUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/MyShoppingListUpdate.schema.json" + "$id": "https://api.commercetools.com/MyShoppingListUpdate.schema.json" } diff --git a/json-schemas/MyShoppingListUpdateAction.schema.json b/json-schemas/MyShoppingListUpdateAction.schema.json index ac789feb..9e440d79 100644 --- a/json-schemas/MyShoppingListUpdateAction.schema.json +++ b/json-schemas/MyShoppingListUpdateAction.schema.json @@ -1,31 +1,51 @@ { "oneOf": [ - {"$ref": "https://example.com/MyShoppingListAddLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListAddTextLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeLineItemsOrderAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeNameAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeTextLineItemNameAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeTextLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListChangeTextLineItemsOrderAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListRemoveLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListRemoveTextLineItemAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetTextLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetTextLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/MyShoppingListSetTextLineItemDescriptionAction.schema.json"} + {"$ref": "https://api.commercetools.com/MyShoppingListAddLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListAddTextLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeLineItemsOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeTextLineItemNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeTextLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListChangeTextLineItemsOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListRemoveLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListRemoveTextLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetDeleteDaysAfterLastModificationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetTextLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetTextLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/MyShoppingListSetTextLineItemDescriptionAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyShoppingListUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addLineItem", + "addTextLineItem", + "changeLineItemQuantity", + "changeLineItemsOrder", + "changeName", + "changeTextLineItemName", + "changeTextLineItemQuantity", + "changeTextLineItemsOrder", + "removeLineItem", + "removeTextLineItem", + "setCustomField", + "setCustomType", + "setDeleteDaysAfterLastModification", + "setDescription", + "setLineItemCustomField", + "setLineItemCustomType", + "setTextLineItemCustomField", + "setTextLineItemCustomType", + "setTextLineItemDescription" + ]}}, "required": ["action"], - "$id": "https://example.com/MyShoppingListUpdateAction.schema.json", + "$id": "https://api.commercetools.com/MyShoppingListUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/MyTransactionDraft.schema.json b/json-schemas/MyTransactionDraft.schema.json index a783de1d..8573dba9 100644 --- a/json-schemas/MyTransactionDraft.schema.json +++ b/json-schemas/MyTransactionDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "MyTransactionDraft", "type": "object", @@ -10,11 +10,12 @@ "timestamp": { "type": "string", "format": "date-time" - } + }, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": [ "type", "amount" ], - "$id": "https://example.com/MyTransactionDraft.schema.json" + "$id": "https://api.commercetools.com/MyTransactionDraft.schema.json" } diff --git a/json-schemas/NoMatchingProductDiscountFoundError.schema.json b/json-schemas/NoMatchingProductDiscountFoundError.schema.json index 3f08aab7..3c1b842a 100644 --- a/json-schemas/NoMatchingProductDiscountFoundError.schema.json +++ b/json-schemas/NoMatchingProductDiscountFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "NoMatchingProductDiscountFoundError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/NoMatchingProductDiscountFoundError.schema.json" + "$id": "https://api.commercetools.com/NoMatchingProductDiscountFoundError.schema.json" } diff --git a/json-schemas/NotEnabledError.schema.json b/json-schemas/NotEnabledError.schema.json index 52420e20..fbed59da 100644 --- a/json-schemas/NotEnabledError.schema.json +++ b/json-schemas/NotEnabledError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "NotEnabledError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/NotEnabledError.schema.json" + "$id": "https://api.commercetools.com/NotEnabledError.schema.json" } diff --git a/json-schemas/ObjectNotFoundError.schema.json b/json-schemas/ObjectNotFoundError.schema.json index b78cd208..1afc3996 100644 --- a/json-schemas/ObjectNotFoundError.schema.json +++ b/json-schemas/ObjectNotFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ObjectNotFoundError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/ObjectNotFoundError.schema.json" + "$id": "https://api.commercetools.com/ObjectNotFoundError.schema.json" } diff --git a/json-schemas/Order.schema.json b/json-schemas/Order.schema.json index 7238e6fe..a5f5a063 100644 --- a/json-schemas/Order.schema.json +++ b/json-schemas/Order.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Order", "type": "object", @@ -36,6 +36,7 @@ "type": "string", "format": "date-time" }, + "quote": {"$ref": "QuoteReference.schema.json"}, "customLineItems": { "type": "array", "items": {"$ref": "CustomLineItem.schema.json"} @@ -86,9 +87,8 @@ "totalPrice", "orderState", "syncInfo", - "lastMessageSequenceNumber", "origin", "refusedGifts" ], - "$id": "https://example.com/Order.schema.json" + "$id": "https://api.commercetools.com/Order.schema.json" } diff --git a/json-schemas/OrderAddDeliveryAction.schema.json b/json-schemas/OrderAddDeliveryAction.schema.json index d564ac6f..5b770001 100644 --- a/json-schemas/OrderAddDeliveryAction.schema.json +++ b/json-schemas/OrderAddDeliveryAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderAddDeliveryAction", "type": "object", "properties": { "action": {"enum": ["addDelivery"]}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "items": { "type": "array", "items": {"$ref": "DeliveryItem.schema.json"} @@ -13,8 +13,9 @@ "parcels": { "type": "array", "items": {"$ref": "ParcelDraft.schema.json"} - } + }, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/OrderAddDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/OrderAddDeliveryAction.schema.json" } diff --git a/json-schemas/OrderAddItemShippingAddressAction.schema.json b/json-schemas/OrderAddItemShippingAddressAction.schema.json index 74ba0760..6599395d 100644 --- a/json-schemas/OrderAddItemShippingAddressAction.schema.json +++ b/json-schemas/OrderAddItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderAddItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["addItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/OrderAddItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderAddItemShippingAddressAction.schema.json" } diff --git a/json-schemas/OrderAddParcelToDeliveryAction.schema.json b/json-schemas/OrderAddParcelToDeliveryAction.schema.json index fb21c3d0..8b6845ca 100644 --- a/json-schemas/OrderAddParcelToDeliveryAction.schema.json +++ b/json-schemas/OrderAddParcelToDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderAddParcelToDeliveryAction", "type": "object", @@ -17,5 +17,5 @@ "action", "deliveryId" ], - "$id": "https://example.com/OrderAddParcelToDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/OrderAddParcelToDeliveryAction.schema.json" } diff --git a/json-schemas/OrderAddPaymentAction.schema.json b/json-schemas/OrderAddPaymentAction.schema.json index 4eecb72c..187d9946 100644 --- a/json-schemas/OrderAddPaymentAction.schema.json +++ b/json-schemas/OrderAddPaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderAddPaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/OrderAddPaymentAction.schema.json" + "$id": "https://api.commercetools.com/OrderAddPaymentAction.schema.json" } diff --git a/json-schemas/OrderAddReturnInfoAction.schema.json b/json-schemas/OrderAddReturnInfoAction.schema.json index 7d4f1b93..71090230 100644 --- a/json-schemas/OrderAddReturnInfoAction.schema.json +++ b/json-schemas/OrderAddReturnInfoAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderAddReturnInfoAction", "type": "object", @@ -19,5 +19,5 @@ "action", "items" ], - "$id": "https://example.com/OrderAddReturnInfoAction.schema.json" + "$id": "https://api.commercetools.com/OrderAddReturnInfoAction.schema.json" } diff --git a/json-schemas/OrderBillingAddressSetMessage.schema.json b/json-schemas/OrderBillingAddressSetMessage.schema.json index bc01cfe7..b13f89c9 100644 --- a/json-schemas/OrderBillingAddressSetMessage.schema.json +++ b/json-schemas/OrderBillingAddressSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderBillingAddressSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderBillingAddressSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderBillingAddressSetMessage.schema.json" } diff --git a/json-schemas/OrderBillingAddressSetMessagePayload.schema.json b/json-schemas/OrderBillingAddressSetMessagePayload.schema.json index 23dd3e49..f68cd088 100644 --- a/json-schemas/OrderBillingAddressSetMessagePayload.schema.json +++ b/json-schemas/OrderBillingAddressSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderBillingAddressSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "address": {"$ref": "Address.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderBillingAddressSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderBillingAddressSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderChangeOrderStateAction.schema.json b/json-schemas/OrderChangeOrderStateAction.schema.json index 42c6d52b..1d14c562 100644 --- a/json-schemas/OrderChangeOrderStateAction.schema.json +++ b/json-schemas/OrderChangeOrderStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderChangeOrderStateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "orderState" ], - "$id": "https://example.com/OrderChangeOrderStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderChangeOrderStateAction.schema.json" } diff --git a/json-schemas/OrderChangePaymentStateAction.schema.json b/json-schemas/OrderChangePaymentStateAction.schema.json index e9261710..d5217696 100644 --- a/json-schemas/OrderChangePaymentStateAction.schema.json +++ b/json-schemas/OrderChangePaymentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderChangePaymentStateAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["changePaymentState"]} }, "required": ["action"], - "$id": "https://example.com/OrderChangePaymentStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderChangePaymentStateAction.schema.json" } diff --git a/json-schemas/OrderChangeShipmentStateAction.schema.json b/json-schemas/OrderChangeShipmentStateAction.schema.json index f7e40617..19d0ef63 100644 --- a/json-schemas/OrderChangeShipmentStateAction.schema.json +++ b/json-schemas/OrderChangeShipmentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderChangeShipmentStateAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["changeShipmentState"]} }, "required": ["action"], - "$id": "https://example.com/OrderChangeShipmentStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderChangeShipmentStateAction.schema.json" } diff --git a/json-schemas/OrderCreatedMessage.schema.json b/json-schemas/OrderCreatedMessage.schema.json index c275c4dc..1d6d532d 100644 --- a/json-schemas/OrderCreatedMessage.schema.json +++ b/json-schemas/OrderCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "order" ], - "$id": "https://example.com/OrderCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderCreatedMessage.schema.json" } diff --git a/json-schemas/OrderCreatedMessagePayload.schema.json b/json-schemas/OrderCreatedMessagePayload.schema.json index e8627850..ec8c4d70 100644 --- a/json-schemas/OrderCreatedMessagePayload.schema.json +++ b/json-schemas/OrderCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "order" ], - "$id": "https://example.com/OrderCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderCreatedMessagePayload.schema.json" } diff --git a/json-schemas/OrderCustomLineItemDiscountSetMessage.schema.json b/json-schemas/OrderCustomLineItemDiscountSetMessage.schema.json index d93d07e9..4a60d3a4 100644 --- a/json-schemas/OrderCustomLineItemDiscountSetMessage.schema.json +++ b/json-schemas/OrderCustomLineItemDiscountSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomLineItemDiscountSetMessage", "type": "object", @@ -40,5 +40,5 @@ "customLineItemId", "discountedPricePerQuantity" ], - "$id": "https://example.com/OrderCustomLineItemDiscountSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderCustomLineItemDiscountSetMessage.schema.json" } diff --git a/json-schemas/OrderCustomLineItemDiscountSetMessagePayload.schema.json b/json-schemas/OrderCustomLineItemDiscountSetMessagePayload.schema.json index a51180e5..2d1662d8 100644 --- a/json-schemas/OrderCustomLineItemDiscountSetMessagePayload.schema.json +++ b/json-schemas/OrderCustomLineItemDiscountSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomLineItemDiscountSetMessagePayload", "type": "object", @@ -17,5 +17,5 @@ "customLineItemId", "discountedPricePerQuantity" ], - "$id": "https://example.com/OrderCustomLineItemDiscountSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderCustomLineItemDiscountSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderCustomerEmailSetMessage.schema.json b/json-schemas/OrderCustomerEmailSetMessage.schema.json index 666f6ff6..96b1d6a5 100644 --- a/json-schemas/OrderCustomerEmailSetMessage.schema.json +++ b/json-schemas/OrderCustomerEmailSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerEmailSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderCustomerEmailSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerEmailSetMessage.schema.json" } diff --git a/json-schemas/OrderCustomerEmailSetMessagePayload.schema.json b/json-schemas/OrderCustomerEmailSetMessagePayload.schema.json index 748c70a9..ff4333c8 100644 --- a/json-schemas/OrderCustomerEmailSetMessagePayload.schema.json +++ b/json-schemas/OrderCustomerEmailSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerEmailSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "oldEmail": {"type": "string"} }, "required": ["type"], - "$id": "https://example.com/OrderCustomerEmailSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerEmailSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderCustomerGroupSetMessage.schema.json b/json-schemas/OrderCustomerGroupSetMessage.schema.json index 12c16638..fafddd58 100644 --- a/json-schemas/OrderCustomerGroupSetMessage.schema.json +++ b/json-schemas/OrderCustomerGroupSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerGroupSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderCustomerGroupSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerGroupSetMessage.schema.json" } diff --git a/json-schemas/OrderCustomerGroupSetMessagePayload.schema.json b/json-schemas/OrderCustomerGroupSetMessagePayload.schema.json index f6004a01..7d954d3f 100644 --- a/json-schemas/OrderCustomerGroupSetMessagePayload.schema.json +++ b/json-schemas/OrderCustomerGroupSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerGroupSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "oldCustomerGroup": {"$ref": "CustomerGroupReference.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderCustomerGroupSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerGroupSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderCustomerSetMessage.schema.json b/json-schemas/OrderCustomerSetMessage.schema.json index 371bf67f..924ab2bf 100644 --- a/json-schemas/OrderCustomerSetMessage.schema.json +++ b/json-schemas/OrderCustomerSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerSetMessage", "type": "object", @@ -36,5 +36,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderCustomerSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerSetMessage.schema.json" } diff --git a/json-schemas/OrderCustomerSetMessagePayload.schema.json b/json-schemas/OrderCustomerSetMessagePayload.schema.json index 7ebb3daf..ae6cba9e 100644 --- a/json-schemas/OrderCustomerSetMessagePayload.schema.json +++ b/json-schemas/OrderCustomerSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderCustomerSetMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "customer": {"$ref": "CustomerReference.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderCustomerSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderCustomerSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderDeletedMessage.schema.json b/json-schemas/OrderDeletedMessage.schema.json index 1790c56f..899d0187 100644 --- a/json-schemas/OrderDeletedMessage.schema.json +++ b/json-schemas/OrderDeletedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDeletedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "order" ], - "$id": "https://example.com/OrderDeletedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderDeletedMessage.schema.json" } diff --git a/json-schemas/OrderDeletedMessagePayload.schema.json b/json-schemas/OrderDeletedMessagePayload.schema.json index 501a56a1..7a9b12a0 100644 --- a/json-schemas/OrderDeletedMessagePayload.schema.json +++ b/json-schemas/OrderDeletedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDeletedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "order" ], - "$id": "https://example.com/OrderDeletedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderDeletedMessagePayload.schema.json" } diff --git a/json-schemas/OrderDiscountCodeAddedMessage.schema.json b/json-schemas/OrderDiscountCodeAddedMessage.schema.json index f538a2fe..3ba031ab 100644 --- a/json-schemas/OrderDiscountCodeAddedMessage.schema.json +++ b/json-schemas/OrderDiscountCodeAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "discountCode" ], - "$id": "https://example.com/OrderDiscountCodeAddedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeAddedMessage.schema.json" } diff --git a/json-schemas/OrderDiscountCodeAddedMessagePayload.schema.json b/json-schemas/OrderDiscountCodeAddedMessagePayload.schema.json index 19888767..312ac198 100644 --- a/json-schemas/OrderDiscountCodeAddedMessagePayload.schema.json +++ b/json-schemas/OrderDiscountCodeAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "discountCode" ], - "$id": "https://example.com/OrderDiscountCodeAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeAddedMessagePayload.schema.json" } diff --git a/json-schemas/OrderDiscountCodeRemovedMessage.schema.json b/json-schemas/OrderDiscountCodeRemovedMessage.schema.json index edbada01..cb503660 100644 --- a/json-schemas/OrderDiscountCodeRemovedMessage.schema.json +++ b/json-schemas/OrderDiscountCodeRemovedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeRemovedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "discountCode" ], - "$id": "https://example.com/OrderDiscountCodeRemovedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeRemovedMessage.schema.json" } diff --git a/json-schemas/OrderDiscountCodeRemovedMessagePayload.schema.json b/json-schemas/OrderDiscountCodeRemovedMessagePayload.schema.json index c2980f6e..dfa89e34 100644 --- a/json-schemas/OrderDiscountCodeRemovedMessagePayload.schema.json +++ b/json-schemas/OrderDiscountCodeRemovedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeRemovedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "discountCode" ], - "$id": "https://example.com/OrderDiscountCodeRemovedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeRemovedMessagePayload.schema.json" } diff --git a/json-schemas/OrderDiscountCodeStateSetMessage.schema.json b/json-schemas/OrderDiscountCodeStateSetMessage.schema.json index c34b763b..a99b9586 100644 --- a/json-schemas/OrderDiscountCodeStateSetMessage.schema.json +++ b/json-schemas/OrderDiscountCodeStateSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeStateSetMessage", "type": "object", @@ -37,5 +37,5 @@ "discountCode", "state" ], - "$id": "https://example.com/OrderDiscountCodeStateSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeStateSetMessage.schema.json" } diff --git a/json-schemas/OrderDiscountCodeStateSetMessagePayload.schema.json b/json-schemas/OrderDiscountCodeStateSetMessagePayload.schema.json index dedb0eb7..85067b79 100644 --- a/json-schemas/OrderDiscountCodeStateSetMessagePayload.schema.json +++ b/json-schemas/OrderDiscountCodeStateSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderDiscountCodeStateSetMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "discountCode", "state" ], - "$id": "https://example.com/OrderDiscountCodeStateSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderDiscountCodeStateSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderEdit.schema.json b/json-schemas/OrderEdit.schema.json index b335e190..8da19edf 100644 --- a/json-schemas/OrderEdit.schema.json +++ b/json-schemas/OrderEdit.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEdit", "type": "object", @@ -35,5 +35,5 @@ "stagedActions", "result" ], - "$id": "https://example.com/OrderEdit.schema.json" + "$id": "https://api.commercetools.com/OrderEdit.schema.json" } diff --git a/json-schemas/OrderEditAddStagedActionAction.schema.json b/json-schemas/OrderEditAddStagedActionAction.schema.json index fcca8b43..bc81af9a 100644 --- a/json-schemas/OrderEditAddStagedActionAction.schema.json +++ b/json-schemas/OrderEditAddStagedActionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditAddStagedActionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "stagedAction" ], - "$id": "https://example.com/OrderEditAddStagedActionAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditAddStagedActionAction.schema.json" } diff --git a/json-schemas/OrderEditApplied.schema.json b/json-schemas/OrderEditApplied.schema.json index c9f3d16e..1ea0fdba 100644 --- a/json-schemas/OrderEditApplied.schema.json +++ b/json-schemas/OrderEditApplied.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditApplied", "type": "object", @@ -18,5 +18,5 @@ "excerptBeforeEdit", "excerptAfterEdit" ], - "$id": "https://example.com/OrderEditApplied.schema.json" + "$id": "https://api.commercetools.com/OrderEditApplied.schema.json" } diff --git a/json-schemas/OrderEditAppliedMessage.schema.json b/json-schemas/OrderEditAppliedMessage.schema.json index 519faaa2..b348c6bd 100644 --- a/json-schemas/OrderEditAppliedMessage.schema.json +++ b/json-schemas/OrderEditAppliedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditAppliedMessage", "type": "object", @@ -36,5 +36,5 @@ "edit", "result" ], - "$id": "https://example.com/OrderEditAppliedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderEditAppliedMessage.schema.json" } diff --git a/json-schemas/OrderEditAppliedMessagePayload.schema.json b/json-schemas/OrderEditAppliedMessagePayload.schema.json index 1928daf5..abd7c4fd 100644 --- a/json-schemas/OrderEditAppliedMessagePayload.schema.json +++ b/json-schemas/OrderEditAppliedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditAppliedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "edit", "result" ], - "$id": "https://example.com/OrderEditAppliedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderEditAppliedMessagePayload.schema.json" } diff --git a/json-schemas/OrderEditApply.schema.json b/json-schemas/OrderEditApply.schema.json index 5feb9610..d41e3bb9 100644 --- a/json-schemas/OrderEditApply.schema.json +++ b/json-schemas/OrderEditApply.schema.json @@ -1,21 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditApply", "type": "object", "properties": { - "editVersion": { - "type": "number", - "format": "integer" - }, - "resourceVersion": { - "type": "number", - "format": "integer" - } + "editVersion": {"type": "number"}, + "resourceVersion": {"type": "number"} }, "required": [ "editVersion", "resourceVersion" ], - "$id": "https://example.com/OrderEditApply.schema.json" + "$id": "https://api.commercetools.com/OrderEditApply.schema.json" } diff --git a/json-schemas/OrderEditDraft.schema.json b/json-schemas/OrderEditDraft.schema.json index a8ce55fa..3430cbe1 100644 --- a/json-schemas/OrderEditDraft.schema.json +++ b/json-schemas/OrderEditDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditDraft", "type": "object", @@ -15,5 +15,5 @@ "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["resource"], - "$id": "https://example.com/OrderEditDraft.schema.json" + "$id": "https://api.commercetools.com/OrderEditDraft.schema.json" } diff --git a/json-schemas/OrderEditNotProcessed.schema.json b/json-schemas/OrderEditNotProcessed.schema.json index 9a726ad6..24e8e40e 100644 --- a/json-schemas/OrderEditNotProcessed.schema.json +++ b/json-schemas/OrderEditNotProcessed.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditNotProcessed", "type": "object", "properties": {"type": {"enum": ["NotProcessed"]}}, "required": ["type"], - "$id": "https://example.com/OrderEditNotProcessed.schema.json" + "$id": "https://api.commercetools.com/OrderEditNotProcessed.schema.json" } diff --git a/json-schemas/OrderEditPagedQueryResponse.schema.json b/json-schemas/OrderEditPagedQueryResponse.schema.json index 0c09f66f..c297b739 100644 --- a/json-schemas/OrderEditPagedQueryResponse.schema.json +++ b/json-schemas/OrderEditPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/OrderEditPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/OrderEditPagedQueryResponse.schema.json" } diff --git a/json-schemas/OrderEditPreviewFailure.schema.json b/json-schemas/OrderEditPreviewFailure.schema.json index e5d252a6..55919312 100644 --- a/json-schemas/OrderEditPreviewFailure.schema.json +++ b/json-schemas/OrderEditPreviewFailure.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditPreviewFailure", "type": "object", @@ -14,5 +14,5 @@ "type", "errors" ], - "$id": "https://example.com/OrderEditPreviewFailure.schema.json" + "$id": "https://api.commercetools.com/OrderEditPreviewFailure.schema.json" } diff --git a/json-schemas/OrderEditPreviewSuccess.schema.json b/json-schemas/OrderEditPreviewSuccess.schema.json index 6467b378..172df05a 100644 --- a/json-schemas/OrderEditPreviewSuccess.schema.json +++ b/json-schemas/OrderEditPreviewSuccess.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditPreviewSuccess", "type": "object", @@ -16,5 +16,5 @@ "preview", "messagePayloads" ], - "$id": "https://example.com/OrderEditPreviewSuccess.schema.json" + "$id": "https://api.commercetools.com/OrderEditPreviewSuccess.schema.json" } diff --git a/json-schemas/OrderEditReference.schema.json b/json-schemas/OrderEditReference.schema.json index df329e78..9eb4d9ab 100644 --- a/json-schemas/OrderEditReference.schema.json +++ b/json-schemas/OrderEditReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to an [OrderEdit](ctp:api:type:OrderEdit).", "additionalProperties": false, "title": "OrderEditReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/OrderEditReference.schema.json" + "$id": "https://api.commercetools.com/OrderEditReference.schema.json" } diff --git a/json-schemas/OrderEditResourceIdentifier.schema.json b/json-schemas/OrderEditResourceIdentifier.schema.json index ddd43239..4620017c 100644 --- a/json-schemas/OrderEditResourceIdentifier.schema.json +++ b/json-schemas/OrderEditResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to an [OrderEdit](ctp:api:type:OrderEdit).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "OrderEditResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/OrderEditResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/OrderEditResourceIdentifier.schema.json" } diff --git a/json-schemas/OrderEditResult.schema.json b/json-schemas/OrderEditResult.schema.json index df37eb21..d1b72c3e 100644 --- a/json-schemas/OrderEditResult.schema.json +++ b/json-schemas/OrderEditResult.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/OrderEditApplied.schema.json"}, - {"$ref": "https://example.com/OrderEditNotProcessed.schema.json"}, - {"$ref": "https://example.com/OrderEditPreviewFailure.schema.json"}, - {"$ref": "https://example.com/OrderEditPreviewSuccess.schema.json"} + {"$ref": "https://api.commercetools.com/OrderEditApplied.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditNotProcessed.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditPreviewFailure.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditPreviewSuccess.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditResult", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "Applied", + "NotProcessed", + "PreviewFailure", + "PreviewSuccess" + ]}}, "required": ["type"], - "$id": "https://example.com/OrderEditResult.schema.json", + "$id": "https://api.commercetools.com/OrderEditResult.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/OrderEditSetCommentAction.schema.json b/json-schemas/OrderEditSetCommentAction.schema.json index fea8b18c..8071206d 100644 --- a/json-schemas/OrderEditSetCommentAction.schema.json +++ b/json-schemas/OrderEditSetCommentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditSetCommentAction", "type": "object", @@ -8,5 +8,5 @@ "comment": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/OrderEditSetCommentAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditSetCommentAction.schema.json" } diff --git a/json-schemas/OrderEditSetCustomFieldAction.schema.json b/json-schemas/OrderEditSetCustomFieldAction.schema.json index e53c093b..8bf9c02d 100644 --- a/json-schemas/OrderEditSetCustomFieldAction.schema.json +++ b/json-schemas/OrderEditSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderEditSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditSetCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderEditSetCustomTypeAction.schema.json b/json-schemas/OrderEditSetCustomTypeAction.schema.json index 59670f82..f18086b6 100644 --- a/json-schemas/OrderEditSetCustomTypeAction.schema.json +++ b/json-schemas/OrderEditSetCustomTypeAction.schema.json @@ -1,13 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditSetCustomTypeAction", "type": "object", "properties": { "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"type": "object"}, + "fields": {"$ref": "FieldContainer.schema.json"}, "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderEditSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditSetCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderEditSetKeyAction.schema.json b/json-schemas/OrderEditSetKeyAction.schema.json index 3b2f96ff..667c9863 100644 --- a/json-schemas/OrderEditSetKeyAction.schema.json +++ b/json-schemas/OrderEditSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/OrderEditSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditSetKeyAction.schema.json" } diff --git a/json-schemas/OrderEditSetStagedActionsAction.schema.json b/json-schemas/OrderEditSetStagedActionsAction.schema.json index 5b4f72b8..e9c70c9a 100644 --- a/json-schemas/OrderEditSetStagedActionsAction.schema.json +++ b/json-schemas/OrderEditSetStagedActionsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditSetStagedActionsAction", "type": "object", @@ -14,5 +14,5 @@ "action", "stagedActions" ], - "$id": "https://example.com/OrderEditSetStagedActionsAction.schema.json" + "$id": "https://api.commercetools.com/OrderEditSetStagedActionsAction.schema.json" } diff --git a/json-schemas/OrderEditUpdate.schema.json b/json-schemas/OrderEditUpdate.schema.json index dd4ded31..419f8d0f 100644 --- a/json-schemas/OrderEditUpdate.schema.json +++ b/json-schemas/OrderEditUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditUpdate", "type": "object", @@ -15,5 +15,5 @@ "version", "actions" ], - "$id": "https://example.com/OrderEditUpdate.schema.json" + "$id": "https://api.commercetools.com/OrderEditUpdate.schema.json" } diff --git a/json-schemas/OrderEditUpdateAction.schema.json b/json-schemas/OrderEditUpdateAction.schema.json index 4bf92ddc..1b3e089e 100644 --- a/json-schemas/OrderEditUpdateAction.schema.json +++ b/json-schemas/OrderEditUpdateAction.schema.json @@ -1,26 +1,25 @@ { "oneOf": [ - {"$ref": "https://example.com/OrderEditAddStagedActionAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetBillingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetBillingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetCommentAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetDeliveryAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetDeliveryAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetItemShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetItemShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetKeyAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderEditSetStagedActionsAction.schema.json"} + {"$ref": "https://api.commercetools.com/OrderEditAddStagedActionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditSetCommentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditSetStagedActionsAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderEditUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addStagedAction", + "setComment", + "setCustomField", + "setCustomType", + "setKey", + "setStagedActions" + ]}}, "required": ["action"], - "$id": "https://example.com/OrderEditUpdateAction.schema.json", + "$id": "https://api.commercetools.com/OrderEditUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/OrderExcerpt.schema.json b/json-schemas/OrderExcerpt.schema.json index 76519a60..8edacbae 100644 --- a/json-schemas/OrderExcerpt.schema.json +++ b/json-schemas/OrderExcerpt.schema.json @@ -1,19 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderExcerpt", "type": "object", "properties": { "totalPrice": {"$ref": "TypedMoney.schema.json"}, - "version": { - "type": "number", - "format": "integer" - }, + "version": {"type": "number"}, "taxedPrice": {"$ref": "TaxedPrice.schema.json"} }, "required": [ "totalPrice", "version" ], - "$id": "https://example.com/OrderExcerpt.schema.json" + "$id": "https://api.commercetools.com/OrderExcerpt.schema.json" } diff --git a/json-schemas/OrderFromCartDraft.schema.json b/json-schemas/OrderFromCartDraft.schema.json index 2e2c6960..dec16177 100644 --- a/json-schemas/OrderFromCartDraft.schema.json +++ b/json-schemas/OrderFromCartDraft.schema.json @@ -1,11 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderFromCartDraft", "type": "object", "properties": { "shipmentState": {"$ref": "ShipmentStateEnum.schema.json"}, "orderNumber": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, "id": {"type": "string"}, "state": {"$ref": "StateResourceIdentifier.schema.json"}, "paymentState": {"$ref": "PaymentStateEnum.schema.json"}, @@ -14,5 +15,5 @@ "orderState": {"$ref": "OrderStateEnum.schema.json"} }, "required": ["version"], - "$id": "https://example.com/OrderFromCartDraft.schema.json" + "$id": "https://api.commercetools.com/OrderFromCartDraft.schema.json" } diff --git a/json-schemas/OrderFromQuoteDraft.schema.json b/json-schemas/OrderFromQuoteDraft.schema.json new file mode 100644 index 00000000..10e010d0 --- /dev/null +++ b/json-schemas/OrderFromQuoteDraft.schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderFromQuoteDraft", + "type": "object", + "properties": { + "shipmentState": {"$ref": "ShipmentStateEnum.schema.json"}, + "quote": {"$ref": "QuoteResourceIdentifier.schema.json"}, + "orderNumber": {"type": "string"}, + "state": {"$ref": "StateResourceIdentifier.schema.json"}, + "paymentState": {"$ref": "PaymentStateEnum.schema.json"}, + "version": {"type": "number"}, + "orderState": {"$ref": "OrderStateEnum.schema.json"} + }, + "required": [ + "quote", + "version" + ], + "$id": "https://api.commercetools.com/OrderFromQuoteDraft.schema.json" +} diff --git a/json-schemas/OrderImportCustomLineItemStateAction.schema.json b/json-schemas/OrderImportCustomLineItemStateAction.schema.json index d520378e..d9b3eee3 100644 --- a/json-schemas/OrderImportCustomLineItemStateAction.schema.json +++ b/json-schemas/OrderImportCustomLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderImportCustomLineItemStateAction", "type": "object", @@ -16,5 +16,5 @@ "customLineItemId", "state" ], - "$id": "https://example.com/OrderImportCustomLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderImportCustomLineItemStateAction.schema.json" } diff --git a/json-schemas/OrderImportDraft.schema.json b/json-schemas/OrderImportDraft.schema.json index 47276dfd..b9bd4769 100644 --- a/json-schemas/OrderImportDraft.schema.json +++ b/json-schemas/OrderImportDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderImportDraft", "type": "object", @@ -27,18 +27,20 @@ "taxRoundingMode": {"$ref": "RoundingModeEnum.schema.json"}, "customLineItems": { "type": "array", - "items": {"$ref": "CustomLineItemDraft.schema.json"} + "items": {"$ref": "CustomLineItemImportDraft.schema.json"} }, "itemShippingAddresses": { "type": "array", - "items": {"$ref": "Address.schema.json"} + "items": {"$ref": "BaseAddress.schema.json"} }, "customerEmail": {"type": "string"}, "customerId": {"type": "string"}, - "shippingAddress": {"$ref": "Address.schema.json"}, - "billingAddress": {"$ref": "Address.schema.json"}, - "paymentState": {"$ref": "PaymentStateEnum.schema.json"} + "shippingAddress": {"$ref": "BaseAddress.schema.json"}, + "billingAddress": {"$ref": "BaseAddress.schema.json"}, + "state": {"$ref": "StateReference.schema.json"}, + "paymentState": {"$ref": "PaymentStateEnum.schema.json"}, + "paymentInfo": {"$ref": "PaymentInfo.schema.json"} }, "required": ["totalPrice"], - "$id": "https://example.com/OrderImportDraft.schema.json" + "$id": "https://api.commercetools.com/OrderImportDraft.schema.json" } diff --git a/json-schemas/OrderImportLineItemStateAction.schema.json b/json-schemas/OrderImportLineItemStateAction.schema.json index af8ea41f..538b0d39 100644 --- a/json-schemas/OrderImportLineItemStateAction.schema.json +++ b/json-schemas/OrderImportLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderImportLineItemStateAction", "type": "object", @@ -16,5 +16,5 @@ "lineItemId", "state" ], - "$id": "https://example.com/OrderImportLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderImportLineItemStateAction.schema.json" } diff --git a/json-schemas/OrderImportedMessage.schema.json b/json-schemas/OrderImportedMessage.schema.json index e50cde81..fdb3c1ef 100644 --- a/json-schemas/OrderImportedMessage.schema.json +++ b/json-schemas/OrderImportedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderImportedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "order" ], - "$id": "https://example.com/OrderImportedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderImportedMessage.schema.json" } diff --git a/json-schemas/OrderImportedMessagePayload.schema.json b/json-schemas/OrderImportedMessagePayload.schema.json index 2a51975f..0e7af35f 100644 --- a/json-schemas/OrderImportedMessagePayload.schema.json +++ b/json-schemas/OrderImportedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderImportedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "order" ], - "$id": "https://example.com/OrderImportedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderImportedMessagePayload.schema.json" } diff --git a/json-schemas/OrderLineItemAddedMessage.schema.json b/json-schemas/OrderLineItemAddedMessage.schema.json index d8352aba..380cd34d 100644 --- a/json-schemas/OrderLineItemAddedMessage.schema.json +++ b/json-schemas/OrderLineItemAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderLineItemAddedMessage", "type": "object", @@ -36,5 +36,5 @@ "lineItem", "addedQuantity" ], - "$id": "https://example.com/OrderLineItemAddedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderLineItemAddedMessage.schema.json" } diff --git a/json-schemas/OrderLineItemAddedMessagePayload.schema.json b/json-schemas/OrderLineItemAddedMessagePayload.schema.json index 3e6196a7..059ae172 100644 --- a/json-schemas/OrderLineItemAddedMessagePayload.schema.json +++ b/json-schemas/OrderLineItemAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderLineItemAddedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "lineItem", "addedQuantity" ], - "$id": "https://example.com/OrderLineItemAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderLineItemAddedMessagePayload.schema.json" } diff --git a/json-schemas/OrderLineItemDiscountSetMessage.schema.json b/json-schemas/OrderLineItemDiscountSetMessage.schema.json index 92e57247..6ed589c8 100644 --- a/json-schemas/OrderLineItemDiscountSetMessage.schema.json +++ b/json-schemas/OrderLineItemDiscountSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderLineItemDiscountSetMessage", "type": "object", @@ -42,5 +42,5 @@ "discountedPricePerQuantity", "totalPrice" ], - "$id": "https://example.com/OrderLineItemDiscountSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderLineItemDiscountSetMessage.schema.json" } diff --git a/json-schemas/OrderLineItemDiscountSetMessagePayload.schema.json b/json-schemas/OrderLineItemDiscountSetMessagePayload.schema.json index d5248aca..41bbef47 100644 --- a/json-schemas/OrderLineItemDiscountSetMessagePayload.schema.json +++ b/json-schemas/OrderLineItemDiscountSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderLineItemDiscountSetMessagePayload", "type": "object", @@ -19,5 +19,5 @@ "discountedPricePerQuantity", "totalPrice" ], - "$id": "https://example.com/OrderLineItemDiscountSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderLineItemDiscountSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderLineItemDistributionChannelSetMessage.schema.json b/json-schemas/OrderLineItemDistributionChannelSetMessage.schema.json new file mode 100644 index 00000000..e351916d --- /dev/null +++ b/json-schemas/OrderLineItemDistributionChannelSetMessage.schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderLineItemDistributionChannelSetMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lineItemId": {"type": "string"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["OrderLineItemDistributionChannelSet"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"}, + "distributionChannel": {"$ref": "ChannelReference.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "lineItemId" + ], + "$id": "https://api.commercetools.com/OrderLineItemDistributionChannelSetMessage.schema.json" +} diff --git a/json-schemas/OrderLineItemDistributionChannelSetMessagePayload.schema.json b/json-schemas/OrderLineItemDistributionChannelSetMessagePayload.schema.json new file mode 100644 index 00000000..6e62cdfe --- /dev/null +++ b/json-schemas/OrderLineItemDistributionChannelSetMessagePayload.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderLineItemDistributionChannelSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["OrderLineItemDistributionChannelSet"]}, + "distributionChannel": {"$ref": "ChannelReference.schema.json"}, + "lineItemId": {"type": "string"} + }, + "required": [ + "type", + "lineItemId" + ], + "$id": "https://api.commercetools.com/OrderLineItemDistributionChannelSetMessagePayload.schema.json" +} diff --git a/json-schemas/OrderLineItemRemovedMessage.schema.json b/json-schemas/OrderLineItemRemovedMessage.schema.json new file mode 100644 index 00000000..7b45a941 --- /dev/null +++ b/json-schemas/OrderLineItemRemovedMessage.schema.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderLineItemRemovedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "newTotalPrice": {"$ref": "TypedMoney.schema.json"}, + "newTaxedPrice": {"$ref": "TaxedItemPrice.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "removedQuantity": {"type": "number"}, + "newShippingDetail": {"$ref": "ItemShippingDetails.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lineItemId": {"type": "string"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["OrderLineItemRemoved"]}, + "version": {"type": "number"}, + "newPrice": {"$ref": "Price.schema.json"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"}, + "newQuantity": {"type": "number"}, + "newState": { + "type": "array", + "items": {"$ref": "ItemState.schema.json"} + } + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "lineItemId", + "removedQuantity", + "newQuantity", + "newState", + "newTotalPrice" + ], + "$id": "https://api.commercetools.com/OrderLineItemRemovedMessage.schema.json" +} diff --git a/json-schemas/OrderLineItemRemovedMessagePayload.schema.json b/json-schemas/OrderLineItemRemovedMessagePayload.schema.json new file mode 100644 index 00000000..402f9b09 --- /dev/null +++ b/json-schemas/OrderLineItemRemovedMessagePayload.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderLineItemRemovedMessagePayload", + "type": "object", + "properties": { + "newTotalPrice": {"$ref": "TypedMoney.schema.json"}, + "newTaxedPrice": {"$ref": "TaxedItemPrice.schema.json"}, + "removedQuantity": {"type": "number"}, + "newShippingDetail": {"$ref": "ItemShippingDetails.schema.json"}, + "lineItemId": {"type": "string"}, + "newQuantity": {"type": "number"}, + "type": {"enum": ["OrderLineItemRemoved"]}, + "newPrice": {"$ref": "Price.schema.json"}, + "newState": { + "type": "array", + "items": {"$ref": "ItemState.schema.json"} + } + }, + "required": [ + "type", + "lineItemId", + "removedQuantity", + "newQuantity", + "newState", + "newTotalPrice" + ], + "$id": "https://api.commercetools.com/OrderLineItemRemovedMessagePayload.schema.json" +} diff --git a/json-schemas/OrderMessage.schema.json b/json-schemas/OrderMessage.schema.json new file mode 100644 index 00000000..b6ee315a --- /dev/null +++ b/json-schemas/OrderMessage.schema.json @@ -0,0 +1,116 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/CustomLineItemStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryAddressSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryItemsUpdatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryRemovedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/LineItemStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderBillingAddressSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCreatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomLineItemDiscountSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerEmailSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerGroupSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDeletedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeRemovedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeStateSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditAppliedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderImportedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemDiscountSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemDistributionChannelSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemRemovedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderPaymentStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnInfoAddedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnInfoSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnShipmentStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShipmentStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingAddressSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingInfoSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingRateInputSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStateChangedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStateTransitionMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStoreSetMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelAddedToDeliveryMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelItemsUpdatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelMeasurementsUpdatedMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelRemovedFromDeliveryMessage.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelTrackingDataUpdatedMessage.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": [ + "CustomLineItemStateTransition", + "DeliveryAdded", + "DeliveryAddressSet", + "DeliveryItemsUpdated", + "DeliveryRemoved", + "LineItemStateTransition", + "OrderBillingAddressSet", + "OrderCreated", + "OrderCustomLineItemDiscountSet", + "OrderCustomerEmailSet", + "OrderCustomerGroupSet", + "OrderCustomerSet", + "OrderDeleted", + "OrderDiscountCodeAdded", + "OrderDiscountCodeRemoved", + "OrderDiscountCodeStateSet", + "OrderEditApplied", + "OrderImported", + "OrderLineItemAdded", + "OrderLineItemDiscountSet", + "OrderLineItemDistributionChannelSet", + "OrderLineItemRemoved", + "OrderPaymentStateChanged", + "ReturnInfoAdded", + "ReturnInfoSet", + "OrderReturnShipmentStateChanged", + "OrderShipmentStateChanged", + "OrderShippingAddressSet", + "OrderShippingInfoSet", + "OrderShippingRateInputSet", + "OrderStateChanged", + "OrderStateTransition", + "OrderStoreSet", + "ParcelAddedToDelivery", + "ParcelItemsUpdated", + "ParcelMeasurementsUpdated", + "ParcelRemovedFromDelivery", + "ParcelTrackingDataUpdated" + ]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/OrderMessage.schema.json", + "discriminator": {"propertyName": "type"} +} diff --git a/json-schemas/OrderMessagePayload.schema.json b/json-schemas/OrderMessagePayload.schema.json new file mode 100644 index 00000000..82726ec4 --- /dev/null +++ b/json-schemas/OrderMessagePayload.schema.json @@ -0,0 +1,89 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/CustomLineItemStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryAddressSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryItemsUpdatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/DeliveryRemovedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/LineItemStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderBillingAddressSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCreatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomLineItemDiscountSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerEmailSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerGroupSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderCustomerSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDeletedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeRemovedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderDiscountCodeStateSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditAppliedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderImportedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemDiscountSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemDistributionChannelSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderLineItemRemovedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderPaymentStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnInfoAddedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnInfoSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReturnShipmentStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShipmentStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingAddressSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingInfoSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderShippingRateInputSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStateChangedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStateTransitionMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderStoreSetMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelAddedToDeliveryMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelItemsUpdatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelMeasurementsUpdatedMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelRemovedFromDeliveryMessagePayload.schema.json"}, + {"$ref": "https://api.commercetools.com/ParcelTrackingDataUpdatedMessagePayload.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderMessagePayload", + "type": "object", + "properties": {"type": {"enum": [ + "CustomLineItemStateTransition", + "DeliveryAdded", + "DeliveryAddressSet", + "DeliveryItemsUpdated", + "DeliveryRemoved", + "LineItemStateTransition", + "OrderBillingAddressSet", + "OrderCreated", + "OrderCustomLineItemDiscountSet", + "OrderCustomerEmailSet", + "OrderCustomerGroupSet", + "OrderCustomerSet", + "OrderDeleted", + "OrderDiscountCodeAdded", + "OrderDiscountCodeRemoved", + "OrderDiscountCodeStateSet", + "OrderEditApplied", + "OrderImported", + "OrderLineItemAdded", + "OrderLineItemDiscountSet", + "OrderLineItemDistributionChannelSet", + "OrderLineItemRemoved", + "OrderPaymentStateChanged", + "ReturnInfoAdded", + "ReturnInfoSet", + "OrderReturnShipmentStateChanged", + "OrderShipmentStateChanged", + "OrderShippingAddressSet", + "OrderShippingInfoSet", + "OrderShippingRateInputSet", + "OrderStateChanged", + "OrderStateTransition", + "OrderStoreSet", + "ParcelAddedToDelivery", + "ParcelItemsUpdated", + "ParcelMeasurementsUpdated", + "ParcelRemovedFromDelivery", + "ParcelTrackingDataUpdated" + ]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/OrderMessagePayload.schema.json", + "discriminator": {"propertyName": "type"} +} diff --git a/json-schemas/OrderPagedQueryResponse.schema.json b/json-schemas/OrderPagedQueryResponse.schema.json index 47c2e364..28831b40 100644 --- a/json-schemas/OrderPagedQueryResponse.schema.json +++ b/json-schemas/OrderPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/OrderPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/OrderPagedQueryResponse.schema.json" } diff --git a/json-schemas/OrderPagedSearchResponse.schema.json b/json-schemas/OrderPagedSearchResponse.schema.json new file mode 100644 index 00000000..30273285 --- /dev/null +++ b/json-schemas/OrderPagedSearchResponse.schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderPagedSearchResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "hits": { + "type": "array", + "items": {"$ref": "Hit.schema.json"} + }, + "total": {"type": "number"}, + "offset": {"type": "number"} + }, + "required": [ + "total", + "hits" + ], + "$id": "https://api.commercetools.com/OrderPagedSearchResponse.schema.json" +} diff --git a/json-schemas/ShoppingListStoreSetMessage.schema.json b/json-schemas/OrderPaymentAddedMessage.schema.json similarity index 73% rename from json-schemas/ShoppingListStoreSetMessage.schema.json rename to json-schemas/OrderPaymentAddedMessage.schema.json index f8d82ad4..3bdce03a 100644 --- a/json-schemas/ShoppingListStoreSetMessage.schema.json +++ b/json-schemas/OrderPaymentAddedMessage.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "ShoppingListStoreSetMessage", + "title": "OrderPaymentAddedMessage", "type": "object", "properties": { "createdAt": { @@ -18,9 +18,9 @@ "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, "resourceVersion": {"type": "number"}, "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "payment": {"$ref": "PaymentReference.schema.json"}, "id": {"type": "string"}, - "store": {"$ref": "StoreKeyReference.schema.json"}, - "type": {"enum": ["ShoppingListStoreSet"]}, + "type": {"enum": ["OrderPaymentAdded"]}, "version": {"type": "number"} }, "required": [ @@ -32,7 +32,7 @@ "resource", "resourceVersion", "type", - "store" + "payment" ], - "$id": "https://example.com/ShoppingListStoreSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderPaymentAddedMessage.schema.json" } diff --git a/json-schemas/OrderPaymentAddedMessagePayload.schema.json b/json-schemas/OrderPaymentAddedMessagePayload.schema.json new file mode 100644 index 00000000..b110f220 --- /dev/null +++ b/json-schemas/OrderPaymentAddedMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderPaymentAddedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["OrderPaymentAdded"]}, + "payment": {"$ref": "PaymentReference.schema.json"} + }, + "required": [ + "type", + "payment" + ], + "$id": "https://api.commercetools.com/OrderPaymentAddedMessagePayload.schema.json" +} diff --git a/json-schemas/OrderPaymentStateChangedMessage.schema.json b/json-schemas/OrderPaymentStateChangedMessage.schema.json index f2032e2a..e7cff80b 100644 --- a/json-schemas/OrderPaymentStateChangedMessage.schema.json +++ b/json-schemas/OrderPaymentStateChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderPaymentStateChangedMessage", "type": "object", @@ -35,5 +35,5 @@ "type", "paymentState" ], - "$id": "https://example.com/OrderPaymentStateChangedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderPaymentStateChangedMessage.schema.json" } diff --git a/json-schemas/OrderPaymentStateChangedMessagePayload.schema.json b/json-schemas/OrderPaymentStateChangedMessagePayload.schema.json index 30cff3d9..d93d7319 100644 --- a/json-schemas/OrderPaymentStateChangedMessagePayload.schema.json +++ b/json-schemas/OrderPaymentStateChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderPaymentStateChangedMessagePayload", "type": "object", @@ -12,5 +12,5 @@ "type", "paymentState" ], - "$id": "https://example.com/OrderPaymentStateChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderPaymentStateChangedMessagePayload.schema.json" } diff --git a/json-schemas/OrderReference.schema.json b/json-schemas/OrderReference.schema.json index d39812f8..9b3b65fe 100644 --- a/json-schemas/OrderReference.schema.json +++ b/json-schemas/OrderReference.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderReference", "type": "object", @@ -12,5 +12,5 @@ "typeId", "id" ], - "$id": "https://example.com/OrderReference.schema.json" + "$id": "https://api.commercetools.com/OrderReference.schema.json" } diff --git a/json-schemas/OrderRemoveDeliveryAction.schema.json b/json-schemas/OrderRemoveDeliveryAction.schema.json index 526f9c0d..521772f2 100644 --- a/json-schemas/OrderRemoveDeliveryAction.schema.json +++ b/json-schemas/OrderRemoveDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderRemoveDeliveryAction", "type": "object", @@ -11,5 +11,5 @@ "action", "deliveryId" ], - "$id": "https://example.com/OrderRemoveDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/OrderRemoveDeliveryAction.schema.json" } diff --git a/json-schemas/OrderRemoveItemShippingAddressAction.schema.json b/json-schemas/OrderRemoveItemShippingAddressAction.schema.json index 65a8d6d9..3a8abf1c 100644 --- a/json-schemas/OrderRemoveItemShippingAddressAction.schema.json +++ b/json-schemas/OrderRemoveItemShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderRemoveItemShippingAddressAction", "type": "object", @@ -11,5 +11,5 @@ "action", "addressKey" ], - "$id": "https://example.com/OrderRemoveItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderRemoveItemShippingAddressAction.schema.json" } diff --git a/json-schemas/OrderRemoveParcelFromDeliveryAction.schema.json b/json-schemas/OrderRemoveParcelFromDeliveryAction.schema.json index 279b5275..a48d6bdb 100644 --- a/json-schemas/OrderRemoveParcelFromDeliveryAction.schema.json +++ b/json-schemas/OrderRemoveParcelFromDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderRemoveParcelFromDeliveryAction", "type": "object", @@ -11,5 +11,5 @@ "action", "parcelId" ], - "$id": "https://example.com/OrderRemoveParcelFromDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/OrderRemoveParcelFromDeliveryAction.schema.json" } diff --git a/json-schemas/OrderRemovePaymentAction.schema.json b/json-schemas/OrderRemovePaymentAction.schema.json index 201c014e..a908dd05 100644 --- a/json-schemas/OrderRemovePaymentAction.schema.json +++ b/json-schemas/OrderRemovePaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderRemovePaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/OrderRemovePaymentAction.schema.json" + "$id": "https://api.commercetools.com/OrderRemovePaymentAction.schema.json" } diff --git a/json-schemas/OrderResourceIdentifier.schema.json b/json-schemas/OrderResourceIdentifier.schema.json index 5815557a..b41b57f4 100644 --- a/json-schemas/OrderResourceIdentifier.schema.json +++ b/json-schemas/OrderResourceIdentifier.schema.json @@ -1,6 +1,6 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "OrderResourceIdentifier", "type": "object", "properties": { @@ -8,5 +8,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/OrderResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/OrderResourceIdentifier.schema.json" } diff --git a/json-schemas/OrderReturnInfoAddedMessage.schema.json b/json-schemas/OrderReturnInfoAddedMessage.schema.json index 89ca867e..933c456e 100644 --- a/json-schemas/OrderReturnInfoAddedMessage.schema.json +++ b/json-schemas/OrderReturnInfoAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderReturnInfoAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "returnInfo" ], - "$id": "https://example.com/OrderReturnInfoAddedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderReturnInfoAddedMessage.schema.json" } diff --git a/json-schemas/OrderReturnInfoAddedMessagePayload.schema.json b/json-schemas/OrderReturnInfoAddedMessagePayload.schema.json index ae00165a..d4291bdc 100644 --- a/json-schemas/OrderReturnInfoAddedMessagePayload.schema.json +++ b/json-schemas/OrderReturnInfoAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderReturnInfoAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "returnInfo" ], - "$id": "https://example.com/OrderReturnInfoAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderReturnInfoAddedMessagePayload.schema.json" } diff --git a/json-schemas/OrderReturnInfoSetMessage.schema.json b/json-schemas/OrderReturnInfoSetMessage.schema.json new file mode 100644 index 00000000..04f53cf1 --- /dev/null +++ b/json-schemas/OrderReturnInfoSetMessage.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderReturnInfoSetMessage", + "type": "object", + "properties": { + "returnInfo": { + "type": "array", + "items": {"$ref": "ReturnInfo.schema.json"} + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["ReturnInfoSet"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/OrderReturnInfoSetMessage.schema.json" +} diff --git a/json-schemas/OrderReturnInfoSetMessagePayload.schema.json b/json-schemas/OrderReturnInfoSetMessagePayload.schema.json new file mode 100644 index 00000000..60d346ad --- /dev/null +++ b/json-schemas/OrderReturnInfoSetMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderReturnInfoSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["ReturnInfoSet"]}, + "returnInfo": { + "type": "array", + "items": {"$ref": "ReturnInfo.schema.json"} + } + }, + "required": ["type"], + "$id": "https://api.commercetools.com/OrderReturnInfoSetMessagePayload.schema.json" +} diff --git a/json-schemas/OrderReturnShipmentStateChangedMessage.schema.json b/json-schemas/OrderReturnShipmentStateChangedMessage.schema.json index f73c1055..7bfe77c4 100644 --- a/json-schemas/OrderReturnShipmentStateChangedMessage.schema.json +++ b/json-schemas/OrderReturnShipmentStateChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderReturnShipmentStateChangedMessage", "type": "object", @@ -36,5 +36,5 @@ "returnItemId", "returnShipmentState" ], - "$id": "https://example.com/OrderReturnShipmentStateChangedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderReturnShipmentStateChangedMessage.schema.json" } diff --git a/json-schemas/OrderReturnShipmentStateChangedMessagePayload.schema.json b/json-schemas/OrderReturnShipmentStateChangedMessagePayload.schema.json index 29a673dd..5ce570e3 100644 --- a/json-schemas/OrderReturnShipmentStateChangedMessagePayload.schema.json +++ b/json-schemas/OrderReturnShipmentStateChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderReturnShipmentStateChangedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "returnItemId", "returnShipmentState" ], - "$id": "https://example.com/OrderReturnShipmentStateChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderReturnShipmentStateChangedMessagePayload.schema.json" } diff --git a/json-schemas/OrderSearchQuery.schema.json b/json-schemas/OrderSearchQuery.schema.json new file mode 100644 index 00000000..86111f81 --- /dev/null +++ b/json-schemas/OrderSearchQuery.schema.json @@ -0,0 +1,8 @@ +{ + "additionalProperties": false, + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "OrderSearchQuery", + "type": "object", + "properties": {}, + "$id": "https://api.commercetools.com/OrderSearchQuery.schema.json" +} diff --git a/json-schemas/OrderSearchRequest.schema.json b/json-schemas/OrderSearchRequest.schema.json new file mode 100644 index 00000000..d1fce264 --- /dev/null +++ b/json-schemas/OrderSearchRequest.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSearchRequest", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "sort": {"type": "string"}, + "offset": {"type": "number"}, + "query": {"$ref": "OrderSearchQuery.schema.json"} + }, + "required": ["query"], + "$id": "https://api.commercetools.com/OrderSearchRequest.schema.json" +} diff --git a/json-schemas/OrderSearchStatusEnum.schema.json b/json-schemas/OrderSearchStatusEnum.schema.json new file mode 100644 index 00000000..cb76485d --- /dev/null +++ b/json-schemas/OrderSearchStatusEnum.schema.json @@ -0,0 +1,11 @@ +{ + "description": "Specifies the status of the [Order Search](/../api/projects/order-search) index.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "OrderSearchStatus", + "type": "string", + "enum": [ + "Activated", + "Deactivated" + ], + "$id": "https://api.commercetools.com/OrderSearchStatusEnum.schema.json" +} diff --git a/json-schemas/OrderSetBillingAddressAction.schema.json b/json-schemas/OrderSetBillingAddressAction.schema.json index 6a07fabe..e50ac1ae 100644 --- a/json-schemas/OrderSetBillingAddressAction.schema.json +++ b/json-schemas/OrderSetBillingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetBillingAddressAction", "type": "object", "properties": { "action": {"enum": ["setBillingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/OrderSetBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetBillingAddressAction.schema.json" } diff --git a/json-schemas/OrderSetBillingAddressCustomFieldAction.schema.json b/json-schemas/OrderSetBillingAddressCustomFieldAction.schema.json index edfa5f9e..cf5440c9 100644 --- a/json-schemas/OrderSetBillingAddressCustomFieldAction.schema.json +++ b/json-schemas/OrderSetBillingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetBillingAddressCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderSetBillingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetBillingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetBillingAddressCustomTypeAction.schema.json b/json-schemas/OrderSetBillingAddressCustomTypeAction.schema.json index b5c30a32..a79292ca 100644 --- a/json-schemas/OrderSetBillingAddressCustomTypeAction.schema.json +++ b/json-schemas/OrderSetBillingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetBillingAddressCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setBillingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderSetBillingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetBillingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetCustomFieldAction.schema.json b/json-schemas/OrderSetCustomFieldAction.schema.json index e6614b4b..519650a6 100644 --- a/json-schemas/OrderSetCustomFieldAction.schema.json +++ b/json-schemas/OrderSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetCustomLineItemCustomFieldAction.schema.json b/json-schemas/OrderSetCustomLineItemCustomFieldAction.schema.json index ae41b0c3..b68f4a0e 100644 --- a/json-schemas/OrderSetCustomLineItemCustomFieldAction.schema.json +++ b/json-schemas/OrderSetCustomLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "customLineItemId", "name" ], - "$id": "https://example.com/OrderSetCustomLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetCustomLineItemCustomTypeAction.schema.json b/json-schemas/OrderSetCustomLineItemCustomTypeAction.schema.json index 4e6ab792..eaedbf8b 100644 --- a/json-schemas/OrderSetCustomLineItemCustomTypeAction.schema.json +++ b/json-schemas/OrderSetCustomLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/OrderSetCustomLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetCustomLineItemShippingDetailsAction.schema.json b/json-schemas/OrderSetCustomLineItemShippingDetailsAction.schema.json index 2ef32ba7..5c042e9d 100644 --- a/json-schemas/OrderSetCustomLineItemShippingDetailsAction.schema.json +++ b/json-schemas/OrderSetCustomLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/OrderSetCustomLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/OrderSetCustomTypeAction.schema.json b/json-schemas/OrderSetCustomTypeAction.schema.json index bda4001e..bdf81487 100644 --- a/json-schemas/OrderSetCustomTypeAction.schema.json +++ b/json-schemas/OrderSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetCustomerEmailAction.schema.json b/json-schemas/OrderSetCustomerEmailAction.schema.json index 8784cc1d..a84f5915 100644 --- a/json-schemas/OrderSetCustomerEmailAction.schema.json +++ b/json-schemas/OrderSetCustomerEmailAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomerEmailAction", "type": "object", @@ -8,5 +8,5 @@ "email": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/OrderSetCustomerEmailAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomerEmailAction.schema.json" } diff --git a/json-schemas/OrderSetCustomerIdAction.schema.json b/json-schemas/OrderSetCustomerIdAction.schema.json index 23daf02d..3774b950 100644 --- a/json-schemas/OrderSetCustomerIdAction.schema.json +++ b/json-schemas/OrderSetCustomerIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetCustomerIdAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setCustomerId"]} }, "required": ["action"], - "$id": "https://example.com/OrderSetCustomerIdAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetCustomerIdAction.schema.json" } diff --git a/json-schemas/OrderSetDeliveryAddressAction.schema.json b/json-schemas/OrderSetDeliveryAddressAction.schema.json index f0f44d87..37ac30e9 100644 --- a/json-schemas/OrderSetDeliveryAddressAction.schema.json +++ b/json-schemas/OrderSetDeliveryAddressAction.schema.json @@ -1,16 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetDeliveryAddressAction", "type": "object", "properties": { "action": {"enum": ["setDeliveryAddress"]}, "deliveryId": {"type": "string"}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "deliveryId" ], - "$id": "https://example.com/OrderSetDeliveryAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryAddressAction.schema.json" } diff --git a/json-schemas/OrderSetDeliveryAddressCustomFieldAction.schema.json b/json-schemas/OrderSetDeliveryAddressCustomFieldAction.schema.json index 395ee78b..acd02a9f 100644 --- a/json-schemas/OrderSetDeliveryAddressCustomFieldAction.schema.json +++ b/json-schemas/OrderSetDeliveryAddressCustomFieldAction.schema.json @@ -1,17 +1,25 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetDeliveryAddressCustomFieldAction", "type": "object", "properties": { + "name": {"type": "string"}, "action": {"enum": ["setDeliveryAddressCustomField"]}, "deliveryId": {"type": "string"}, - "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"$ref": "FieldContainer.schema.json"} + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} }, "required": [ "action", - "deliveryId" + "deliveryId", + "name" ], - "$id": "https://example.com/OrderSetDeliveryAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetDeliveryAddressCustomTypeAction.schema.json b/json-schemas/OrderSetDeliveryAddressCustomTypeAction.schema.json index 0f1a4955..de703e2f 100644 --- a/json-schemas/OrderSetDeliveryAddressCustomTypeAction.schema.json +++ b/json-schemas/OrderSetDeliveryAddressCustomTypeAction.schema.json @@ -1,25 +1,17 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetDeliveryAddressCustomTypeAction", "type": "object", "properties": { - "name": {"type": "string"}, "action": {"enum": ["setDeliveryAddressCustomType"]}, "deliveryId": {"type": "string"}, - "value": {"type": [ - "number", - "string", - "boolean", - "object", - "array", - "null" - ]} + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"} }, "required": [ "action", - "deliveryId", - "name" + "deliveryId" ], - "$id": "https://example.com/OrderSetDeliveryAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderEditSetDeliveryAddressCustomTypeAction.schema.json b/json-schemas/OrderSetDeliveryCustomFieldAction.schema.json similarity index 56% rename from json-schemas/OrderEditSetDeliveryAddressCustomTypeAction.schema.json rename to json-schemas/OrderSetDeliveryCustomFieldAction.schema.json index f6d42a45..2e35ee0d 100644 --- a/json-schemas/OrderEditSetDeliveryAddressCustomTypeAction.schema.json +++ b/json-schemas/OrderSetDeliveryCustomFieldAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetDeliveryAddressCustomTypeAction", + "title": "OrderSetDeliveryCustomFieldAction", "type": "object", "properties": { "name": {"type": "string"}, - "action": {"enum": ["setDeliveryAddressCustomType"]}, + "action": {"enum": ["setDeliveryCustomField"]}, "deliveryId": {"type": "string"}, "value": {"type": [ "number", @@ -21,5 +21,5 @@ "deliveryId", "name" ], - "$id": "https://example.com/OrderEditSetDeliveryAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderEditSetDeliveryAddressCustomFieldAction.schema.json b/json-schemas/OrderSetDeliveryCustomTypeAction.schema.json similarity index 51% rename from json-schemas/OrderEditSetDeliveryAddressCustomFieldAction.schema.json rename to json-schemas/OrderSetDeliveryCustomTypeAction.schema.json index 9d43b4eb..bf0e8d8a 100644 --- a/json-schemas/OrderEditSetDeliveryAddressCustomFieldAction.schema.json +++ b/json-schemas/OrderSetDeliveryCustomTypeAction.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetDeliveryAddressCustomFieldAction", + "title": "OrderSetDeliveryCustomTypeAction", "type": "object", "properties": { - "action": {"enum": ["setDeliveryAddressCustomField"]}, + "action": {"enum": ["setDeliveryCustomType"]}, "deliveryId": {"type": "string"}, "type": {"$ref": "TypeResourceIdentifier.schema.json"}, "fields": {"$ref": "FieldContainer.schema.json"} @@ -13,5 +13,5 @@ "action", "deliveryId" ], - "$id": "https://example.com/OrderEditSetDeliveryAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetDeliveryItemsAction.schema.json b/json-schemas/OrderSetDeliveryItemsAction.schema.json index 650831f9..63d33db2 100644 --- a/json-schemas/OrderSetDeliveryItemsAction.schema.json +++ b/json-schemas/OrderSetDeliveryItemsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetDeliveryItemsAction", "type": "object", @@ -16,5 +16,5 @@ "deliveryId", "items" ], - "$id": "https://example.com/OrderSetDeliveryItemsAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetDeliveryItemsAction.schema.json" } diff --git a/json-schemas/OrderSetItemShippingAddressCustomFieldAction.schema.json b/json-schemas/OrderSetItemShippingAddressCustomFieldAction.schema.json index 973aa3d2..5fe505c7 100644 --- a/json-schemas/OrderSetItemShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/OrderSetItemShippingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetItemShippingAddressCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "addressKey", "name" ], - "$id": "https://example.com/OrderSetItemShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetItemShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetItemShippingAddressCustomTypeAction.schema.json b/json-schemas/OrderSetItemShippingAddressCustomTypeAction.schema.json index 0fad7113..6e7db774 100644 --- a/json-schemas/OrderSetItemShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/OrderSetItemShippingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetItemShippingAddressCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "addressKey" ], - "$id": "https://example.com/OrderSetItemShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetItemShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetLineItemCustomFieldAction.schema.json b/json-schemas/OrderSetLineItemCustomFieldAction.schema.json index 31c05114..97dfc2fb 100644 --- a/json-schemas/OrderSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/OrderSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/OrderSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetLineItemCustomTypeAction.schema.json b/json-schemas/OrderSetLineItemCustomTypeAction.schema.json index 7cf58bc2..2a0b2fc1 100644 --- a/json-schemas/OrderSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/OrderSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/OrderSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetLineItemShippingDetailsAction.schema.json b/json-schemas/OrderSetLineItemShippingDetailsAction.schema.json index a7692e5a..12df270b 100644 --- a/json-schemas/OrderSetLineItemShippingDetailsAction.schema.json +++ b/json-schemas/OrderSetLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/OrderSetLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/OrderSetLocaleAction.schema.json b/json-schemas/OrderSetLocaleAction.schema.json index 585f1079..37592c1f 100644 --- a/json-schemas/OrderSetLocaleAction.schema.json +++ b/json-schemas/OrderSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/OrderSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetLocaleAction.schema.json" } diff --git a/json-schemas/OrderSetOrderNumberAction.schema.json b/json-schemas/OrderSetOrderNumberAction.schema.json index f7738b05..93fc27d0 100644 --- a/json-schemas/OrderSetOrderNumberAction.schema.json +++ b/json-schemas/OrderSetOrderNumberAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetOrderNumberAction", "type": "object", @@ -8,5 +8,5 @@ "orderNumber": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/OrderSetOrderNumberAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetOrderNumberAction.schema.json" } diff --git a/json-schemas/OrderSetParcelCustomFieldAction.schema.json b/json-schemas/OrderSetParcelCustomFieldAction.schema.json new file mode 100644 index 00000000..2807b691 --- /dev/null +++ b/json-schemas/OrderSetParcelCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSetParcelCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setParcelCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}, + "parcelId": {"type": "string"} + }, + "required": [ + "action", + "parcelId", + "name" + ], + "$id": "https://api.commercetools.com/OrderSetParcelCustomFieldAction.schema.json" +} diff --git a/json-schemas/OrderSetParcelCustomTypeAction.schema.json b/json-schemas/OrderSetParcelCustomTypeAction.schema.json new file mode 100644 index 00000000..ba85d5b8 --- /dev/null +++ b/json-schemas/OrderSetParcelCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSetParcelCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setParcelCustomType"]}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "parcelId": {"type": "string"} + }, + "required": [ + "action", + "parcelId" + ], + "$id": "https://api.commercetools.com/OrderSetParcelCustomTypeAction.schema.json" +} diff --git a/json-schemas/OrderSetParcelItemsAction.schema.json b/json-schemas/OrderSetParcelItemsAction.schema.json index fc47412e..154cf1b6 100644 --- a/json-schemas/OrderSetParcelItemsAction.schema.json +++ b/json-schemas/OrderSetParcelItemsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetParcelItemsAction", "type": "object", @@ -16,5 +16,5 @@ "parcelId", "items" ], - "$id": "https://example.com/OrderSetParcelItemsAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetParcelItemsAction.schema.json" } diff --git a/json-schemas/OrderSetParcelMeasurementsAction.schema.json b/json-schemas/OrderSetParcelMeasurementsAction.schema.json index e3002f2d..e0f62c9c 100644 --- a/json-schemas/OrderSetParcelMeasurementsAction.schema.json +++ b/json-schemas/OrderSetParcelMeasurementsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetParcelMeasurementsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "parcelId" ], - "$id": "https://example.com/OrderSetParcelMeasurementsAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetParcelMeasurementsAction.schema.json" } diff --git a/json-schemas/OrderSetParcelTrackingDataAction.schema.json b/json-schemas/OrderSetParcelTrackingDataAction.schema.json index b5f2e3cb..5569da09 100644 --- a/json-schemas/OrderSetParcelTrackingDataAction.schema.json +++ b/json-schemas/OrderSetParcelTrackingDataAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetParcelTrackingDataAction", "type": "object", @@ -12,5 +12,5 @@ "action", "parcelId" ], - "$id": "https://example.com/OrderSetParcelTrackingDataAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetParcelTrackingDataAction.schema.json" } diff --git a/json-schemas/OrderSetReturnInfoAction.schema.json b/json-schemas/OrderSetReturnInfoAction.schema.json new file mode 100644 index 00000000..d1ea2dbd --- /dev/null +++ b/json-schemas/OrderSetReturnInfoAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSetReturnInfoAction", + "type": "object", + "properties": { + "action": {"enum": ["setReturnInfo"]}, + "items": { + "type": "array", + "items": {"$ref": "ReturnInfoDraft.schema.json"} + } + }, + "required": ["action"], + "$id": "https://api.commercetools.com/OrderSetReturnInfoAction.schema.json" +} diff --git a/json-schemas/OrderSetReturnItemCustomFieldAction.schema.json b/json-schemas/OrderSetReturnItemCustomFieldAction.schema.json new file mode 100644 index 00000000..a355a896 --- /dev/null +++ b/json-schemas/OrderSetReturnItemCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSetReturnItemCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setReturnItemCustomField"]}, + "returnItemId": {"type": "string"}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "returnItemId", + "name" + ], + "$id": "https://api.commercetools.com/OrderSetReturnItemCustomFieldAction.schema.json" +} diff --git a/json-schemas/OrderSetReturnItemCustomTypeAction.schema.json b/json-schemas/OrderSetReturnItemCustomTypeAction.schema.json new file mode 100644 index 00000000..b3ea4596 --- /dev/null +++ b/json-schemas/OrderSetReturnItemCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OrderSetReturnItemCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setReturnItemCustomType"]}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "returnItemId": {"type": "string"} + }, + "required": [ + "action", + "returnItemId" + ], + "$id": "https://api.commercetools.com/OrderSetReturnItemCustomTypeAction.schema.json" +} diff --git a/json-schemas/OrderSetReturnPaymentStateAction.schema.json b/json-schemas/OrderSetReturnPaymentStateAction.schema.json index acf8a026..7a4ef6d1 100644 --- a/json-schemas/OrderSetReturnPaymentStateAction.schema.json +++ b/json-schemas/OrderSetReturnPaymentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetReturnPaymentStateAction", "type": "object", @@ -13,5 +13,5 @@ "returnItemId", "paymentState" ], - "$id": "https://example.com/OrderSetReturnPaymentStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetReturnPaymentStateAction.schema.json" } diff --git a/json-schemas/OrderSetReturnShipmentStateAction.schema.json b/json-schemas/OrderSetReturnShipmentStateAction.schema.json index 631588b0..235ad902 100644 --- a/json-schemas/OrderSetReturnShipmentStateAction.schema.json +++ b/json-schemas/OrderSetReturnShipmentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetReturnShipmentStateAction", "type": "object", @@ -13,5 +13,5 @@ "returnItemId", "shipmentState" ], - "$id": "https://example.com/OrderSetReturnShipmentStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetReturnShipmentStateAction.schema.json" } diff --git a/json-schemas/OrderSetShippingAddressAction.schema.json b/json-schemas/OrderSetShippingAddressAction.schema.json index ebdfc125..1a7d43c2 100644 --- a/json-schemas/OrderSetShippingAddressAction.schema.json +++ b/json-schemas/OrderSetShippingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["setShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/OrderSetShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetShippingAddressAction.schema.json" } diff --git a/json-schemas/OrderSetShippingAddressCustomFieldAction.schema.json b/json-schemas/OrderSetShippingAddressCustomFieldAction.schema.json index a2ff7cc3..e1ef8c73 100644 --- a/json-schemas/OrderSetShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/OrderSetShippingAddressCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetShippingAddressCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderSetShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderSetShippingAddressCustomTypeAction.schema.json b/json-schemas/OrderSetShippingAddressCustomTypeAction.schema.json index cbc30b96..b990ce77 100644 --- a/json-schemas/OrderSetShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/OrderSetShippingAddressCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetShippingAddressCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setShippingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderSetShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/OrderSetStoreAction.schema.json b/json-schemas/OrderSetStoreAction.schema.json index 1f3d49cb..fae04390 100644 --- a/json-schemas/OrderSetStoreAction.schema.json +++ b/json-schemas/OrderSetStoreAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderSetStoreAction", "type": "object", @@ -8,5 +8,5 @@ "store": {"$ref": "StoreResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/OrderSetStoreAction.schema.json" + "$id": "https://api.commercetools.com/OrderSetStoreAction.schema.json" } diff --git a/json-schemas/OrderShipmentStateChangedMessage.schema.json b/json-schemas/OrderShipmentStateChangedMessage.schema.json index 59cfa61f..532ef2a4 100644 --- a/json-schemas/OrderShipmentStateChangedMessage.schema.json +++ b/json-schemas/OrderShipmentStateChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShipmentStateChangedMessage", "type": "object", @@ -35,5 +35,5 @@ "type", "shipmentState" ], - "$id": "https://example.com/OrderShipmentStateChangedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderShipmentStateChangedMessage.schema.json" } diff --git a/json-schemas/OrderShipmentStateChangedMessagePayload.schema.json b/json-schemas/OrderShipmentStateChangedMessagePayload.schema.json index f19501ce..439a541f 100644 --- a/json-schemas/OrderShipmentStateChangedMessagePayload.schema.json +++ b/json-schemas/OrderShipmentStateChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShipmentStateChangedMessagePayload", "type": "object", @@ -12,5 +12,5 @@ "type", "shipmentState" ], - "$id": "https://example.com/OrderShipmentStateChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderShipmentStateChangedMessagePayload.schema.json" } diff --git a/json-schemas/OrderShippingAddressSetMessage.schema.json b/json-schemas/OrderShippingAddressSetMessage.schema.json index 04440997..2c61ca57 100644 --- a/json-schemas/OrderShippingAddressSetMessage.schema.json +++ b/json-schemas/OrderShippingAddressSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingAddressSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderShippingAddressSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderShippingAddressSetMessage.schema.json" } diff --git a/json-schemas/OrderShippingAddressSetMessagePayload.schema.json b/json-schemas/OrderShippingAddressSetMessagePayload.schema.json index ba08fac6..477ef4c7 100644 --- a/json-schemas/OrderShippingAddressSetMessagePayload.schema.json +++ b/json-schemas/OrderShippingAddressSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingAddressSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "address": {"$ref": "Address.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderShippingAddressSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderShippingAddressSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderShippingInfoSetMessage.schema.json b/json-schemas/OrderShippingInfoSetMessage.schema.json index 934b39c2..95360dc7 100644 --- a/json-schemas/OrderShippingInfoSetMessage.schema.json +++ b/json-schemas/OrderShippingInfoSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingInfoSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderShippingInfoSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderShippingInfoSetMessage.schema.json" } diff --git a/json-schemas/OrderShippingInfoSetMessagePayload.schema.json b/json-schemas/OrderShippingInfoSetMessagePayload.schema.json index 31b62109..af63af87 100644 --- a/json-schemas/OrderShippingInfoSetMessagePayload.schema.json +++ b/json-schemas/OrderShippingInfoSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingInfoSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "shippingInfo": {"$ref": "ShippingInfo.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderShippingInfoSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderShippingInfoSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderShippingRateInputSetMessage.schema.json b/json-schemas/OrderShippingRateInputSetMessage.schema.json index 2c45b356..e2df1827 100644 --- a/json-schemas/OrderShippingRateInputSetMessage.schema.json +++ b/json-schemas/OrderShippingRateInputSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingRateInputSetMessage", "type": "object", @@ -34,5 +34,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/OrderShippingRateInputSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderShippingRateInputSetMessage.schema.json" } diff --git a/json-schemas/OrderShippingRateInputSetMessagePayload.schema.json b/json-schemas/OrderShippingRateInputSetMessagePayload.schema.json index eed5b642..bca224d9 100644 --- a/json-schemas/OrderShippingRateInputSetMessagePayload.schema.json +++ b/json-schemas/OrderShippingRateInputSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderShippingRateInputSetMessagePayload", "type": "object", @@ -9,5 +9,5 @@ "shippingRateInput": {"$ref": "ShippingRateInput.schema.json"} }, "required": ["type"], - "$id": "https://example.com/OrderShippingRateInputSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderShippingRateInputSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderStateChangedMessage.schema.json b/json-schemas/OrderStateChangedMessage.schema.json index a6232a67..6b7a5967 100644 --- a/json-schemas/OrderStateChangedMessage.schema.json +++ b/json-schemas/OrderStateChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStateChangedMessage", "type": "object", @@ -36,5 +36,5 @@ "orderState", "oldOrderState" ], - "$id": "https://example.com/OrderStateChangedMessage.schema.json" + "$id": "https://api.commercetools.com/OrderStateChangedMessage.schema.json" } diff --git a/json-schemas/OrderStateChangedMessagePayload.schema.json b/json-schemas/OrderStateChangedMessagePayload.schema.json index 931d75c0..8d87aebb 100644 --- a/json-schemas/OrderStateChangedMessagePayload.schema.json +++ b/json-schemas/OrderStateChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStateChangedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "orderState", "oldOrderState" ], - "$id": "https://example.com/OrderStateChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderStateChangedMessagePayload.schema.json" } diff --git a/json-schemas/OrderStateEnum.schema.json b/json-schemas/OrderStateEnum.schema.json index 4672566a..f94a76a5 100644 --- a/json-schemas/OrderStateEnum.schema.json +++ b/json-schemas/OrderStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "OrderState", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "Complete", "Cancelled" ], - "$id": "https://example.com/OrderStateEnum.schema.json" + "$id": "https://api.commercetools.com/OrderStateEnum.schema.json" } diff --git a/json-schemas/OrderStateTransitionMessage.schema.json b/json-schemas/OrderStateTransitionMessage.schema.json index 018477d0..ffbd2fb5 100644 --- a/json-schemas/OrderStateTransitionMessage.schema.json +++ b/json-schemas/OrderStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStateTransitionMessage", "type": "object", @@ -10,6 +10,7 @@ "format": "date-time" }, "resource": {"$ref": "Reference.schema.json"}, + "oldState": {"$ref": "StateReference.schema.json"}, "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, "resourceVersion": {"type": "number"}, "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, @@ -36,5 +37,5 @@ "state", "force" ], - "$id": "https://example.com/OrderStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/OrderStateTransitionMessage.schema.json" } diff --git a/json-schemas/OrderStateTransitionMessagePayload.schema.json b/json-schemas/OrderStateTransitionMessagePayload.schema.json index b9b54f34..34dbb8f0 100644 --- a/json-schemas/OrderStateTransitionMessagePayload.schema.json +++ b/json-schemas/OrderStateTransitionMessagePayload.schema.json @@ -1,17 +1,18 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStateTransitionMessagePayload", "type": "object", "properties": { - "type": {"enum": ["OrderStateTransition"]}, "force": {"type": "boolean"}, - "state": {"$ref": "StateReference.schema.json"} + "state": {"$ref": "StateReference.schema.json"}, + "type": {"enum": ["OrderStateTransition"]}, + "oldState": {"$ref": "StateReference.schema.json"} }, "required": [ "type", "state", "force" ], - "$id": "https://example.com/OrderStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/OrderStoreSetMessage.schema.json b/json-schemas/OrderStoreSetMessage.schema.json index bd2e7430..d54d35b6 100644 --- a/json-schemas/OrderStoreSetMessage.schema.json +++ b/json-schemas/OrderStoreSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStoreSetMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "store" ], - "$id": "https://example.com/OrderStoreSetMessage.schema.json" + "$id": "https://api.commercetools.com/OrderStoreSetMessage.schema.json" } diff --git a/json-schemas/OrderStoreSetMessagePayload.schema.json b/json-schemas/OrderStoreSetMessagePayload.schema.json index 62af17a4..333e2a75 100644 --- a/json-schemas/OrderStoreSetMessagePayload.schema.json +++ b/json-schemas/OrderStoreSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderStoreSetMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "store" ], - "$id": "https://example.com/OrderStoreSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/OrderStoreSetMessagePayload.schema.json" } diff --git a/json-schemas/OrderTransitionCustomLineItemStateAction.schema.json b/json-schemas/OrderTransitionCustomLineItemStateAction.schema.json index 3d782b97..1a2a7fc1 100644 --- a/json-schemas/OrderTransitionCustomLineItemStateAction.schema.json +++ b/json-schemas/OrderTransitionCustomLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderTransitionCustomLineItemStateAction", "type": "object", @@ -21,5 +21,5 @@ "fromState", "toState" ], - "$id": "https://example.com/OrderTransitionCustomLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderTransitionCustomLineItemStateAction.schema.json" } diff --git a/json-schemas/OrderTransitionLineItemStateAction.schema.json b/json-schemas/OrderTransitionLineItemStateAction.schema.json index 710fbbb1..0c78a24b 100644 --- a/json-schemas/OrderTransitionLineItemStateAction.schema.json +++ b/json-schemas/OrderTransitionLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderTransitionLineItemStateAction", "type": "object", @@ -21,5 +21,5 @@ "fromState", "toState" ], - "$id": "https://example.com/OrderTransitionLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderTransitionLineItemStateAction.schema.json" } diff --git a/json-schemas/OrderTransitionStateAction.schema.json b/json-schemas/OrderTransitionStateAction.schema.json index 9595ccf4..b0be8b66 100644 --- a/json-schemas/OrderTransitionStateAction.schema.json +++ b/json-schemas/OrderTransitionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderTransitionStateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "state" ], - "$id": "https://example.com/OrderTransitionStateAction.schema.json" + "$id": "https://api.commercetools.com/OrderTransitionStateAction.schema.json" } diff --git a/json-schemas/OrderUpdate.schema.json b/json-schemas/OrderUpdate.schema.json index 0f7c80e6..11398c8f 100644 --- a/json-schemas/OrderUpdate.schema.json +++ b/json-schemas/OrderUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/OrderUpdate.schema.json" + "$id": "https://api.commercetools.com/OrderUpdate.schema.json" } diff --git a/json-schemas/OrderUpdateAction.schema.json b/json-schemas/OrderUpdateAction.schema.json index e50ccf22..658f4b40 100644 --- a/json-schemas/OrderUpdateAction.schema.json +++ b/json-schemas/OrderUpdateAction.schema.json @@ -1,61 +1,125 @@ { "oneOf": [ - {"$ref": "https://example.com/OrderAddDeliveryAction.schema.json"}, - {"$ref": "https://example.com/OrderAddItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderAddParcelToDeliveryAction.schema.json"}, - {"$ref": "https://example.com/OrderAddPaymentAction.schema.json"}, - {"$ref": "https://example.com/OrderAddReturnInfoAction.schema.json"}, - {"$ref": "https://example.com/OrderChangeOrderStateAction.schema.json"}, - {"$ref": "https://example.com/OrderChangePaymentStateAction.schema.json"}, - {"$ref": "https://example.com/OrderChangeShipmentStateAction.schema.json"}, - {"$ref": "https://example.com/OrderImportCustomLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/OrderImportLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/OrderRemoveDeliveryAction.schema.json"}, - {"$ref": "https://example.com/OrderRemoveItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderRemoveParcelFromDeliveryAction.schema.json"}, - {"$ref": "https://example.com/OrderRemovePaymentAction.schema.json"}, - {"$ref": "https://example.com/OrderSetBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderSetBillingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetBillingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomerEmailAction.schema.json"}, - {"$ref": "https://example.com/OrderSetCustomerIdAction.schema.json"}, - {"$ref": "https://example.com/OrderSetDeliveryAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderSetDeliveryAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetDeliveryAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetDeliveryItemsAction.schema.json"}, - {"$ref": "https://example.com/OrderSetItemShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetItemShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/OrderSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/OrderSetOrderNumberAction.schema.json"}, - {"$ref": "https://example.com/OrderSetParcelItemsAction.schema.json"}, - {"$ref": "https://example.com/OrderSetParcelMeasurementsAction.schema.json"}, - {"$ref": "https://example.com/OrderSetParcelTrackingDataAction.schema.json"}, - {"$ref": "https://example.com/OrderSetReturnPaymentStateAction.schema.json"}, - {"$ref": "https://example.com/OrderSetReturnShipmentStateAction.schema.json"}, - {"$ref": "https://example.com/OrderSetShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderSetShippingAddressCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/OrderSetShippingAddressCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/OrderSetStoreAction.schema.json"}, - {"$ref": "https://example.com/OrderTransitionCustomLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/OrderTransitionLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/OrderTransitionStateAction.schema.json"}, - {"$ref": "https://example.com/OrderUpdateItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/OrderUpdateSyncInfoAction.schema.json"} + {"$ref": "https://api.commercetools.com/OrderAddDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderAddItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderAddParcelToDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderAddPaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderAddReturnInfoAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderChangeOrderStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderChangePaymentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderChangeShipmentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderImportCustomLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderImportLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderRemoveDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderRemoveItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderRemoveParcelFromDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderRemovePaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetBillingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetBillingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomerEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetCustomerIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetDeliveryItemsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetItemShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetItemShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetOrderNumberAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetParcelCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetParcelCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetParcelItemsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetParcelMeasurementsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetParcelTrackingDataAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetReturnInfoAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetReturnItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetReturnItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetReturnPaymentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetReturnShipmentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderSetStoreAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderTransitionCustomLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderTransitionLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderTransitionStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderUpdateItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderUpdateSyncInfoAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addDelivery", + "addItemShippingAddress", + "addParcelToDelivery", + "addPayment", + "addReturnInfo", + "changeOrderState", + "changePaymentState", + "changeShipmentState", + "importCustomLineItemState", + "importLineItemState", + "removeDelivery", + "removeItemShippingAddress", + "removeParcelFromDelivery", + "removePayment", + "setBillingAddress", + "setBillingAddressCustomField", + "setBillingAddressCustomType", + "setCustomField", + "setCustomLineItemCustomField", + "setCustomLineItemCustomType", + "setCustomLineItemShippingDetails", + "setCustomType", + "setCustomerEmail", + "setCustomerId", + "setDeliveryAddress", + "setDeliveryAddressCustomField", + "setDeliveryAddressCustomType", + "setDeliveryCustomField", + "setDeliveryCustomType", + "setDeliveryItems", + "setItemShippingAddressCustomField", + "setItemShippingAddressCustomType", + "setLineItemCustomField", + "setLineItemCustomType", + "setLineItemShippingDetails", + "setLocale", + "setOrderNumber", + "setParcelCustomField", + "setParcelCustomType", + "setParcelItems", + "setParcelMeasurements", + "setParcelTrackingData", + "setReturnInfo", + "setReturnItemCustomField", + "setReturnItemCustomType", + "setReturnPaymentState", + "setReturnShipmentState", + "setShippingAddress", + "setShippingAddressCustomField", + "setShippingAddressCustomType", + "setStore", + "transitionCustomLineItemState", + "transitionLineItemState", + "transitionState", + "updateItemShippingAddress", + "updateSyncInfo" + ]}}, "required": ["action"], - "$id": "https://example.com/OrderUpdateAction.schema.json", + "$id": "https://api.commercetools.com/OrderUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/OrderUpdateItemShippingAddressAction.schema.json b/json-schemas/OrderUpdateItemShippingAddressAction.schema.json index 6ab1662e..06d9925f 100644 --- a/json-schemas/OrderUpdateItemShippingAddressAction.schema.json +++ b/json-schemas/OrderUpdateItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderUpdateItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["updateItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/OrderUpdateItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/OrderUpdateItemShippingAddressAction.schema.json" } diff --git a/json-schemas/OrderUpdateSyncInfoAction.schema.json b/json-schemas/OrderUpdateSyncInfoAction.schema.json index ab1fef30..41772544 100644 --- a/json-schemas/OrderUpdateSyncInfoAction.schema.json +++ b/json-schemas/OrderUpdateSyncInfoAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OrderUpdateSyncInfoAction", "type": "object", @@ -16,5 +16,5 @@ "action", "channel" ], - "$id": "https://example.com/OrderUpdateSyncInfoAction.schema.json" + "$id": "https://api.commercetools.com/OrderUpdateSyncInfoAction.schema.json" } diff --git a/json-schemas/OutOfStockError.schema.json b/json-schemas/OutOfStockError.schema.json index 14951869..0b7ccfc3 100644 --- a/json-schemas/OutOfStockError.schema.json +++ b/json-schemas/OutOfStockError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OutOfStockError", "type": "object", @@ -21,5 +29,5 @@ "lineItems", "skus" ], - "$id": "https://example.com/OutOfStockError.schema.json" + "$id": "https://api.commercetools.com/OutOfStockError.schema.json" } diff --git a/json-schemas/OverCapacityError.schema.json b/json-schemas/OverCapacityError.schema.json index 20d3801e..bebf2144 100644 --- a/json-schemas/OverCapacityError.schema.json +++ b/json-schemas/OverCapacityError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "OverCapacityError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/OverCapacityError.schema.json" + "$id": "https://api.commercetools.com/OverCapacityError.schema.json" } diff --git a/json-schemas/OverlappingStandalonePriceValidityError.schema.json b/json-schemas/OverlappingStandalonePriceValidityError.schema.json new file mode 100644 index 00000000..28e1ca67 --- /dev/null +++ b/json-schemas/OverlappingStandalonePriceValidityError.schema.json @@ -0,0 +1,48 @@ +{ + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "OverlappingStandalonePriceValidityError", + "type": "object", + "properties": { + "country": {"type": "string"}, + "code": {"enum": ["OverlappingStandalonePriceValidity"]}, + "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"}, + "conflictingValidUntil": { + "type": "string", + "format": "date-time" + }, + "channel": {"$ref": "ChannelResourceIdentifier.schema.json"}, + "conflictingValidFrom": { + "type": "string", + "format": "date-time" + }, + "validUntil": { + "type": "string", + "format": "date-time" + }, + "currency": {"type": "string"}, + "validFrom": { + "type": "string", + "format": "date-time" + }, + "message": {"type": "string"}, + "sku": {"type": "string"}, + "conflictingStandalonePrice": {"$ref": "StandalonePriceReference.schema.json"} + }, + "required": [ + "code", + "message", + "conflictingStandalonePrice", + "sku", + "currency" + ], + "$id": "https://api.commercetools.com/OverlappingStandalonePriceValidityError.schema.json" +} diff --git a/json-schemas/PagedQueryResponse.schema.json b/json-schemas/PagedQueryResponse.schema.json index 3ef44cff..6017470f 100644 --- a/json-schemas/PagedQueryResponse.schema.json +++ b/json-schemas/PagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PagedQueryResponse", "type": "object", @@ -16,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/PagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/PagedQueryResponse.schema.json" } diff --git a/json-schemas/Parcel.schema.json b/json-schemas/Parcel.schema.json index 8112ecdb..34ed6779 100644 --- a/json-schemas/Parcel.schema.json +++ b/json-schemas/Parcel.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Parcel", "type": "object", @@ -14,11 +14,12 @@ "items": {"$ref": "DeliveryItem.schema.json"} }, "measurements": {"$ref": "ParcelMeasurements.schema.json"}, - "trackingData": {"$ref": "TrackingData.schema.json"} + "trackingData": {"$ref": "TrackingData.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"} }, "required": [ "id", "createdAt" ], - "$id": "https://example.com/Parcel.schema.json" + "$id": "https://api.commercetools.com/Parcel.schema.json" } diff --git a/json-schemas/ParcelAddedToDeliveryMessage.schema.json b/json-schemas/ParcelAddedToDeliveryMessage.schema.json index 7c207fed..23d0f0e5 100644 --- a/json-schemas/ParcelAddedToDeliveryMessage.schema.json +++ b/json-schemas/ParcelAddedToDeliveryMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelAddedToDeliveryMessage", "type": "object", @@ -36,5 +36,5 @@ "delivery", "parcel" ], - "$id": "https://example.com/ParcelAddedToDeliveryMessage.schema.json" + "$id": "https://api.commercetools.com/ParcelAddedToDeliveryMessage.schema.json" } diff --git a/json-schemas/ParcelAddedToDeliveryMessagePayload.schema.json b/json-schemas/ParcelAddedToDeliveryMessagePayload.schema.json index 6bf8486b..7ba165e1 100644 --- a/json-schemas/ParcelAddedToDeliveryMessagePayload.schema.json +++ b/json-schemas/ParcelAddedToDeliveryMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelAddedToDeliveryMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "delivery", "parcel" ], - "$id": "https://example.com/ParcelAddedToDeliveryMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ParcelAddedToDeliveryMessagePayload.schema.json" } diff --git a/json-schemas/ParcelDraft.schema.json b/json-schemas/ParcelDraft.schema.json index d9c0e110..bd60505f 100644 --- a/json-schemas/ParcelDraft.schema.json +++ b/json-schemas/ParcelDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ParcelDraft", "type": "object", "properties": { @@ -9,7 +9,8 @@ "items": {"$ref": "DeliveryItem.schema.json"} }, "measurements": {"$ref": "ParcelMeasurements.schema.json"}, - "trackingData": {"$ref": "TrackingData.schema.json"} + "trackingData": {"$ref": "TrackingData.schema.json"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, - "$id": "https://example.com/ParcelDraft.schema.json" + "$id": "https://api.commercetools.com/ParcelDraft.schema.json" } diff --git a/json-schemas/ParcelItemsUpdatedMessage.schema.json b/json-schemas/ParcelItemsUpdatedMessage.schema.json index b1e02686..df5f09aa 100644 --- a/json-schemas/ParcelItemsUpdatedMessage.schema.json +++ b/json-schemas/ParcelItemsUpdatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelItemsUpdatedMessage", "type": "object", @@ -45,5 +45,5 @@ "items", "oldItems" ], - "$id": "https://example.com/ParcelItemsUpdatedMessage.schema.json" + "$id": "https://api.commercetools.com/ParcelItemsUpdatedMessage.schema.json" } diff --git a/json-schemas/ParcelItemsUpdatedMessagePayload.schema.json b/json-schemas/ParcelItemsUpdatedMessagePayload.schema.json index ea7e8ca5..c48d021d 100644 --- a/json-schemas/ParcelItemsUpdatedMessagePayload.schema.json +++ b/json-schemas/ParcelItemsUpdatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelItemsUpdatedMessagePayload", "type": "object", @@ -22,5 +22,5 @@ "items", "oldItems" ], - "$id": "https://example.com/ParcelItemsUpdatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ParcelItemsUpdatedMessagePayload.schema.json" } diff --git a/json-schemas/ParcelMeasurements.schema.json b/json-schemas/ParcelMeasurements.schema.json index dac288f5..d4eec3cd 100644 --- a/json-schemas/ParcelMeasurements.schema.json +++ b/json-schemas/ParcelMeasurements.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ParcelMeasurements", "type": "object", "properties": { @@ -9,5 +9,5 @@ "lengthInMillimeter": {"type": "number"}, "heightInMillimeter": {"type": "number"} }, - "$id": "https://example.com/ParcelMeasurements.schema.json" + "$id": "https://api.commercetools.com/ParcelMeasurements.schema.json" } diff --git a/json-schemas/ParcelMeasurementsUpdatedMessage.schema.json b/json-schemas/ParcelMeasurementsUpdatedMessage.schema.json index f950e160..a10cdea1 100644 --- a/json-schemas/ParcelMeasurementsUpdatedMessage.schema.json +++ b/json-schemas/ParcelMeasurementsUpdatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelMeasurementsUpdatedMessage", "type": "object", @@ -37,5 +37,5 @@ "deliveryId", "parcelId" ], - "$id": "https://example.com/ParcelMeasurementsUpdatedMessage.schema.json" + "$id": "https://api.commercetools.com/ParcelMeasurementsUpdatedMessage.schema.json" } diff --git a/json-schemas/ParcelMeasurementsUpdatedMessagePayload.schema.json b/json-schemas/ParcelMeasurementsUpdatedMessagePayload.schema.json index 23de8848..f446e556 100644 --- a/json-schemas/ParcelMeasurementsUpdatedMessagePayload.schema.json +++ b/json-schemas/ParcelMeasurementsUpdatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelMeasurementsUpdatedMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "deliveryId", "parcelId" ], - "$id": "https://example.com/ParcelMeasurementsUpdatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ParcelMeasurementsUpdatedMessagePayload.schema.json" } diff --git a/json-schemas/ParcelRemovedFromDeliveryMessage.schema.json b/json-schemas/ParcelRemovedFromDeliveryMessage.schema.json index 4f325867..108898ae 100644 --- a/json-schemas/ParcelRemovedFromDeliveryMessage.schema.json +++ b/json-schemas/ParcelRemovedFromDeliveryMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelRemovedFromDeliveryMessage", "type": "object", @@ -36,5 +36,5 @@ "deliveryId", "parcel" ], - "$id": "https://example.com/ParcelRemovedFromDeliveryMessage.schema.json" + "$id": "https://api.commercetools.com/ParcelRemovedFromDeliveryMessage.schema.json" } diff --git a/json-schemas/ParcelRemovedFromDeliveryMessagePayload.schema.json b/json-schemas/ParcelRemovedFromDeliveryMessagePayload.schema.json index 0cf9ce63..6d7115f6 100644 --- a/json-schemas/ParcelRemovedFromDeliveryMessagePayload.schema.json +++ b/json-schemas/ParcelRemovedFromDeliveryMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelRemovedFromDeliveryMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "deliveryId", "parcel" ], - "$id": "https://example.com/ParcelRemovedFromDeliveryMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ParcelRemovedFromDeliveryMessagePayload.schema.json" } diff --git a/json-schemas/ParcelTrackingDataUpdatedMessage.schema.json b/json-schemas/ParcelTrackingDataUpdatedMessage.schema.json index a2babbca..165612ad 100644 --- a/json-schemas/ParcelTrackingDataUpdatedMessage.schema.json +++ b/json-schemas/ParcelTrackingDataUpdatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelTrackingDataUpdatedMessage", "type": "object", @@ -37,5 +37,5 @@ "deliveryId", "parcelId" ], - "$id": "https://example.com/ParcelTrackingDataUpdatedMessage.schema.json" + "$id": "https://api.commercetools.com/ParcelTrackingDataUpdatedMessage.schema.json" } diff --git a/json-schemas/ParcelTrackingDataUpdatedMessagePayload.schema.json b/json-schemas/ParcelTrackingDataUpdatedMessagePayload.schema.json index a909487f..68071201 100644 --- a/json-schemas/ParcelTrackingDataUpdatedMessagePayload.schema.json +++ b/json-schemas/ParcelTrackingDataUpdatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ParcelTrackingDataUpdatedMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "deliveryId", "parcelId" ], - "$id": "https://example.com/ParcelTrackingDataUpdatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ParcelTrackingDataUpdatedMessagePayload.schema.json" } diff --git a/json-schemas/PayloadNotIncluded.schema.json b/json-schemas/PayloadNotIncluded.schema.json index 8ce215ed..b1ab9467 100644 --- a/json-schemas/PayloadNotIncluded.schema.json +++ b/json-schemas/PayloadNotIncluded.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PayloadNotIncluded", "type": "object", @@ -11,5 +11,5 @@ "reason", "payloadType" ], - "$id": "https://example.com/PayloadNotIncluded.schema.json" + "$id": "https://api.commercetools.com/PayloadNotIncluded.schema.json" } diff --git a/json-schemas/Payment.schema.json b/json-schemas/Payment.schema.json index ead7cced..5a4aa3d7 100644 --- a/json-schemas/Payment.schema.json +++ b/json-schemas/Payment.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Payment", "type": "object", @@ -49,5 +49,5 @@ "transactions", "interfaceInteractions" ], - "$id": "https://example.com/Payment.schema.json" + "$id": "https://api.commercetools.com/Payment.schema.json" } diff --git a/json-schemas/PaymentAddInterfaceInteractionAction.schema.json b/json-schemas/PaymentAddInterfaceInteractionAction.schema.json index 01cdcb73..7d8bf8a8 100644 --- a/json-schemas/PaymentAddInterfaceInteractionAction.schema.json +++ b/json-schemas/PaymentAddInterfaceInteractionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentAddInterfaceInteractionAction", "type": "object", @@ -12,5 +12,5 @@ "action", "type" ], - "$id": "https://example.com/PaymentAddInterfaceInteractionAction.schema.json" + "$id": "https://api.commercetools.com/PaymentAddInterfaceInteractionAction.schema.json" } diff --git a/json-schemas/PaymentAddTransactionAction.schema.json b/json-schemas/PaymentAddTransactionAction.schema.json index 0bcce9b1..83b895c5 100644 --- a/json-schemas/PaymentAddTransactionAction.schema.json +++ b/json-schemas/PaymentAddTransactionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentAddTransactionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "transaction" ], - "$id": "https://example.com/PaymentAddTransactionAction.schema.json" + "$id": "https://api.commercetools.com/PaymentAddTransactionAction.schema.json" } diff --git a/json-schemas/PaymentChangeAmountPlannedAction.schema.json b/json-schemas/PaymentChangeAmountPlannedAction.schema.json index 8873b915..4c48e978 100644 --- a/json-schemas/PaymentChangeAmountPlannedAction.schema.json +++ b/json-schemas/PaymentChangeAmountPlannedAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentChangeAmountPlannedAction", "type": "object", @@ -11,5 +11,5 @@ "action", "amount" ], - "$id": "https://example.com/PaymentChangeAmountPlannedAction.schema.json" + "$id": "https://api.commercetools.com/PaymentChangeAmountPlannedAction.schema.json" } diff --git a/json-schemas/PaymentChangeTransactionInteractionIdAction.schema.json b/json-schemas/PaymentChangeTransactionInteractionIdAction.schema.json index 0b845135..270a32e7 100644 --- a/json-schemas/PaymentChangeTransactionInteractionIdAction.schema.json +++ b/json-schemas/PaymentChangeTransactionInteractionIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentChangeTransactionInteractionIdAction", "type": "object", @@ -13,5 +13,5 @@ "transactionId", "interactionId" ], - "$id": "https://example.com/PaymentChangeTransactionInteractionIdAction.schema.json" + "$id": "https://api.commercetools.com/PaymentChangeTransactionInteractionIdAction.schema.json" } diff --git a/json-schemas/PaymentChangeTransactionStateAction.schema.json b/json-schemas/PaymentChangeTransactionStateAction.schema.json index dc258d99..ace8dd0d 100644 --- a/json-schemas/PaymentChangeTransactionStateAction.schema.json +++ b/json-schemas/PaymentChangeTransactionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentChangeTransactionStateAction", "type": "object", @@ -13,5 +13,5 @@ "transactionId", "state" ], - "$id": "https://example.com/PaymentChangeTransactionStateAction.schema.json" + "$id": "https://api.commercetools.com/PaymentChangeTransactionStateAction.schema.json" } diff --git a/json-schemas/PaymentChangeTransactionTimestampAction.schema.json b/json-schemas/PaymentChangeTransactionTimestampAction.schema.json index e8fde919..c885cb15 100644 --- a/json-schemas/PaymentChangeTransactionTimestampAction.schema.json +++ b/json-schemas/PaymentChangeTransactionTimestampAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentChangeTransactionTimestampAction", "type": "object", @@ -16,5 +16,5 @@ "transactionId", "timestamp" ], - "$id": "https://example.com/PaymentChangeTransactionTimestampAction.schema.json" + "$id": "https://api.commercetools.com/PaymentChangeTransactionTimestampAction.schema.json" } diff --git a/json-schemas/PaymentCreatedMessage.schema.json b/json-schemas/PaymentCreatedMessage.schema.json index 68e96409..3d840441 100644 --- a/json-schemas/PaymentCreatedMessage.schema.json +++ b/json-schemas/PaymentCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "payment" ], - "$id": "https://example.com/PaymentCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentCreatedMessage.schema.json" } diff --git a/json-schemas/PaymentCreatedMessagePayload.schema.json b/json-schemas/PaymentCreatedMessagePayload.schema.json index 7f924372..4c1588df 100644 --- a/json-schemas/PaymentCreatedMessagePayload.schema.json +++ b/json-schemas/PaymentCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "payment" ], - "$id": "https://example.com/PaymentCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentCreatedMessagePayload.schema.json" } diff --git a/json-schemas/PaymentDraft.schema.json b/json-schemas/PaymentDraft.schema.json index be46f8ae..f246dc89 100644 --- a/json-schemas/PaymentDraft.schema.json +++ b/json-schemas/PaymentDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentDraft", "type": "object", @@ -27,5 +27,5 @@ "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, "required": ["amountPlanned"], - "$id": "https://example.com/PaymentDraft.schema.json" + "$id": "https://api.commercetools.com/PaymentDraft.schema.json" } diff --git a/json-schemas/PaymentInfo.schema.json b/json-schemas/PaymentInfo.schema.json index 3556206f..71542412 100644 --- a/json-schemas/PaymentInfo.schema.json +++ b/json-schemas/PaymentInfo.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentInfo", "type": "object", @@ -8,5 +8,5 @@ "items": {"$ref": "PaymentReference.schema.json"} }}, "required": ["payments"], - "$id": "https://example.com/PaymentInfo.schema.json" + "$id": "https://api.commercetools.com/PaymentInfo.schema.json" } diff --git a/json-schemas/PaymentInteractionAddedMessage.schema.json b/json-schemas/PaymentInteractionAddedMessage.schema.json index da8196bf..4646ec54 100644 --- a/json-schemas/PaymentInteractionAddedMessage.schema.json +++ b/json-schemas/PaymentInteractionAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentInteractionAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "interaction" ], - "$id": "https://example.com/PaymentInteractionAddedMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentInteractionAddedMessage.schema.json" } diff --git a/json-schemas/PaymentInteractionAddedMessagePayload.schema.json b/json-schemas/PaymentInteractionAddedMessagePayload.schema.json index 59a586da..68277c40 100644 --- a/json-schemas/PaymentInteractionAddedMessagePayload.schema.json +++ b/json-schemas/PaymentInteractionAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentInteractionAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "interaction" ], - "$id": "https://example.com/PaymentInteractionAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentInteractionAddedMessagePayload.schema.json" } diff --git a/json-schemas/PaymentMethodInfo.schema.json b/json-schemas/PaymentMethodInfo.schema.json index 47799aad..55cc3ed1 100644 --- a/json-schemas/PaymentMethodInfo.schema.json +++ b/json-schemas/PaymentMethodInfo.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "PaymentMethodInfo", "type": "object", "properties": { @@ -8,5 +8,5 @@ "name": {"$ref": "LocalizedString.schema.json"}, "paymentInterface": {"type": "string"} }, - "$id": "https://example.com/PaymentMethodInfo.schema.json" + "$id": "https://api.commercetools.com/PaymentMethodInfo.schema.json" } diff --git a/json-schemas/PaymentPagedQueryResponse.schema.json b/json-schemas/PaymentPagedQueryResponse.schema.json index 0b1cd918..723af63f 100644 --- a/json-schemas/PaymentPagedQueryResponse.schema.json +++ b/json-schemas/PaymentPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/PaymentPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/PaymentPagedQueryResponse.schema.json" } diff --git a/json-schemas/PaymentReference.schema.json b/json-schemas/PaymentReference.schema.json index 195068d4..5b10f5a4 100644 --- a/json-schemas/PaymentReference.schema.json +++ b/json-schemas/PaymentReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Payment](ctp:api:type:Payment).", "additionalProperties": false, "title": "PaymentReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/PaymentReference.schema.json" + "$id": "https://api.commercetools.com/PaymentReference.schema.json" } diff --git a/json-schemas/PaymentResourceIdentifier.schema.json b/json-schemas/PaymentResourceIdentifier.schema.json index 9a9526ee..570d1c30 100644 --- a/json-schemas/PaymentResourceIdentifier.schema.json +++ b/json-schemas/PaymentResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "PaymentResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/PaymentResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/PaymentResourceIdentifier.schema.json" } diff --git a/json-schemas/PaymentSetAmountPaidAction.schema.json b/json-schemas/PaymentSetAmountPaidAction.schema.json index d858577f..eaaa5426 100644 --- a/json-schemas/PaymentSetAmountPaidAction.schema.json +++ b/json-schemas/PaymentSetAmountPaidAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetAmountPaidAction", "type": "object", @@ -8,5 +8,5 @@ "amount": {"$ref": "Money.schema.json"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetAmountPaidAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetAmountPaidAction.schema.json" } diff --git a/json-schemas/PaymentSetAmountRefundedAction.schema.json b/json-schemas/PaymentSetAmountRefundedAction.schema.json index ba839e8f..264c286d 100644 --- a/json-schemas/PaymentSetAmountRefundedAction.schema.json +++ b/json-schemas/PaymentSetAmountRefundedAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetAmountRefundedAction", "type": "object", @@ -8,5 +8,5 @@ "amount": {"$ref": "Money.schema.json"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetAmountRefundedAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetAmountRefundedAction.schema.json" } diff --git a/json-schemas/PaymentSetAnonymousIdAction.schema.json b/json-schemas/PaymentSetAnonymousIdAction.schema.json index 21389e3c..761e43a7 100644 --- a/json-schemas/PaymentSetAnonymousIdAction.schema.json +++ b/json-schemas/PaymentSetAnonymousIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetAnonymousIdAction", "type": "object", @@ -8,5 +8,5 @@ "anonymousId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetAnonymousIdAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetAnonymousIdAction.schema.json" } diff --git a/json-schemas/PaymentSetAuthorizationAction.schema.json b/json-schemas/PaymentSetAuthorizationAction.schema.json index 94904121..6c5173f8 100644 --- a/json-schemas/PaymentSetAuthorizationAction.schema.json +++ b/json-schemas/PaymentSetAuthorizationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetAuthorizationAction", "type": "object", @@ -12,5 +12,5 @@ } }, "required": ["action"], - "$id": "https://example.com/PaymentSetAuthorizationAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetAuthorizationAction.schema.json" } diff --git a/json-schemas/PaymentSetCustomFieldAction.schema.json b/json-schemas/PaymentSetCustomFieldAction.schema.json index 771b54ff..8f5d58ee 100644 --- a/json-schemas/PaymentSetCustomFieldAction.schema.json +++ b/json-schemas/PaymentSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/PaymentSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetCustomFieldAction.schema.json" } diff --git a/json-schemas/PaymentSetCustomTypeAction.schema.json b/json-schemas/PaymentSetCustomTypeAction.schema.json index 8aa81869..6c9eb796 100644 --- a/json-schemas/PaymentSetCustomTypeAction.schema.json +++ b/json-schemas/PaymentSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/PaymentSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetCustomTypeAction.schema.json" } diff --git a/json-schemas/PaymentSetCustomerAction.schema.json b/json-schemas/PaymentSetCustomerAction.schema.json index 32d56d27..9707e30b 100644 --- a/json-schemas/PaymentSetCustomerAction.schema.json +++ b/json-schemas/PaymentSetCustomerAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetCustomerAction", "type": "object", @@ -8,5 +8,5 @@ "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetCustomerAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetCustomerAction.schema.json" } diff --git a/json-schemas/PaymentSetExternalIdAction.schema.json b/json-schemas/PaymentSetExternalIdAction.schema.json index 09fed639..7265e93a 100644 --- a/json-schemas/PaymentSetExternalIdAction.schema.json +++ b/json-schemas/PaymentSetExternalIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetExternalIdAction", "type": "object", @@ -8,5 +8,5 @@ "externalId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetExternalIdAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetExternalIdAction.schema.json" } diff --git a/json-schemas/PaymentSetInterfaceIdAction.schema.json b/json-schemas/PaymentSetInterfaceIdAction.schema.json index c3f564cb..72bdecd2 100644 --- a/json-schemas/PaymentSetInterfaceIdAction.schema.json +++ b/json-schemas/PaymentSetInterfaceIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetInterfaceIdAction", "type": "object", @@ -11,5 +11,5 @@ "action", "interfaceId" ], - "$id": "https://example.com/PaymentSetInterfaceIdAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetInterfaceIdAction.schema.json" } diff --git a/json-schemas/PaymentSetKeyAction.schema.json b/json-schemas/PaymentSetKeyAction.schema.json index 7f759621..eb4f4aba 100644 --- a/json-schemas/PaymentSetKeyAction.schema.json +++ b/json-schemas/PaymentSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/PaymentSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetKeyAction.schema.json" } diff --git a/json-schemas/PaymentSetMethodInfoInterfaceAction.schema.json b/json-schemas/PaymentSetMethodInfoInterfaceAction.schema.json index dc502389..ba3975ba 100644 --- a/json-schemas/PaymentSetMethodInfoInterfaceAction.schema.json +++ b/json-schemas/PaymentSetMethodInfoInterfaceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetMethodInfoInterfaceAction", "type": "object", @@ -11,5 +11,5 @@ "action", "interface" ], - "$id": "https://example.com/PaymentSetMethodInfoInterfaceAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetMethodInfoInterfaceAction.schema.json" } diff --git a/json-schemas/PaymentSetMethodInfoMethodAction.schema.json b/json-schemas/PaymentSetMethodInfoMethodAction.schema.json index c5e70a4d..6e0c4507 100644 --- a/json-schemas/PaymentSetMethodInfoMethodAction.schema.json +++ b/json-schemas/PaymentSetMethodInfoMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetMethodInfoMethodAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setMethodInfoMethod"]} }, "required": ["action"], - "$id": "https://example.com/PaymentSetMethodInfoMethodAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetMethodInfoMethodAction.schema.json" } diff --git a/json-schemas/PaymentSetMethodInfoNameAction.schema.json b/json-schemas/PaymentSetMethodInfoNameAction.schema.json index 2fcc5a25..7e67a429 100644 --- a/json-schemas/PaymentSetMethodInfoNameAction.schema.json +++ b/json-schemas/PaymentSetMethodInfoNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetMethodInfoNameAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setMethodInfoName"]} }, "required": ["action"], - "$id": "https://example.com/PaymentSetMethodInfoNameAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetMethodInfoNameAction.schema.json" } diff --git a/json-schemas/PaymentSetStatusInterfaceCodeAction.schema.json b/json-schemas/PaymentSetStatusInterfaceCodeAction.schema.json index f555bb8e..cffaadfb 100644 --- a/json-schemas/PaymentSetStatusInterfaceCodeAction.schema.json +++ b/json-schemas/PaymentSetStatusInterfaceCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetStatusInterfaceCodeAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setStatusInterfaceCode"]} }, "required": ["action"], - "$id": "https://example.com/PaymentSetStatusInterfaceCodeAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetStatusInterfaceCodeAction.schema.json" } diff --git a/json-schemas/PaymentSetStatusInterfaceTextAction.schema.json b/json-schemas/PaymentSetStatusInterfaceTextAction.schema.json index d45df13b..12fa7e6f 100644 --- a/json-schemas/PaymentSetStatusInterfaceTextAction.schema.json +++ b/json-schemas/PaymentSetStatusInterfaceTextAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentSetStatusInterfaceTextAction", "type": "object", @@ -11,5 +11,5 @@ "action", "interfaceText" ], - "$id": "https://example.com/PaymentSetStatusInterfaceTextAction.schema.json" + "$id": "https://api.commercetools.com/PaymentSetStatusInterfaceTextAction.schema.json" } diff --git a/json-schemas/PaymentSetTransactionCustomFieldAction.schema.json b/json-schemas/PaymentSetTransactionCustomFieldAction.schema.json new file mode 100644 index 00000000..1e3b57c1 --- /dev/null +++ b/json-schemas/PaymentSetTransactionCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "PaymentSetTransactionCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setTransactionCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}, + "transactionId": {"type": "string"} + }, + "required": [ + "action", + "transactionId", + "name" + ], + "$id": "https://api.commercetools.com/PaymentSetTransactionCustomFieldAction.schema.json" +} diff --git a/json-schemas/PaymentSetTransactionCustomTypeAction.schema.json b/json-schemas/PaymentSetTransactionCustomTypeAction.schema.json new file mode 100644 index 00000000..e55b4cc1 --- /dev/null +++ b/json-schemas/PaymentSetTransactionCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "PaymentSetTransactionCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setTransactionCustomType"]}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "transactionId": {"type": "string"} + }, + "required": [ + "action", + "transactionId" + ], + "$id": "https://api.commercetools.com/PaymentSetTransactionCustomTypeAction.schema.json" +} diff --git a/json-schemas/PaymentStateEnum.schema.json b/json-schemas/PaymentStateEnum.schema.json index 9d7a7bfb..ee50a977 100644 --- a/json-schemas/PaymentStateEnum.schema.json +++ b/json-schemas/PaymentStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "PaymentState", "type": "string", "enum": [ @@ -9,5 +9,5 @@ "CreditOwed", "Paid" ], - "$id": "https://example.com/PaymentStateEnum.schema.json" + "$id": "https://api.commercetools.com/PaymentStateEnum.schema.json" } diff --git a/json-schemas/PaymentStatus.schema.json b/json-schemas/PaymentStatus.schema.json index c8e84688..13cae6a8 100644 --- a/json-schemas/PaymentStatus.schema.json +++ b/json-schemas/PaymentStatus.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "PaymentStatus", "type": "object", "properties": { @@ -8,5 +8,5 @@ "interfaceText": {"type": "string"}, "state": {"$ref": "StateReference.schema.json"} }, - "$id": "https://example.com/PaymentStatus.schema.json" + "$id": "https://api.commercetools.com/PaymentStatus.schema.json" } diff --git a/json-schemas/PaymentStatusDraft.schema.json b/json-schemas/PaymentStatusDraft.schema.json index c79c2a0e..d36832aa 100644 --- a/json-schemas/PaymentStatusDraft.schema.json +++ b/json-schemas/PaymentStatusDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "PaymentStatusDraft", "type": "object", "properties": { @@ -8,5 +8,5 @@ "interfaceText": {"type": "string"}, "state": {"$ref": "StateResourceIdentifier.schema.json"} }, - "$id": "https://example.com/PaymentStatusDraft.schema.json" + "$id": "https://api.commercetools.com/PaymentStatusDraft.schema.json" } diff --git a/json-schemas/PaymentStatusInterfaceCodeSetMessage.schema.json b/json-schemas/PaymentStatusInterfaceCodeSetMessage.schema.json index df34d56a..a6ceaff8 100644 --- a/json-schemas/PaymentStatusInterfaceCodeSetMessage.schema.json +++ b/json-schemas/PaymentStatusInterfaceCodeSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentStatusInterfaceCodeSetMessage", "type": "object", @@ -36,5 +36,5 @@ "paymentId", "interfaceCode" ], - "$id": "https://example.com/PaymentStatusInterfaceCodeSetMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentStatusInterfaceCodeSetMessage.schema.json" } diff --git a/json-schemas/PaymentStatusInterfaceCodeSetMessagePayload.schema.json b/json-schemas/PaymentStatusInterfaceCodeSetMessagePayload.schema.json index b7ee9efc..f7f3080a 100644 --- a/json-schemas/PaymentStatusInterfaceCodeSetMessagePayload.schema.json +++ b/json-schemas/PaymentStatusInterfaceCodeSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentStatusInterfaceCodeSetMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "paymentId", "interfaceCode" ], - "$id": "https://example.com/PaymentStatusInterfaceCodeSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentStatusInterfaceCodeSetMessagePayload.schema.json" } diff --git a/json-schemas/PaymentStatusStateTransitionMessage.schema.json b/json-schemas/PaymentStatusStateTransitionMessage.schema.json index a988a0e3..a6036f3a 100644 --- a/json-schemas/PaymentStatusStateTransitionMessage.schema.json +++ b/json-schemas/PaymentStatusStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentStatusStateTransitionMessage", "type": "object", @@ -36,5 +36,5 @@ "state", "force" ], - "$id": "https://example.com/PaymentStatusStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentStatusStateTransitionMessage.schema.json" } diff --git a/json-schemas/PaymentStatusStateTransitionMessagePayload.schema.json b/json-schemas/PaymentStatusStateTransitionMessagePayload.schema.json index de761e06..ee74f500 100644 --- a/json-schemas/PaymentStatusStateTransitionMessagePayload.schema.json +++ b/json-schemas/PaymentStatusStateTransitionMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentStatusStateTransitionMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "state", "force" ], - "$id": "https://example.com/PaymentStatusStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentStatusStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/PaymentTransactionAddedMessage.schema.json b/json-schemas/PaymentTransactionAddedMessage.schema.json index ed97bd5e..7cc5f6e5 100644 --- a/json-schemas/PaymentTransactionAddedMessage.schema.json +++ b/json-schemas/PaymentTransactionAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentTransactionAddedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "transaction" ], - "$id": "https://example.com/PaymentTransactionAddedMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentTransactionAddedMessage.schema.json" } diff --git a/json-schemas/PaymentTransactionAddedMessagePayload.schema.json b/json-schemas/PaymentTransactionAddedMessagePayload.schema.json index a0fe72b3..7417b3a5 100644 --- a/json-schemas/PaymentTransactionAddedMessagePayload.schema.json +++ b/json-schemas/PaymentTransactionAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentTransactionAddedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "transaction" ], - "$id": "https://example.com/PaymentTransactionAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentTransactionAddedMessagePayload.schema.json" } diff --git a/json-schemas/PaymentTransactionStateChangedMessage.schema.json b/json-schemas/PaymentTransactionStateChangedMessage.schema.json index 3e5f1491..16412950 100644 --- a/json-schemas/PaymentTransactionStateChangedMessage.schema.json +++ b/json-schemas/PaymentTransactionStateChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentTransactionStateChangedMessage", "type": "object", @@ -36,5 +36,5 @@ "transactionId", "state" ], - "$id": "https://example.com/PaymentTransactionStateChangedMessage.schema.json" + "$id": "https://api.commercetools.com/PaymentTransactionStateChangedMessage.schema.json" } diff --git a/json-schemas/PaymentTransactionStateChangedMessagePayload.schema.json b/json-schemas/PaymentTransactionStateChangedMessagePayload.schema.json index 79327a6f..eae67ae7 100644 --- a/json-schemas/PaymentTransactionStateChangedMessagePayload.schema.json +++ b/json-schemas/PaymentTransactionStateChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentTransactionStateChangedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "transactionId", "state" ], - "$id": "https://example.com/PaymentTransactionStateChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/PaymentTransactionStateChangedMessagePayload.schema.json" } diff --git a/json-schemas/PaymentTransitionStateAction.schema.json b/json-schemas/PaymentTransitionStateAction.schema.json index 43561973..84c4b21a 100644 --- a/json-schemas/PaymentTransitionStateAction.schema.json +++ b/json-schemas/PaymentTransitionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentTransitionStateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "state" ], - "$id": "https://example.com/PaymentTransitionStateAction.schema.json" + "$id": "https://api.commercetools.com/PaymentTransitionStateAction.schema.json" } diff --git a/json-schemas/PaymentUpdate.schema.json b/json-schemas/PaymentUpdate.schema.json index 68f056ff..1eb06ead 100644 --- a/json-schemas/PaymentUpdate.schema.json +++ b/json-schemas/PaymentUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/PaymentUpdate.schema.json" + "$id": "https://api.commercetools.com/PaymentUpdate.schema.json" } diff --git a/json-schemas/PaymentUpdateAction.schema.json b/json-schemas/PaymentUpdateAction.schema.json index 386cddbf..b4cc5d58 100644 --- a/json-schemas/PaymentUpdateAction.schema.json +++ b/json-schemas/PaymentUpdateAction.schema.json @@ -1,34 +1,61 @@ { "oneOf": [ - {"$ref": "https://example.com/PaymentAddInterfaceInteractionAction.schema.json"}, - {"$ref": "https://example.com/PaymentAddTransactionAction.schema.json"}, - {"$ref": "https://example.com/PaymentChangeAmountPlannedAction.schema.json"}, - {"$ref": "https://example.com/PaymentChangeTransactionInteractionIdAction.schema.json"}, - {"$ref": "https://example.com/PaymentChangeTransactionStateAction.schema.json"}, - {"$ref": "https://example.com/PaymentChangeTransactionTimestampAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetAmountPaidAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetAmountRefundedAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetAnonymousIdAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetAuthorizationAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetCustomerAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetExternalIdAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetInterfaceIdAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetKeyAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetMethodInfoInterfaceAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetMethodInfoMethodAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetMethodInfoNameAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetStatusInterfaceCodeAction.schema.json"}, - {"$ref": "https://example.com/PaymentSetStatusInterfaceTextAction.schema.json"}, - {"$ref": "https://example.com/PaymentTransitionStateAction.schema.json"} + {"$ref": "https://api.commercetools.com/PaymentAddInterfaceInteractionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentAddTransactionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentChangeAmountPlannedAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentChangeTransactionInteractionIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentChangeTransactionStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentChangeTransactionTimestampAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetAmountPaidAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetAmountRefundedAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetAnonymousIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetAuthorizationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetCustomerAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetExternalIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetInterfaceIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetMethodInfoInterfaceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetMethodInfoMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetMethodInfoNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetStatusInterfaceCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetStatusInterfaceTextAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetTransactionCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentSetTransactionCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentTransitionStateAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PaymentUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addInterfaceInteraction", + "addTransaction", + "changeAmountPlanned", + "changeTransactionInteractionId", + "changeTransactionState", + "changeTransactionTimestamp", + "setAmountPaid", + "setAmountRefunded", + "setAnonymousId", + "setAuthorization", + "setCustomField", + "setCustomType", + "setCustomer", + "setExternalId", + "setInterfaceId", + "setKey", + "setMethodInfoInterface", + "setMethodInfoMethod", + "setMethodInfoName", + "setStatusInterfaceCode", + "setStatusInterfaceText", + "setTransactionCustomField", + "setTransactionCustomType", + "transitionState" + ]}}, "required": ["action"], - "$id": "https://example.com/PaymentUpdateAction.schema.json", + "$id": "https://api.commercetools.com/PaymentUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/PendingOperationError.schema.json b/json-schemas/PendingOperationError.schema.json index d6b8aa8e..f9b3ad19 100644 --- a/json-schemas/PendingOperationError.schema.json +++ b/json-schemas/PendingOperationError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PendingOperationError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/PendingOperationError.schema.json" + "$id": "https://api.commercetools.com/PendingOperationError.schema.json" } diff --git a/json-schemas/PlatformFormat.schema.json b/json-schemas/PlatformFormat.schema.json new file mode 100644 index 00000000..4f00b451 --- /dev/null +++ b/json-schemas/PlatformFormat.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "PlatformFormat", + "type": "object", + "properties": {"type": {"enum": ["Platform"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/PlatformFormat.schema.json" +} diff --git a/json-schemas/Price.schema.json b/json-schemas/Price.schema.json index 0adccb85..3f794621 100644 --- a/json-schemas/Price.schema.json +++ b/json-schemas/Price.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Price", "type": "object", @@ -28,5 +28,5 @@ "id", "value" ], - "$id": "https://example.com/Price.schema.json" + "$id": "https://api.commercetools.com/Price.schema.json" } diff --git a/json-schemas/PriceChangedError.schema.json b/json-schemas/PriceChangedError.schema.json index 1014aa1d..1e7631bd 100644 --- a/json-schemas/PriceChangedError.schema.json +++ b/json-schemas/PriceChangedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PriceChangedError", "type": "object", @@ -18,5 +26,5 @@ "lineItems", "shipping" ], - "$id": "https://example.com/PriceChangedError.schema.json" + "$id": "https://api.commercetools.com/PriceChangedError.schema.json" } diff --git a/json-schemas/PriceDraft.schema.json b/json-schemas/PriceDraft.schema.json index e78e3daa..3853a7aa 100644 --- a/json-schemas/PriceDraft.schema.json +++ b/json-schemas/PriceDraft.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "PriceDraft", "type": "object", "properties": { - "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "discounted": {"$ref": "DiscountedPriceDraft.schema.json"}, "country": {"type": "string"}, "tiers": { "type": "array", @@ -24,5 +24,5 @@ "value": {"$ref": "Money.schema.json"} }, "required": ["value"], - "$id": "https://example.com/PriceDraft.schema.json" + "$id": "https://api.commercetools.com/PriceDraft.schema.json" } diff --git a/json-schemas/PriceFunction.schema.json b/json-schemas/PriceFunction.schema.json index dba39e9e..377c367c 100644 --- a/json-schemas/PriceFunction.schema.json +++ b/json-schemas/PriceFunction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "", "additionalProperties": false, "title": "PriceFunction", "type": "object", @@ -11,5 +12,5 @@ "currencyCode", "function" ], - "$id": "https://example.com/PriceFunction.schema.json" + "$id": "https://api.commercetools.com/PriceFunction.schema.json" } diff --git a/json-schemas/PriceTier.schema.json b/json-schemas/PriceTier.schema.json index 17a8c32e..9af98996 100644 --- a/json-schemas/PriceTier.schema.json +++ b/json-schemas/PriceTier.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "A Price tier is selected instead of the default Price when a certain quantity of the [ProductVariant](ctp:api:type:ProductVariant) is [added to a Cart](/projects/carts#add-lineitem) and ordered.\n_For example: the Price can be lower if more than 10 items are ordered._\nIf no Price tier is found for the Order quantity, the base Price is used.\nA Price tier is applied for the entire quantity of a Product Variant put as [LineItem](/projects/carts#lineitem) in a Cart as soon as the minimum quantity for the Price tier is reached.\nThe Price tier is applied per Line Item of the Product Variant. If, for example, the same Product Variant appears in the same Cart as several Line Items, (what can be achieved by different values of a Custom Field on the Line Items) for each Line Item the minimum quantity must be reached to get the Price tier.", "additionalProperties": false, "title": "PriceTier", "type": "object", @@ -11,5 +12,5 @@ "minimumQuantity", "value" ], - "$id": "https://example.com/PriceTier.schema.json" + "$id": "https://api.commercetools.com/PriceTier.schema.json" } diff --git a/json-schemas/PriceTierDraft.schema.json b/json-schemas/PriceTierDraft.schema.json index 5dfbc4bb..2f3849b0 100644 --- a/json-schemas/PriceTierDraft.schema.json +++ b/json-schemas/PriceTierDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Specifies a Price tier that applies when the minimum quantity for the [LineItem](ctp:api:type:LineItem) of a ProductVariant with the related Price is reached in a Cart.", "additionalProperties": false, "title": "PriceTierDraft", "type": "object", @@ -11,5 +12,5 @@ "minimumQuantity", "value" ], - "$id": "https://example.com/PriceTierDraft.schema.json" + "$id": "https://api.commercetools.com/PriceTierDraft.schema.json" } diff --git a/json-schemas/Product.schema.json b/json-schemas/Product.schema.json index 2532c866..a60cd20a 100644 --- a/json-schemas/Product.schema.json +++ b/json-schemas/Product.schema.json @@ -1,27 +1,28 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Product", "type": "object", "properties": { - "createdAt": { + "masterData": {"$ref": "ProductCatalogData.schema.json"}, + "lastModifiedAt": { "type": "string", "format": "date-time" }, - "masterData": {"$ref": "ProductCatalogData.schema.json"}, - "lastModifiedAt": { + "priceMode": {"$ref": "ProductPriceModeEnumEnum.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "version": {"type": "number"}, + "taxCategory": {"$ref": "TaxCategoryReference.schema.json"}, + "createdAt": { "type": "string", "format": "date-time" }, "createdBy": {"$ref": "CreatedBy.schema.json"}, - "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, "id": {"type": "string"}, "state": {"$ref": "StateReference.schema.json"}, - "version": {"type": "number"}, "key": {"type": "string"}, "productType": {"$ref": "ProductTypeReference.schema.json"}, - "reviewRatingStatistics": {"$ref": "ReviewRatingStatistics.schema.json"}, - "taxCategory": {"$ref": "TaxCategoryReference.schema.json"} + "reviewRatingStatistics": {"$ref": "ReviewRatingStatistics.schema.json"} }, "required": [ "id", @@ -31,5 +32,5 @@ "productType", "masterData" ], - "$id": "https://example.com/Product.schema.json" + "$id": "https://api.commercetools.com/Product.schema.json" } diff --git a/json-schemas/ProductAddAssetAction.schema.json b/json-schemas/ProductAddAssetAction.schema.json index 68c3f199..3f43925a 100644 --- a/json-schemas/ProductAddAssetAction.schema.json +++ b/json-schemas/ProductAddAssetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddAssetAction", "type": "object", @@ -15,5 +15,5 @@ "action", "asset" ], - "$id": "https://example.com/ProductAddAssetAction.schema.json" + "$id": "https://api.commercetools.com/ProductAddAssetAction.schema.json" } diff --git a/json-schemas/ProductAddExternalImageAction.schema.json b/json-schemas/ProductAddExternalImageAction.schema.json index ee594c88..994e34d9 100644 --- a/json-schemas/ProductAddExternalImageAction.schema.json +++ b/json-schemas/ProductAddExternalImageAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddExternalImageAction", "type": "object", @@ -14,5 +14,5 @@ "action", "image" ], - "$id": "https://example.com/ProductAddExternalImageAction.schema.json" + "$id": "https://api.commercetools.com/ProductAddExternalImageAction.schema.json" } diff --git a/json-schemas/ProductAddPriceAction.schema.json b/json-schemas/ProductAddPriceAction.schema.json index 56925932..97f47c98 100644 --- a/json-schemas/ProductAddPriceAction.schema.json +++ b/json-schemas/ProductAddPriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddPriceAction", "type": "object", @@ -14,5 +14,5 @@ "action", "price" ], - "$id": "https://example.com/ProductAddPriceAction.schema.json" + "$id": "https://api.commercetools.com/ProductAddPriceAction.schema.json" } diff --git a/json-schemas/ProductAddToCategoryAction.schema.json b/json-schemas/ProductAddToCategoryAction.schema.json index c241aecc..feb4e403 100644 --- a/json-schemas/ProductAddToCategoryAction.schema.json +++ b/json-schemas/ProductAddToCategoryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddToCategoryAction", "type": "object", @@ -13,5 +13,5 @@ "action", "category" ], - "$id": "https://example.com/ProductAddToCategoryAction.schema.json" + "$id": "https://api.commercetools.com/ProductAddToCategoryAction.schema.json" } diff --git a/json-schemas/ProductAddVariantAction.schema.json b/json-schemas/ProductAddVariantAction.schema.json index b268f37b..1d18652b 100644 --- a/json-schemas/ProductAddVariantAction.schema.json +++ b/json-schemas/ProductAddVariantAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddVariantAction", "type": "object", @@ -26,5 +26,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductAddVariantAction.schema.json" + "$id": "https://api.commercetools.com/ProductAddVariantAction.schema.json" } diff --git a/json-schemas/ProductAddedToCategoryMessage.schema.json b/json-schemas/ProductAddedToCategoryMessage.schema.json index bb9b7fa6..112d06f6 100644 --- a/json-schemas/ProductAddedToCategoryMessage.schema.json +++ b/json-schemas/ProductAddedToCategoryMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddedToCategoryMessage", "type": "object", @@ -36,5 +36,5 @@ "category", "staged" ], - "$id": "https://example.com/ProductAddedToCategoryMessage.schema.json" + "$id": "https://api.commercetools.com/ProductAddedToCategoryMessage.schema.json" } diff --git a/json-schemas/ProductAddedToCategoryMessagePayload.schema.json b/json-schemas/ProductAddedToCategoryMessagePayload.schema.json index 7e3bcffd..146ff3e7 100644 --- a/json-schemas/ProductAddedToCategoryMessagePayload.schema.json +++ b/json-schemas/ProductAddedToCategoryMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductAddedToCategoryMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "category", "staged" ], - "$id": "https://example.com/ProductAddedToCategoryMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductAddedToCategoryMessagePayload.schema.json" } diff --git a/json-schemas/ProductCatalogData.schema.json b/json-schemas/ProductCatalogData.schema.json index 6c152cc5..6320e860 100644 --- a/json-schemas/ProductCatalogData.schema.json +++ b/json-schemas/ProductCatalogData.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductCatalogData", "type": "object", @@ -15,5 +15,5 @@ "staged", "hasStagedChanges" ], - "$id": "https://example.com/ProductCatalogData.schema.json" + "$id": "https://api.commercetools.com/ProductCatalogData.schema.json" } diff --git a/json-schemas/ProductChangeAssetNameAction.schema.json b/json-schemas/ProductChangeAssetNameAction.schema.json index b8e3be58..aac1ebf7 100644 --- a/json-schemas/ProductChangeAssetNameAction.schema.json +++ b/json-schemas/ProductChangeAssetNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangeAssetNameAction", "type": "object", @@ -16,5 +16,5 @@ "action", "name" ], - "$id": "https://example.com/ProductChangeAssetNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangeAssetNameAction.schema.json" } diff --git a/json-schemas/ProductChangeAssetOrderAction.schema.json b/json-schemas/ProductChangeAssetOrderAction.schema.json index f5a2b339..b934bec6 100644 --- a/json-schemas/ProductChangeAssetOrderAction.schema.json +++ b/json-schemas/ProductChangeAssetOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangeAssetOrderAction", "type": "object", @@ -17,5 +17,5 @@ "action", "assetOrder" ], - "$id": "https://example.com/ProductChangeAssetOrderAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangeAssetOrderAction.schema.json" } diff --git a/json-schemas/ProductChangeMasterVariantAction.schema.json b/json-schemas/ProductChangeMasterVariantAction.schema.json index e81f77a0..bbe2caca 100644 --- a/json-schemas/ProductChangeMasterVariantAction.schema.json +++ b/json-schemas/ProductChangeMasterVariantAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangeMasterVariantAction", "type": "object", @@ -10,5 +10,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductChangeMasterVariantAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangeMasterVariantAction.schema.json" } diff --git a/json-schemas/ProductChangeNameAction.schema.json b/json-schemas/ProductChangeNameAction.schema.json index 4b63c825..c17d26c5 100644 --- a/json-schemas/ProductChangeNameAction.schema.json +++ b/json-schemas/ProductChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangeNameAction", "type": "object", @@ -12,5 +12,5 @@ "action", "name" ], - "$id": "https://example.com/ProductChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangeNameAction.schema.json" } diff --git a/json-schemas/ProductChangePriceAction.schema.json b/json-schemas/ProductChangePriceAction.schema.json index 6f5f7c1b..2858ccce 100644 --- a/json-schemas/ProductChangePriceAction.schema.json +++ b/json-schemas/ProductChangePriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangePriceAction", "type": "object", @@ -14,5 +14,5 @@ "priceId", "price" ], - "$id": "https://example.com/ProductChangePriceAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangePriceAction.schema.json" } diff --git a/json-schemas/ProductChangeSlugAction.schema.json b/json-schemas/ProductChangeSlugAction.schema.json index e728aa7d..0921d9bf 100644 --- a/json-schemas/ProductChangeSlugAction.schema.json +++ b/json-schemas/ProductChangeSlugAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductChangeSlugAction", "type": "object", @@ -12,5 +12,5 @@ "action", "slug" ], - "$id": "https://example.com/ProductChangeSlugAction.schema.json" + "$id": "https://api.commercetools.com/ProductChangeSlugAction.schema.json" } diff --git a/json-schemas/ProductCreatedMessage.schema.json b/json-schemas/ProductCreatedMessage.schema.json index 922796ce..475f24b6 100644 --- a/json-schemas/ProductCreatedMessage.schema.json +++ b/json-schemas/ProductCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "productProjection" ], - "$id": "https://example.com/ProductCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductCreatedMessage.schema.json" } diff --git a/json-schemas/ProductCreatedMessagePayload.schema.json b/json-schemas/ProductCreatedMessagePayload.schema.json index eb0dc155..47dc086e 100644 --- a/json-schemas/ProductCreatedMessagePayload.schema.json +++ b/json-schemas/ProductCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "productProjection" ], - "$id": "https://example.com/ProductCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductCreatedMessagePayload.schema.json" } diff --git a/json-schemas/ProductData.schema.json b/json-schemas/ProductData.schema.json index 3b23a6d0..9d65e936 100644 --- a/json-schemas/ProductData.schema.json +++ b/json-schemas/ProductData.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductData", "type": "object", @@ -30,5 +30,5 @@ "variants", "searchKeywords" ], - "$id": "https://example.com/ProductData.schema.json" + "$id": "https://api.commercetools.com/ProductData.schema.json" } diff --git a/json-schemas/ProductDeletedMessage.schema.json b/json-schemas/ProductDeletedMessage.schema.json index 4337c7e7..b0050ae1 100644 --- a/json-schemas/ProductDeletedMessage.schema.json +++ b/json-schemas/ProductDeletedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDeletedMessage", "type": "object", @@ -39,5 +39,5 @@ "removedImageUrls", "currentProjection" ], - "$id": "https://example.com/ProductDeletedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductDeletedMessage.schema.json" } diff --git a/json-schemas/ProductDeletedMessagePayload.schema.json b/json-schemas/ProductDeletedMessagePayload.schema.json index 27d0ca15..7848c042 100644 --- a/json-schemas/ProductDeletedMessagePayload.schema.json +++ b/json-schemas/ProductDeletedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDeletedMessagePayload", "type": "object", @@ -16,5 +16,5 @@ "removedImageUrls", "currentProjection" ], - "$id": "https://example.com/ProductDeletedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductDeletedMessagePayload.schema.json" } diff --git a/json-schemas/ProductDiscount.schema.json b/json-schemas/ProductDiscount.schema.json index 28265db7..ecbd4a85 100644 --- a/json-schemas/ProductDiscount.schema.json +++ b/json-schemas/ProductDiscount.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscount", "type": "object", @@ -48,5 +48,5 @@ "isActive", "references" ], - "$id": "https://example.com/ProductDiscount.schema.json" + "$id": "https://api.commercetools.com/ProductDiscount.schema.json" } diff --git a/json-schemas/ProductDiscountChangeIsActiveAction.schema.json b/json-schemas/ProductDiscountChangeIsActiveAction.schema.json index b89688e4..cb4c5fc2 100644 --- a/json-schemas/ProductDiscountChangeIsActiveAction.schema.json +++ b/json-schemas/ProductDiscountChangeIsActiveAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountChangeIsActiveAction", "type": "object", @@ -11,5 +11,5 @@ "action", "isActive" ], - "$id": "https://example.com/ProductDiscountChangeIsActiveAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountChangeIsActiveAction.schema.json" } diff --git a/json-schemas/ProductDiscountChangeNameAction.schema.json b/json-schemas/ProductDiscountChangeNameAction.schema.json index 1176f6bc..01e2e016 100644 --- a/json-schemas/ProductDiscountChangeNameAction.schema.json +++ b/json-schemas/ProductDiscountChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ProductDiscountChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountChangeNameAction.schema.json" } diff --git a/json-schemas/ProductDiscountChangePredicateAction.schema.json b/json-schemas/ProductDiscountChangePredicateAction.schema.json index a84ec573..2c84ec15 100644 --- a/json-schemas/ProductDiscountChangePredicateAction.schema.json +++ b/json-schemas/ProductDiscountChangePredicateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountChangePredicateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "predicate" ], - "$id": "https://example.com/ProductDiscountChangePredicateAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountChangePredicateAction.schema.json" } diff --git a/json-schemas/ProductDiscountChangeSortOrderAction.schema.json b/json-schemas/ProductDiscountChangeSortOrderAction.schema.json index 39cb7dd6..ceba04b8 100644 --- a/json-schemas/ProductDiscountChangeSortOrderAction.schema.json +++ b/json-schemas/ProductDiscountChangeSortOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountChangeSortOrderAction", "type": "object", @@ -11,5 +11,5 @@ "action", "sortOrder" ], - "$id": "https://example.com/ProductDiscountChangeSortOrderAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountChangeSortOrderAction.schema.json" } diff --git a/json-schemas/ProductDiscountChangeValueAction.schema.json b/json-schemas/ProductDiscountChangeValueAction.schema.json index 83b3ebf6..fd11832d 100644 --- a/json-schemas/ProductDiscountChangeValueAction.schema.json +++ b/json-schemas/ProductDiscountChangeValueAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountChangeValueAction", "type": "object", @@ -11,5 +11,5 @@ "action", "value" ], - "$id": "https://example.com/ProductDiscountChangeValueAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountChangeValueAction.schema.json" } diff --git a/json-schemas/ProductDiscountDraft.schema.json b/json-schemas/ProductDiscountDraft.schema.json index 3fabdc8b..bc7168c3 100644 --- a/json-schemas/ProductDiscountDraft.schema.json +++ b/json-schemas/ProductDiscountDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountDraft", "type": "object", @@ -27,5 +27,5 @@ "sortOrder", "isActive" ], - "$id": "https://example.com/ProductDiscountDraft.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountDraft.schema.json" } diff --git a/json-schemas/ProductDiscountMatchQuery.schema.json b/json-schemas/ProductDiscountMatchQuery.schema.json index c07b33bb..d90b45f0 100644 --- a/json-schemas/ProductDiscountMatchQuery.schema.json +++ b/json-schemas/ProductDiscountMatchQuery.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountMatchQuery", "type": "object", @@ -15,5 +15,5 @@ "staged", "price" ], - "$id": "https://example.com/ProductDiscountMatchQuery.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountMatchQuery.schema.json" } diff --git a/json-schemas/ProductDiscountPagedQueryResponse.schema.json b/json-schemas/ProductDiscountPagedQueryResponse.schema.json index aa0f1898..1de451e8 100644 --- a/json-schemas/ProductDiscountPagedQueryResponse.schema.json +++ b/json-schemas/ProductDiscountPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [ProductDiscount](ctp:api:type:ProductDiscount).", "additionalProperties": false, "title": "ProductDiscountPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ProductDiscountPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountPagedQueryResponse.schema.json" } diff --git a/json-schemas/ProductDiscountReference.schema.json b/json-schemas/ProductDiscountReference.schema.json index 52eb2edb..fd07f0d6 100644 --- a/json-schemas/ProductDiscountReference.schema.json +++ b/json-schemas/ProductDiscountReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [ProductDiscount](ctp:api:type:ProductDiscount).", "additionalProperties": false, "title": "ProductDiscountReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ProductDiscountReference.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountReference.schema.json" } diff --git a/json-schemas/ProductDiscountResourceIdentifier.schema.json b/json-schemas/ProductDiscountResourceIdentifier.schema.json index 781ce5ec..6bd88f63 100644 --- a/json-schemas/ProductDiscountResourceIdentifier.schema.json +++ b/json-schemas/ProductDiscountResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductDiscount](ctp:api:type:ProductDiscount).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ProductDiscountResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ProductDiscountResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ProductDiscountResourceIdentifier.schema.json" } diff --git a/json-schemas/ProductDiscountSetDescriptionAction.schema.json b/json-schemas/ProductDiscountSetDescriptionAction.schema.json index d9419c9d..02cabe94 100644 --- a/json-schemas/ProductDiscountSetDescriptionAction.schema.json +++ b/json-schemas/ProductDiscountSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ProductDiscountSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountSetDescriptionAction.schema.json" } diff --git a/json-schemas/ProductDiscountSetKeyAction.schema.json b/json-schemas/ProductDiscountSetKeyAction.schema.json index 124808c9..819b0e9c 100644 --- a/json-schemas/ProductDiscountSetKeyAction.schema.json +++ b/json-schemas/ProductDiscountSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductDiscountSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountSetKeyAction.schema.json" } diff --git a/json-schemas/ProductDiscountSetValidFromAction.schema.json b/json-schemas/ProductDiscountSetValidFromAction.schema.json index ccd34e18..fd723436 100644 --- a/json-schemas/ProductDiscountSetValidFromAction.schema.json +++ b/json-schemas/ProductDiscountSetValidFromAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountSetValidFromAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/ProductDiscountSetValidFromAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountSetValidFromAction.schema.json" } diff --git a/json-schemas/ProductDiscountSetValidFromAndUntilAction.schema.json b/json-schemas/ProductDiscountSetValidFromAndUntilAction.schema.json index 30c010e9..f1f441c9 100644 --- a/json-schemas/ProductDiscountSetValidFromAndUntilAction.schema.json +++ b/json-schemas/ProductDiscountSetValidFromAndUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountSetValidFromAndUntilAction", "type": "object", @@ -15,5 +15,5 @@ } }, "required": ["action"], - "$id": "https://example.com/ProductDiscountSetValidFromAndUntilAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountSetValidFromAndUntilAction.schema.json" } diff --git a/json-schemas/ProductDiscountSetValidUntilAction.schema.json b/json-schemas/ProductDiscountSetValidUntilAction.schema.json index f37ac587..b3196f5e 100644 --- a/json-schemas/ProductDiscountSetValidUntilAction.schema.json +++ b/json-schemas/ProductDiscountSetValidUntilAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountSetValidUntilAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/ProductDiscountSetValidUntilAction.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountSetValidUntilAction.schema.json" } diff --git a/json-schemas/ProductDiscountUpdate.schema.json b/json-schemas/ProductDiscountUpdate.schema.json index 6330747a..b732a32f 100644 --- a/json-schemas/ProductDiscountUpdate.schema.json +++ b/json-schemas/ProductDiscountUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ProductDiscountUpdate.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountUpdate.schema.json" } diff --git a/json-schemas/ProductDiscountUpdateAction.schema.json b/json-schemas/ProductDiscountUpdateAction.schema.json index 122ed883..d3663808 100644 --- a/json-schemas/ProductDiscountUpdateAction.schema.json +++ b/json-schemas/ProductDiscountUpdateAction.schema.json @@ -1,22 +1,33 @@ { "oneOf": [ - {"$ref": "https://example.com/ProductDiscountChangeIsActiveAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountChangePredicateAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountChangeSortOrderAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountChangeValueAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountSetValidFromAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountSetValidFromAndUntilAction.schema.json"}, - {"$ref": "https://example.com/ProductDiscountSetValidUntilAction.schema.json"} + {"$ref": "https://api.commercetools.com/ProductDiscountChangeIsActiveAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountChangePredicateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountChangeSortOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountChangeValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountSetValidFromAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountSetValidFromAndUntilAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountSetValidUntilAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeIsActive", + "changeName", + "changePredicate", + "changeSortOrder", + "changeValue", + "setDescription", + "setKey", + "setValidFrom", + "setValidFromAndUntil", + "setValidUntil" + ]}}, "required": ["action"], - "$id": "https://example.com/ProductDiscountUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ProductDiscountUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ProductDiscountValue.schema.json b/json-schemas/ProductDiscountValue.schema.json index ff92496e..58587ff2 100644 --- a/json-schemas/ProductDiscountValue.schema.json +++ b/json-schemas/ProductDiscountValue.schema.json @@ -1,15 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/ProductDiscountValueAbsolute.schema.json"}, - {"$ref": "https://example.com/ProductDiscountValueExternal.schema.json"}, - {"$ref": "https://example.com/ProductDiscountValueRelative.schema.json"} + {"$ref": "https://api.commercetools.com/ProductDiscountValueAbsolute.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountValueExternal.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountValueRelative.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountValue", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "absolute", + "external", + "relative" + ]}}, "required": ["type"], - "$id": "https://example.com/ProductDiscountValue.schema.json", + "$id": "https://api.commercetools.com/ProductDiscountValue.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ProductDiscountValueAbsolute.schema.json b/json-schemas/ProductDiscountValueAbsolute.schema.json index 1ee67a24..e900d4bd 100644 --- a/json-schemas/ProductDiscountValueAbsolute.schema.json +++ b/json-schemas/ProductDiscountValueAbsolute.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the Product's Price by a fixed amount, defined by the `money` field.", "additionalProperties": false, "title": "ProductDiscountValueAbsolute", "type": "object", @@ -7,12 +8,12 @@ "type": {"enum": ["absolute"]}, "money": { "type": "array", - "items": {"$ref": "TypedMoney.schema.json"} + "items": {"$ref": "CentPrecisionMoney.schema.json"} } }, "required": [ "type", "money" ], - "$id": "https://example.com/ProductDiscountValueAbsolute.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueAbsolute.schema.json" } diff --git a/json-schemas/ProductDiscountValueAbsoluteDraft.schema.json b/json-schemas/ProductDiscountValueAbsoluteDraft.schema.json index 0720f5ce..0c2177b6 100644 --- a/json-schemas/ProductDiscountValueAbsoluteDraft.schema.json +++ b/json-schemas/ProductDiscountValueAbsoluteDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the Product Price by a fixed amount, defined by the `money` field.", "additionalProperties": false, "title": "ProductDiscountValueAbsoluteDraft", "type": "object", @@ -7,12 +8,12 @@ "type": {"enum": ["absolute"]}, "money": { "type": "array", - "items": {"$ref": "Money.schema.json"} + "items": {"$ref": "CentPrecisionMoneyDraft.schema.json"} } }, "required": [ "type", "money" ], - "$id": "https://example.com/ProductDiscountValueAbsoluteDraft.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueAbsoluteDraft.schema.json" } diff --git a/json-schemas/ProductDiscountValueDraft.schema.json b/json-schemas/ProductDiscountValueDraft.schema.json index 99a745c2..f57d0850 100644 --- a/json-schemas/ProductDiscountValueDraft.schema.json +++ b/json-schemas/ProductDiscountValueDraft.schema.json @@ -1,15 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/ProductDiscountValueAbsoluteDraft.schema.json"}, - {"$ref": "https://example.com/ProductDiscountValueExternalDraft.schema.json"}, - {"$ref": "https://example.com/ProductDiscountValueRelativeDraft.schema.json"} + {"$ref": "https://api.commercetools.com/ProductDiscountValueAbsoluteDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountValueExternalDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountValueRelativeDraft.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDiscountValueDraft", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "absolute", + "external", + "relative" + ]}}, "required": ["type"], - "$id": "https://example.com/ProductDiscountValueDraft.schema.json", + "$id": "https://api.commercetools.com/ProductDiscountValueDraft.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ProductDiscountValueExternal.schema.json b/json-schemas/ProductDiscountValueExternal.schema.json index 5f44152b..c2e5e4bb 100644 --- a/json-schemas/ProductDiscountValueExternal.schema.json +++ b/json-schemas/ProductDiscountValueExternal.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the Product Price by allowing the client to explicitly [set a discounted value](/../api/projects/products#set-discounted-embedded-price).\nUsed when setting discounts using an external service.", "additionalProperties": false, "title": "ProductDiscountValueExternal", "type": "object", "properties": {"type": {"enum": ["external"]}}, "required": ["type"], - "$id": "https://example.com/ProductDiscountValueExternal.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueExternal.schema.json" } diff --git a/json-schemas/ProductDiscountValueExternalDraft.schema.json b/json-schemas/ProductDiscountValueExternalDraft.schema.json index 18df891f..d84f276a 100644 --- a/json-schemas/ProductDiscountValueExternalDraft.schema.json +++ b/json-schemas/ProductDiscountValueExternalDraft.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the Product Price by allowing the client to explicitly [set a discounted value](/../api/projects/products#set-discounted-embedded-price).\nUse this when setting discounts using an external service.", "additionalProperties": false, "title": "ProductDiscountValueExternalDraft", "type": "object", "properties": {"type": {"enum": ["external"]}}, "required": ["type"], - "$id": "https://example.com/ProductDiscountValueExternalDraft.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueExternalDraft.schema.json" } diff --git a/json-schemas/ProductDiscountValueRelative.schema.json b/json-schemas/ProductDiscountValueRelative.schema.json index fb625a8e..cf3a23cb 100644 --- a/json-schemas/ProductDiscountValueRelative.schema.json +++ b/json-schemas/ProductDiscountValueRelative.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the product price by a percentage, defined by the `permyriad` field.", "additionalProperties": false, "title": "ProductDiscountValueRelative", "type": "object", @@ -11,5 +12,5 @@ "type", "permyriad" ], - "$id": "https://example.com/ProductDiscountValueRelative.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueRelative.schema.json" } diff --git a/json-schemas/ProductDiscountValueRelativeDraft.schema.json b/json-schemas/ProductDiscountValueRelativeDraft.schema.json index e006c785..78e01769 100644 --- a/json-schemas/ProductDiscountValueRelativeDraft.schema.json +++ b/json-schemas/ProductDiscountValueRelativeDraft.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts the Product Price by a percentage, defined by the `permyriad` field.", "additionalProperties": false, "title": "ProductDiscountValueRelativeDraft", "type": "object", @@ -11,5 +12,5 @@ "type", "permyriad" ], - "$id": "https://example.com/ProductDiscountValueRelativeDraft.schema.json" + "$id": "https://api.commercetools.com/ProductDiscountValueRelativeDraft.schema.json" } diff --git a/json-schemas/ProductDraft.schema.json b/json-schemas/ProductDraft.schema.json index c8f1b47f..d6da50c3 100644 --- a/json-schemas/ProductDraft.schema.json +++ b/json-schemas/ProductDraft.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductDraft", "type": "object", "properties": { + "priceMode": {"$ref": "ProductPriceModeEnumEnum.schema.json"}, "searchKeywords": {"$ref": "SearchKeywords.schema.json"}, "description": {"$ref": "LocalizedString.schema.json"}, "variants": { @@ -32,5 +33,5 @@ "name", "slug" ], - "$id": "https://example.com/ProductDraft.schema.json" + "$id": "https://api.commercetools.com/ProductDraft.schema.json" } diff --git a/json-schemas/ProductImageAddedMessage.schema.json b/json-schemas/ProductImageAddedMessage.schema.json index b0adb468..ee96908c 100644 --- a/json-schemas/ProductImageAddedMessage.schema.json +++ b/json-schemas/ProductImageAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductImageAddedMessage", "type": "object", @@ -38,5 +38,5 @@ "image", "staged" ], - "$id": "https://example.com/ProductImageAddedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductImageAddedMessage.schema.json" } diff --git a/json-schemas/ProductImageAddedMessagePayload.schema.json b/json-schemas/ProductImageAddedMessagePayload.schema.json index 17f83090..90859e15 100644 --- a/json-schemas/ProductImageAddedMessagePayload.schema.json +++ b/json-schemas/ProductImageAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductImageAddedMessagePayload", "type": "object", @@ -15,5 +15,5 @@ "image", "staged" ], - "$id": "https://example.com/ProductImageAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductImageAddedMessagePayload.schema.json" } diff --git a/json-schemas/ProductLegacySetSkuAction.schema.json b/json-schemas/ProductLegacySetSkuAction.schema.json index 853badd1..e0a5acdb 100644 --- a/json-schemas/ProductLegacySetSkuAction.schema.json +++ b/json-schemas/ProductLegacySetSkuAction.schema.json @@ -1,19 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductLegacySetSkuAction", "type": "object", "properties": { "sku": {"type": "string"}, "action": {"enum": ["legacySetSku"]}, - "variantId": { - "type": "number", - "format": "integer" - } + "variantId": {"type": "number"} }, "required": [ "action", "variantId" ], - "$id": "https://example.com/ProductLegacySetSkuAction.schema.json" + "$id": "https://api.commercetools.com/ProductLegacySetSkuAction.schema.json" } diff --git a/json-schemas/ProductMoveImageToPositionAction.schema.json b/json-schemas/ProductMoveImageToPositionAction.schema.json index 62cb6a10..a2102914 100644 --- a/json-schemas/ProductMoveImageToPositionAction.schema.json +++ b/json-schemas/ProductMoveImageToPositionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductMoveImageToPositionAction", "type": "object", @@ -16,5 +16,5 @@ "imageUrl", "position" ], - "$id": "https://example.com/ProductMoveImageToPositionAction.schema.json" + "$id": "https://api.commercetools.com/ProductMoveImageToPositionAction.schema.json" } diff --git a/json-schemas/ProductPagedQueryResponse.schema.json b/json-schemas/ProductPagedQueryResponse.schema.json index 6dfd82a1..b8e742a8 100644 --- a/json-schemas/ProductPagedQueryResponse.schema.json +++ b/json-schemas/ProductPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/ProductPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ProductPagedQueryResponse.schema.json" } diff --git a/json-schemas/ProductPriceDiscountsSetMessage.schema.json b/json-schemas/ProductPriceDiscountsSetMessage.schema.json index 03d432a6..246e25ed 100644 --- a/json-schemas/ProductPriceDiscountsSetMessage.schema.json +++ b/json-schemas/ProductPriceDiscountsSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPriceDiscountsSetMessage", "type": "object", @@ -37,5 +37,5 @@ "type", "updatedPrices" ], - "$id": "https://example.com/ProductPriceDiscountsSetMessage.schema.json" + "$id": "https://api.commercetools.com/ProductPriceDiscountsSetMessage.schema.json" } diff --git a/json-schemas/ProductPriceDiscountsSetMessagePayload.schema.json b/json-schemas/ProductPriceDiscountsSetMessagePayload.schema.json index 6818069d..e1154700 100644 --- a/json-schemas/ProductPriceDiscountsSetMessagePayload.schema.json +++ b/json-schemas/ProductPriceDiscountsSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPriceDiscountsSetMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "type", "updatedPrices" ], - "$id": "https://example.com/ProductPriceDiscountsSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductPriceDiscountsSetMessagePayload.schema.json" } diff --git a/json-schemas/ProductPriceDiscountsSetUpdatedPrice.schema.json b/json-schemas/ProductPriceDiscountsSetUpdatedPrice.schema.json index 31a6a877..5fe8197b 100644 --- a/json-schemas/ProductPriceDiscountsSetUpdatedPrice.schema.json +++ b/json-schemas/ProductPriceDiscountsSetUpdatedPrice.schema.json @@ -1,14 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPriceDiscountsSetUpdatedPrice", "type": "object", "properties": { "discounted": {"$ref": "DiscountedPrice.schema.json"}, - "variantId": { - "type": "number", - "format": "integer" - }, + "variantId": {"type": "number"}, "staged": {"type": "boolean"}, "variantKey": {"type": "string"}, "sku": {"type": "string"}, @@ -19,5 +16,5 @@ "priceId", "staged" ], - "$id": "https://example.com/ProductPriceDiscountsSetUpdatedPrice.schema.json" + "$id": "https://api.commercetools.com/ProductPriceDiscountsSetUpdatedPrice.schema.json" } diff --git a/json-schemas/ProductPriceExternalDiscountSetMessage.schema.json b/json-schemas/ProductPriceExternalDiscountSetMessage.schema.json index 35aee002..b9c39adf 100644 --- a/json-schemas/ProductPriceExternalDiscountSetMessage.schema.json +++ b/json-schemas/ProductPriceExternalDiscountSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPriceExternalDiscountSetMessage", "type": "object", @@ -23,10 +23,7 @@ }, "createdBy": {"$ref": "CreatedBy.schema.json"}, "id": {"type": "string"}, - "variantId": { - "type": "number", - "format": "integer" - }, + "variantId": {"type": "number"}, "variantKey": {"type": "string"}, "sku": {"type": "string"}, "priceId": {"type": "string"} @@ -44,5 +41,5 @@ "priceId", "staged" ], - "$id": "https://example.com/ProductPriceExternalDiscountSetMessage.schema.json" + "$id": "https://api.commercetools.com/ProductPriceExternalDiscountSetMessage.schema.json" } diff --git a/json-schemas/ProductPriceExternalDiscountSetMessagePayload.schema.json b/json-schemas/ProductPriceExternalDiscountSetMessagePayload.schema.json index 01d2e846..f42d7fe9 100644 --- a/json-schemas/ProductPriceExternalDiscountSetMessagePayload.schema.json +++ b/json-schemas/ProductPriceExternalDiscountSetMessagePayload.schema.json @@ -1,14 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPriceExternalDiscountSetMessagePayload", "type": "object", "properties": { "discounted": {"$ref": "DiscountedPrice.schema.json"}, - "variantId": { - "type": "number", - "format": "integer" - }, + "variantId": {"type": "number"}, "staged": {"type": "boolean"}, "type": {"enum": ["ProductPriceExternalDiscountSet"]}, "variantKey": {"type": "string"}, @@ -21,5 +18,5 @@ "priceId", "staged" ], - "$id": "https://example.com/ProductPriceExternalDiscountSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductPriceExternalDiscountSetMessagePayload.schema.json" } diff --git a/json-schemas/ProductPriceModeEnumEnum.schema.json b/json-schemas/ProductPriceModeEnumEnum.schema.json new file mode 100644 index 00000000..b8751db2 --- /dev/null +++ b/json-schemas/ProductPriceModeEnumEnum.schema.json @@ -0,0 +1,11 @@ +{ + "description": "This mode specifies which type of prices should be used when looking up the price of a product.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "ProductPriceModeEnum", + "type": "string", + "enum": [ + "Embedded", + "Standalone" + ], + "$id": "https://api.commercetools.com/ProductPriceModeEnumEnum.schema.json" +} diff --git a/json-schemas/ProductProjection.schema.json b/json-schemas/ProductProjection.schema.json index 15b0d906..418c3ab8 100644 --- a/json-schemas/ProductProjection.schema.json +++ b/json-schemas/ProductProjection.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductProjection", "type": "object", @@ -51,5 +51,5 @@ "masterVariant", "variants" ], - "$id": "https://example.com/ProductProjection.schema.json" + "$id": "https://api.commercetools.com/ProductProjection.schema.json" } diff --git a/json-schemas/ProductProjectionPagedQueryResponse.schema.json b/json-schemas/ProductProjectionPagedQueryResponse.schema.json index dac4b93a..54f5d3f5 100644 --- a/json-schemas/ProductProjectionPagedQueryResponse.schema.json +++ b/json-schemas/ProductProjectionPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductProjectionPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/ProductProjectionPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ProductProjectionPagedQueryResponse.schema.json" } diff --git a/json-schemas/ProductProjectionPagedSearchResponse.schema.json b/json-schemas/ProductProjectionPagedSearchResponse.schema.json index 4833c33c..27e79293 100644 --- a/json-schemas/ProductProjectionPagedSearchResponse.schema.json +++ b/json-schemas/ProductProjectionPagedSearchResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductProjectionPagedSearchResponse", "type": "object", @@ -21,5 +21,5 @@ "results", "facets" ], - "$id": "https://example.com/ProductProjectionPagedSearchResponse.schema.json" + "$id": "https://api.commercetools.com/ProductProjectionPagedSearchResponse.schema.json" } diff --git a/json-schemas/ProductPublishAction.schema.json b/json-schemas/ProductPublishAction.schema.json index e39d6d17..99986008 100644 --- a/json-schemas/ProductPublishAction.schema.json +++ b/json-schemas/ProductPublishAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPublishAction", "type": "object", @@ -8,5 +8,5 @@ "scope": {"$ref": "ProductPublishScopeEnum.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ProductPublishAction.schema.json" + "$id": "https://api.commercetools.com/ProductPublishAction.schema.json" } diff --git a/json-schemas/ProductPublishScopeEnum.schema.json b/json-schemas/ProductPublishScopeEnum.schema.json index f9a68160..250530aa 100644 --- a/json-schemas/ProductPublishScopeEnum.schema.json +++ b/json-schemas/ProductPublishScopeEnum.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ProductPublishScope", "type": "string", "enum": [ "All", "Prices" ], - "$id": "https://example.com/ProductPublishScopeEnum.schema.json" + "$id": "https://api.commercetools.com/ProductPublishScopeEnum.schema.json" } diff --git a/json-schemas/ProductPublishedMessage.schema.json b/json-schemas/ProductPublishedMessage.schema.json index 64688d7a..6c4c3631 100644 --- a/json-schemas/ProductPublishedMessage.schema.json +++ b/json-schemas/ProductPublishedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPublishedMessage", "type": "object", @@ -41,5 +41,5 @@ "productProjection", "scope" ], - "$id": "https://example.com/ProductPublishedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductPublishedMessage.schema.json" } diff --git a/json-schemas/ProductPublishedMessagePayload.schema.json b/json-schemas/ProductPublishedMessagePayload.schema.json index 95210ebf..0c42ccdf 100644 --- a/json-schemas/ProductPublishedMessagePayload.schema.json +++ b/json-schemas/ProductPublishedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductPublishedMessagePayload", "type": "object", @@ -18,5 +18,5 @@ "productProjection", "scope" ], - "$id": "https://example.com/ProductPublishedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductPublishedMessagePayload.schema.json" } diff --git a/json-schemas/ProductReference.schema.json b/json-schemas/ProductReference.schema.json index 968f676b..fe0ae728 100644 --- a/json-schemas/ProductReference.schema.json +++ b/json-schemas/ProductReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product).", "additionalProperties": false, "title": "ProductReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ProductReference.schema.json" + "$id": "https://api.commercetools.com/ProductReference.schema.json" } diff --git a/json-schemas/ProductRemoveAssetAction.schema.json b/json-schemas/ProductRemoveAssetAction.schema.json index 34dc01d4..5e9c2e35 100644 --- a/json-schemas/ProductRemoveAssetAction.schema.json +++ b/json-schemas/ProductRemoveAssetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemoveAssetAction", "type": "object", @@ -12,5 +12,5 @@ "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductRemoveAssetAction.schema.json" + "$id": "https://api.commercetools.com/ProductRemoveAssetAction.schema.json" } diff --git a/json-schemas/ProductRemoveFromCategoryAction.schema.json b/json-schemas/ProductRemoveFromCategoryAction.schema.json index a3d51ba1..25423d8e 100644 --- a/json-schemas/ProductRemoveFromCategoryAction.schema.json +++ b/json-schemas/ProductRemoveFromCategoryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemoveFromCategoryAction", "type": "object", @@ -12,5 +12,5 @@ "action", "category" ], - "$id": "https://example.com/ProductRemoveFromCategoryAction.schema.json" + "$id": "https://api.commercetools.com/ProductRemoveFromCategoryAction.schema.json" } diff --git a/json-schemas/ProductRemoveImageAction.schema.json b/json-schemas/ProductRemoveImageAction.schema.json index d64c3c1b..dd3d160f 100644 --- a/json-schemas/ProductRemoveImageAction.schema.json +++ b/json-schemas/ProductRemoveImageAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemoveImageAction", "type": "object", @@ -14,5 +14,5 @@ "action", "imageUrl" ], - "$id": "https://example.com/ProductRemoveImageAction.schema.json" + "$id": "https://api.commercetools.com/ProductRemoveImageAction.schema.json" } diff --git a/json-schemas/ProductRemovePriceAction.schema.json b/json-schemas/ProductRemovePriceAction.schema.json index 14cf9b45..36db5a5d 100644 --- a/json-schemas/ProductRemovePriceAction.schema.json +++ b/json-schemas/ProductRemovePriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemovePriceAction", "type": "object", @@ -12,5 +12,5 @@ "action", "priceId" ], - "$id": "https://example.com/ProductRemovePriceAction.schema.json" + "$id": "https://api.commercetools.com/ProductRemovePriceAction.schema.json" } diff --git a/json-schemas/ProductRemoveVariantAction.schema.json b/json-schemas/ProductRemoveVariantAction.schema.json index 3aac2997..0a70ef0f 100644 --- a/json-schemas/ProductRemoveVariantAction.schema.json +++ b/json-schemas/ProductRemoveVariantAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemoveVariantAction", "type": "object", @@ -10,5 +10,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductRemoveVariantAction.schema.json" + "$id": "https://api.commercetools.com/ProductRemoveVariantAction.schema.json" } diff --git a/json-schemas/ProductRemovedFromCategoryMessage.schema.json b/json-schemas/ProductRemovedFromCategoryMessage.schema.json index 3e9aed41..0780f1dc 100644 --- a/json-schemas/ProductRemovedFromCategoryMessage.schema.json +++ b/json-schemas/ProductRemovedFromCategoryMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemovedFromCategoryMessage", "type": "object", @@ -36,5 +36,5 @@ "category", "staged" ], - "$id": "https://example.com/ProductRemovedFromCategoryMessage.schema.json" + "$id": "https://api.commercetools.com/ProductRemovedFromCategoryMessage.schema.json" } diff --git a/json-schemas/ProductRemovedFromCategoryMessagePayload.schema.json b/json-schemas/ProductRemovedFromCategoryMessagePayload.schema.json index f464cc9b..4289cfdd 100644 --- a/json-schemas/ProductRemovedFromCategoryMessagePayload.schema.json +++ b/json-schemas/ProductRemovedFromCategoryMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRemovedFromCategoryMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "category", "staged" ], - "$id": "https://example.com/ProductRemovedFromCategoryMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductRemovedFromCategoryMessagePayload.schema.json" } diff --git a/json-schemas/ProductResourceIdentifier.schema.json b/json-schemas/ProductResourceIdentifier.schema.json index 832bc2a2..58b12b5f 100644 --- a/json-schemas/ProductResourceIdentifier.schema.json +++ b/json-schemas/ProductResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Product](ctp:api:type:Product).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ProductResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ProductResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ProductResourceIdentifier.schema.json" } diff --git a/json-schemas/ProductRevertStagedChangesAction.schema.json b/json-schemas/ProductRevertStagedChangesAction.schema.json index ae4845f5..be80dd90 100644 --- a/json-schemas/ProductRevertStagedChangesAction.schema.json +++ b/json-schemas/ProductRevertStagedChangesAction.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRevertStagedChangesAction", "type": "object", "properties": {"action": {"enum": ["revertStagedChanges"]}}, "required": ["action"], - "$id": "https://example.com/ProductRevertStagedChangesAction.schema.json" + "$id": "https://api.commercetools.com/ProductRevertStagedChangesAction.schema.json" } diff --git a/json-schemas/ProductRevertStagedVariantChangesAction.schema.json b/json-schemas/ProductRevertStagedVariantChangesAction.schema.json index fec3022b..e1762af9 100644 --- a/json-schemas/ProductRevertStagedVariantChangesAction.schema.json +++ b/json-schemas/ProductRevertStagedVariantChangesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRevertStagedVariantChangesAction", "type": "object", @@ -11,5 +11,5 @@ "action", "variantId" ], - "$id": "https://example.com/ProductRevertStagedVariantChangesAction.schema.json" + "$id": "https://api.commercetools.com/ProductRevertStagedVariantChangesAction.schema.json" } diff --git a/json-schemas/ProductRevertedStagedChangesMessage.schema.json b/json-schemas/ProductRevertedStagedChangesMessage.schema.json index 4379da49..113bd43b 100644 --- a/json-schemas/ProductRevertedStagedChangesMessage.schema.json +++ b/json-schemas/ProductRevertedStagedChangesMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRevertedStagedChangesMessage", "type": "object", @@ -37,5 +37,5 @@ "type", "removedImageUrls" ], - "$id": "https://example.com/ProductRevertedStagedChangesMessage.schema.json" + "$id": "https://api.commercetools.com/ProductRevertedStagedChangesMessage.schema.json" } diff --git a/json-schemas/ProductRevertedStagedChangesMessagePayload.schema.json b/json-schemas/ProductRevertedStagedChangesMessagePayload.schema.json index 62919b89..8dc8e0bc 100644 --- a/json-schemas/ProductRevertedStagedChangesMessagePayload.schema.json +++ b/json-schemas/ProductRevertedStagedChangesMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductRevertedStagedChangesMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "type", "removedImageUrls" ], - "$id": "https://example.com/ProductRevertedStagedChangesMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductRevertedStagedChangesMessagePayload.schema.json" } diff --git a/json-schemas/ProductSelection.schema.json b/json-schemas/ProductSelection.schema.json new file mode 100644 index 00000000..15bb93ef --- /dev/null +++ b/json-schemas/ProductSelection.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelection", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"}, + "name": {"$ref": "LocalizedString.schema.json"}, + "id": {"type": "string"}, + "productCount": {"type": "number"}, + "type": {"$ref": "ProductSelectionTypeEnumEnum.schema.json"}, + "version": {"type": "number"}, + "key": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "name", + "productCount", + "type" + ], + "$id": "https://api.commercetools.com/ProductSelection.schema.json" +} diff --git a/json-schemas/ProductSelectionAddProductAction.schema.json b/json-schemas/ProductSelectionAddProductAction.schema.json new file mode 100644 index 00000000..e5d6b6b3 --- /dev/null +++ b/json-schemas/ProductSelectionAddProductAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Adds a Product to the Product Selection.\nIf the given Product is already assigned to the Product Selection with the same Variant Selection nothing happens\nbut if the existing Assignment has a different Variant Selection [ProductPresentWithDifferentVariantSelection](/errors#product-selections) is raised.'", + "additionalProperties": false, + "title": "ProductSelectionAddProductAction", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "action": {"enum": ["addProduct"]}, + "product": {"$ref": "ProductResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionAddProductAction.schema.json" +} diff --git a/json-schemas/ProductSelectionAssignment.schema.json b/json-schemas/ProductSelectionAssignment.schema.json new file mode 100644 index 00000000..38b64b20 --- /dev/null +++ b/json-schemas/ProductSelectionAssignment.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Specifies which Product is assigned to which ProductSelection.", + "additionalProperties": false, + "title": "ProductSelectionAssignment", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "product": {"$ref": "ProductReference.schema.json"}, + "productSelection": {"$ref": "ProductSelectionReference.schema.json"} + }, + "required": [ + "product", + "productSelection" + ], + "$id": "https://api.commercetools.com/ProductSelectionAssignment.schema.json" +} diff --git a/json-schemas/ProductSelectionChangeNameAction.schema.json b/json-schemas/ProductSelectionChangeNameAction.schema.json new file mode 100644 index 00000000..36e49c4f --- /dev/null +++ b/json-schemas/ProductSelectionChangeNameAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionChangeNameAction", + "type": "object", + "properties": { + "name": {"$ref": "LocalizedString.schema.json"}, + "action": {"enum": ["changeName"]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/ProductSelectionChangeNameAction.schema.json" +} diff --git a/json-schemas/ProductSelectionCreatedMessage.schema.json b/json-schemas/ProductSelectionCreatedMessage.schema.json new file mode 100644 index 00000000..c851a98d --- /dev/null +++ b/json-schemas/ProductSelectionCreatedMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionCreatedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["ProductSelectionCreated"]}, + "version": {"type": "number"}, + "productSelection": {"$ref": "ProductSelectionType.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "productSelection" + ], + "$id": "https://api.commercetools.com/ProductSelectionCreatedMessage.schema.json" +} diff --git a/json-schemas/ProductSelectionCreatedMessagePayload.schema.json b/json-schemas/ProductSelectionCreatedMessagePayload.schema.json new file mode 100644 index 00000000..8ffafb52 --- /dev/null +++ b/json-schemas/ProductSelectionCreatedMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionCreatedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["ProductSelectionCreated"]}, + "productSelection": {"$ref": "ProductSelectionType.schema.json"} + }, + "required": [ + "type", + "productSelection" + ], + "$id": "https://api.commercetools.com/ProductSelectionCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/ProductSelectionDeletedMessage.schema.json b/json-schemas/ProductSelectionDeletedMessage.schema.json new file mode 100644 index 00000000..c313e600 --- /dev/null +++ b/json-schemas/ProductSelectionDeletedMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "name": {"$ref": "LocalizedString.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["ProductSelectionDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "name" + ], + "$id": "https://api.commercetools.com/ProductSelectionDeletedMessage.schema.json" +} diff --git a/json-schemas/ProductSelectionDeletedMessagePayload.schema.json b/json-schemas/ProductSelectionDeletedMessagePayload.schema.json new file mode 100644 index 00000000..8986f535 --- /dev/null +++ b/json-schemas/ProductSelectionDeletedMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionDeletedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["ProductSelectionDeleted"]}, + "name": {"$ref": "LocalizedString.schema.json"} + }, + "required": [ + "type", + "name" + ], + "$id": "https://api.commercetools.com/ProductSelectionDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/ProductSelectionDraft.schema.json b/json-schemas/ProductSelectionDraft.schema.json new file mode 100644 index 00000000..93df0945 --- /dev/null +++ b/json-schemas/ProductSelectionDraft.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionDraft", + "type": "object", + "properties": { + "name": {"$ref": "LocalizedString.schema.json"}, + "key": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} + }, + "required": ["name"], + "$id": "https://api.commercetools.com/ProductSelectionDraft.schema.json" +} diff --git a/json-schemas/ProductSelectionPagedQueryResponse.schema.json b/json-schemas/ProductSelectionPagedQueryResponse.schema.json new file mode 100644 index 00000000..fcdcc1c4 --- /dev/null +++ b/json-schemas/ProductSelectionPagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) containing an array of [ProductSelection](ctp:api:type:ProductSelection).", + "additionalProperties": false, + "title": "ProductSelectionPagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "ProductSelection.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/ProductSelectionPagedQueryResponse.schema.json" +} diff --git a/json-schemas/ProductSelectionProductAddedMessage.schema.json b/json-schemas/ProductSelectionProductAddedMessage.schema.json new file mode 100644 index 00000000..d7ec98b0 --- /dev/null +++ b/json-schemas/ProductSelectionProductAddedMessage.schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionProductAddedMessage", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "sequenceNumber": {"type": "number"}, + "product": {"$ref": "ProductReference.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["ProductSelectionProductAdded"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionProductAddedMessage.schema.json" +} diff --git a/json-schemas/ProductSelectionProductAddedMessagePayload.schema.json b/json-schemas/ProductSelectionProductAddedMessagePayload.schema.json new file mode 100644 index 00000000..ee4d0f57 --- /dev/null +++ b/json-schemas/ProductSelectionProductAddedMessagePayload.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionProductAddedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["ProductSelectionProductAdded"]}, + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "product": {"$ref": "ProductReference.schema.json"} + }, + "required": [ + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionProductAddedMessagePayload.schema.json" +} diff --git a/json-schemas/ProductSelectionProductPagedQueryResponse.schema.json b/json-schemas/ProductSelectionProductPagedQueryResponse.schema.json new file mode 100644 index 00000000..cf4bc6aa --- /dev/null +++ b/json-schemas/ProductSelectionProductPagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) containing an array of [AssignedProductReference](ctp:api:type:AssignedProductReference).", + "additionalProperties": false, + "title": "ProductSelectionProductPagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "AssignedProductReference.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/ProductSelectionProductPagedQueryResponse.schema.json" +} diff --git a/json-schemas/ProductSelectionProductRemovedMessage.schema.json b/json-schemas/ProductSelectionProductRemovedMessage.schema.json new file mode 100644 index 00000000..3f2cbb7b --- /dev/null +++ b/json-schemas/ProductSelectionProductRemovedMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionProductRemovedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "product": {"$ref": "ProductReference.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["ProductSelectionProductRemoved"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionProductRemovedMessage.schema.json" +} diff --git a/json-schemas/ProductSelectionProductRemovedMessagePayload.schema.json b/json-schemas/ProductSelectionProductRemovedMessagePayload.schema.json new file mode 100644 index 00000000..317e1570 --- /dev/null +++ b/json-schemas/ProductSelectionProductRemovedMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionProductRemovedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["ProductSelectionProductRemoved"]}, + "product": {"$ref": "ProductReference.schema.json"} + }, + "required": [ + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionProductRemovedMessagePayload.schema.json" +} diff --git a/json-schemas/ProductSelectionReference.schema.json b/json-schemas/ProductSelectionReference.schema.json new file mode 100644 index 00000000..3198e346 --- /dev/null +++ b/json-schemas/ProductSelectionReference.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [ProductSelection](ctp:api:type:ProductSelection).", + "additionalProperties": false, + "title": "ProductSelectionReference", + "type": "object", + "properties": { + "typeId": {"enum": ["product-selection"]}, + "obj": {"$ref": "ProductSelection.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "typeId", + "id" + ], + "$id": "https://api.commercetools.com/ProductSelectionReference.schema.json" +} diff --git a/json-schemas/ProductSelectionRemoveProductAction.schema.json b/json-schemas/ProductSelectionRemoveProductAction.schema.json new file mode 100644 index 00000000..67200be4 --- /dev/null +++ b/json-schemas/ProductSelectionRemoveProductAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionRemoveProductAction", + "type": "object", + "properties": { + "action": {"enum": ["removeProduct"]}, + "product": {"$ref": "ProductResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionRemoveProductAction.schema.json" +} diff --git a/json-schemas/ProductSelectionResourceIdentifier.schema.json b/json-schemas/ProductSelectionResourceIdentifier.schema.json new file mode 100644 index 00000000..7edb340c --- /dev/null +++ b/json-schemas/ProductSelectionResourceIdentifier.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductSelection](ctp:api:type:ProductSelection).", + "additionalProperties": false, + "title": "ProductSelectionResourceIdentifier", + "type": "object", + "properties": { + "typeId": {"enum": ["product-selection"]}, + "key": {"type": "string"}, + "id": {"type": "string"} + }, + "required": ["typeId"], + "$id": "https://api.commercetools.com/ProductSelectionResourceIdentifier.schema.json" +} diff --git a/json-schemas/ProductSelectionSetCustomFieldAction.schema.json b/json-schemas/ProductSelectionSetCustomFieldAction.schema.json new file mode 100644 index 00000000..6928c3be --- /dev/null +++ b/json-schemas/ProductSelectionSetCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionSetCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/ProductSelectionSetCustomFieldAction.schema.json" +} diff --git a/json-schemas/ProductSelectionSetCustomTypeAction.schema.json b/json-schemas/ProductSelectionSetCustomTypeAction.schema.json new file mode 100644 index 00000000..ef7eaed0 --- /dev/null +++ b/json-schemas/ProductSelectionSetCustomTypeAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionSetCustomTypeAction", + "type": "object", + "properties": { + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "action": {"enum": ["setCustomType"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/ProductSelectionSetCustomTypeAction.schema.json" +} diff --git a/json-schemas/ProductSelectionSetKeyAction.schema.json b/json-schemas/ProductSelectionSetKeyAction.schema.json new file mode 100644 index 00000000..997c63ab --- /dev/null +++ b/json-schemas/ProductSelectionSetKeyAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionSetKeyAction", + "type": "object", + "properties": { + "action": {"enum": ["setKey"]}, + "key": {"type": "string"} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/ProductSelectionSetKeyAction.schema.json" +} diff --git a/json-schemas/ProductSelectionSetVariantSelectionAction.schema.json b/json-schemas/ProductSelectionSetVariantSelectionAction.schema.json new file mode 100644 index 00000000..9da89c6a --- /dev/null +++ b/json-schemas/ProductSelectionSetVariantSelectionAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the Product Variant Selection of an existing [Product Selection Assignment](ctp:api:type:ProductSelectionAssignment).\nIf the given Product is not assigned to the Product Selection [ProductAssignmentMissing](/errors#product-selections) error is raised.", + "additionalProperties": false, + "title": "ProductSelectionSetVariantSelectionAction", + "type": "object", + "properties": { + "variantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "action": {"enum": ["setVariantSelection"]}, + "product": {"$ref": "ProductResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionSetVariantSelectionAction.schema.json" +} diff --git a/json-schemas/ProductSelectionSetting.schema.json b/json-schemas/ProductSelectionSetting.schema.json new file mode 100644 index 00000000..4f8b5759 --- /dev/null +++ b/json-schemas/ProductSelectionSetting.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionSetting", + "type": "object", + "properties": { + "active": {"type": "boolean"}, + "productSelection": {"$ref": "ProductSelectionReference.schema.json"} + }, + "required": [ + "productSelection", + "active" + ], + "$id": "https://api.commercetools.com/ProductSelectionSetting.schema.json" +} diff --git a/json-schemas/ProductSelectionSettingDraft.schema.json b/json-schemas/ProductSelectionSettingDraft.schema.json new file mode 100644 index 00000000..4d768708 --- /dev/null +++ b/json-schemas/ProductSelectionSettingDraft.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionSettingDraft", + "type": "object", + "properties": { + "active": {"type": "boolean"}, + "productSelection": {"$ref": "ProductSelectionResourceIdentifier.schema.json"} + }, + "required": ["productSelection"], + "$id": "https://api.commercetools.com/ProductSelectionSettingDraft.schema.json" +} diff --git a/json-schemas/ProductSelectionType.schema.json b/json-schemas/ProductSelectionType.schema.json new file mode 100644 index 00000000..af5dd54f --- /dev/null +++ b/json-schemas/ProductSelectionType.schema.json @@ -0,0 +1,11 @@ +{ + "oneOf": [{"$ref": "https://api.commercetools.com/IndividualProductSelectionType.schema.json"}], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionType", + "type": "object", + "properties": {"type": {"enum": ["individual"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/ProductSelectionType.schema.json", + "discriminator": {"propertyName": "type"} +} diff --git a/json-schemas/ProductSelectionTypeEnumEnum.schema.json b/json-schemas/ProductSelectionTypeEnumEnum.schema.json new file mode 100644 index 00000000..d4a8bd0b --- /dev/null +++ b/json-schemas/ProductSelectionTypeEnumEnum.schema.json @@ -0,0 +1,8 @@ +{ + "description": "The following type of Product Selections is supported:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "ProductSelectionTypeEnum", + "type": "string", + "enum": ["individual"], + "$id": "https://api.commercetools.com/ProductSelectionTypeEnumEnum.schema.json" +} diff --git a/json-schemas/ProductSelectionUpdate.schema.json b/json-schemas/ProductSelectionUpdate.schema.json new file mode 100644 index 00000000..d510f341 --- /dev/null +++ b/json-schemas/ProductSelectionUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "ProductSelectionUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/ProductSelectionUpdate.schema.json" +} diff --git a/json-schemas/ProductSelectionUpdateAction.schema.json b/json-schemas/ProductSelectionUpdateAction.schema.json new file mode 100644 index 00000000..602fe6d3 --- /dev/null +++ b/json-schemas/ProductSelectionUpdateAction.schema.json @@ -0,0 +1,27 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/ProductSelectionAddProductAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionRemoveProductAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionSetVariantSelectionAction.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionUpdateAction", + "type": "object", + "properties": {"action": {"enum": [ + "addProduct", + "changeName", + "removeProduct", + "setCustomField", + "setCustomType", + "setKey", + "setVariantSelection" + ]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/ProductSelectionUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/ProductSelectionVariantSelectionChangedMessage.schema.json b/json-schemas/ProductSelectionVariantSelectionChangedMessage.schema.json new file mode 100644 index 00000000..bae04654 --- /dev/null +++ b/json-schemas/ProductSelectionVariantSelectionChangedMessage.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionVariantSelectionChangedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "product": {"$ref": "ProductReference.schema.json"}, + "newVariantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["ProductSelectionVariantSelectionChanged"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"}, + "oldVariantSelection": {"$ref": "ProductVariantSelection.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionVariantSelectionChangedMessage.schema.json" +} diff --git a/json-schemas/ProductSelectionVariantSelectionChangedMessagePayload.schema.json b/json-schemas/ProductSelectionVariantSelectionChangedMessagePayload.schema.json new file mode 100644 index 00000000..2e93ef8d --- /dev/null +++ b/json-schemas/ProductSelectionVariantSelectionChangedMessagePayload.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSelectionVariantSelectionChangedMessagePayload", + "type": "object", + "properties": { + "product": {"$ref": "ProductReference.schema.json"}, + "newVariantSelection": {"$ref": "ProductVariantSelection.schema.json"}, + "type": {"enum": ["ProductSelectionVariantSelectionChanged"]}, + "oldVariantSelection": {"$ref": "ProductVariantSelection.schema.json"} + }, + "required": [ + "type", + "product" + ], + "$id": "https://api.commercetools.com/ProductSelectionVariantSelectionChangedMessagePayload.schema.json" +} diff --git a/json-schemas/ProductSetAssetCustomFieldAction.schema.json b/json-schemas/ProductSetAssetCustomFieldAction.schema.json index d13780ff..184a1c4e 100644 --- a/json-schemas/ProductSetAssetCustomFieldAction.schema.json +++ b/json-schemas/ProductSetAssetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetCustomFieldAction", "type": "object", @@ -24,5 +24,5 @@ "action", "name" ], - "$id": "https://example.com/ProductSetAssetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetCustomFieldAction.schema.json" } diff --git a/json-schemas/ProductSetAssetCustomTypeAction.schema.json b/json-schemas/ProductSetAssetCustomTypeAction.schema.json index a28362dd..c70b9579 100644 --- a/json-schemas/ProductSetAssetCustomTypeAction.schema.json +++ b/json-schemas/ProductSetAssetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetCustomTypeAction", "type": "object", @@ -10,9 +10,9 @@ "staged": {"type": "boolean"}, "sku": {"type": "string"}, "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"type": "object"}, + "fields": {"$ref": "FieldContainer.schema.json"}, "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductSetAssetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetCustomTypeAction.schema.json" } diff --git a/json-schemas/ProductSetAssetDescriptionAction.schema.json b/json-schemas/ProductSetAssetDescriptionAction.schema.json index b0590b4a..1c313d5a 100644 --- a/json-schemas/ProductSetAssetDescriptionAction.schema.json +++ b/json-schemas/ProductSetAssetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetDescriptionAction", "type": "object", @@ -13,5 +13,5 @@ "assetKey": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductSetAssetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetDescriptionAction.schema.json" } diff --git a/json-schemas/ProductSetAssetKeyAction.schema.json b/json-schemas/ProductSetAssetKeyAction.schema.json index 9755cb6e..2ed7b7cc 100644 --- a/json-schemas/ProductSetAssetKeyAction.schema.json +++ b/json-schemas/ProductSetAssetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetKeyAction", "type": "object", @@ -15,5 +15,5 @@ "action", "assetId" ], - "$id": "https://example.com/ProductSetAssetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetKeyAction.schema.json" } diff --git a/json-schemas/ProductSetAssetSourcesAction.schema.json b/json-schemas/ProductSetAssetSourcesAction.schema.json index 0994d856..d2f35543 100644 --- a/json-schemas/ProductSetAssetSourcesAction.schema.json +++ b/json-schemas/ProductSetAssetSourcesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetSourcesAction", "type": "object", @@ -19,5 +19,5 @@ "action", "sources" ], - "$id": "https://example.com/ProductSetAssetSourcesAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetSourcesAction.schema.json" } diff --git a/json-schemas/ProductSetAssetTagsAction.schema.json b/json-schemas/ProductSetAssetTagsAction.schema.json index 9f3f56bb..f03b2e05 100644 --- a/json-schemas/ProductSetAssetTagsAction.schema.json +++ b/json-schemas/ProductSetAssetTagsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAssetTagsAction", "type": "object", @@ -16,5 +16,5 @@ } }, "required": ["action"], - "$id": "https://example.com/ProductSetAssetTagsAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAssetTagsAction.schema.json" } diff --git a/json-schemas/ProductSetAttributeAction.schema.json b/json-schemas/ProductSetAttributeAction.schema.json index 5de71fc6..32459038 100644 --- a/json-schemas/ProductSetAttributeAction.schema.json +++ b/json-schemas/ProductSetAttributeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAttributeAction", "type": "object", @@ -22,5 +22,5 @@ "action", "name" ], - "$id": "https://example.com/ProductSetAttributeAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAttributeAction.schema.json" } diff --git a/json-schemas/ProductSetAttributeInAllVariantsAction.schema.json b/json-schemas/ProductSetAttributeInAllVariantsAction.schema.json index d0131838..a5936d50 100644 --- a/json-schemas/ProductSetAttributeInAllVariantsAction.schema.json +++ b/json-schemas/ProductSetAttributeInAllVariantsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetAttributeInAllVariantsAction", "type": "object", @@ -20,5 +20,5 @@ "action", "name" ], - "$id": "https://example.com/ProductSetAttributeInAllVariantsAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetAttributeInAllVariantsAction.schema.json" } diff --git a/json-schemas/ProductSetCategoryOrderHintAction.schema.json b/json-schemas/ProductSetCategoryOrderHintAction.schema.json index 4c102817..107f8531 100644 --- a/json-schemas/ProductSetCategoryOrderHintAction.schema.json +++ b/json-schemas/ProductSetCategoryOrderHintAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetCategoryOrderHintAction", "type": "object", @@ -13,5 +13,5 @@ "action", "categoryId" ], - "$id": "https://example.com/ProductSetCategoryOrderHintAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetCategoryOrderHintAction.schema.json" } diff --git a/json-schemas/ProductSetDescriptionAction.schema.json b/json-schemas/ProductSetDescriptionAction.schema.json index a81efdca..60811384 100644 --- a/json-schemas/ProductSetDescriptionAction.schema.json +++ b/json-schemas/ProductSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetDescriptionAction", "type": "object", @@ -9,5 +9,5 @@ "staged": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/ProductSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetDescriptionAction.schema.json" } diff --git a/json-schemas/ProductSetDiscountedPriceAction.schema.json b/json-schemas/ProductSetDiscountedPriceAction.schema.json index a273aec7..0278496f 100644 --- a/json-schemas/ProductSetDiscountedPriceAction.schema.json +++ b/json-schemas/ProductSetDiscountedPriceAction.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetDiscountedPriceAction", "type": "object", "properties": { - "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "discounted": {"$ref": "DiscountedPriceDraft.schema.json"}, "action": {"enum": ["setDiscountedPrice"]}, "staged": {"type": "boolean"}, "priceId": {"type": "string"} @@ -13,5 +13,5 @@ "action", "priceId" ], - "$id": "https://example.com/ProductSetDiscountedPriceAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetDiscountedPriceAction.schema.json" } diff --git a/json-schemas/ProductSetImageLabelAction.schema.json b/json-schemas/ProductSetImageLabelAction.schema.json index abf2441e..1e22c495 100644 --- a/json-schemas/ProductSetImageLabelAction.schema.json +++ b/json-schemas/ProductSetImageLabelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetImageLabelAction", "type": "object", @@ -15,5 +15,5 @@ "action", "imageUrl" ], - "$id": "https://example.com/ProductSetImageLabelAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetImageLabelAction.schema.json" } diff --git a/json-schemas/ProductSetKeyAction.schema.json b/json-schemas/ProductSetKeyAction.schema.json index 35193761..6a8a01c8 100644 --- a/json-schemas/ProductSetKeyAction.schema.json +++ b/json-schemas/ProductSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetKeyAction.schema.json" } diff --git a/json-schemas/ProductSetMetaDescriptionAction.schema.json b/json-schemas/ProductSetMetaDescriptionAction.schema.json index eed7a750..574de07a 100644 --- a/json-schemas/ProductSetMetaDescriptionAction.schema.json +++ b/json-schemas/ProductSetMetaDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetMetaDescriptionAction", "type": "object", @@ -9,5 +9,5 @@ "staged": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/ProductSetMetaDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetMetaDescriptionAction.schema.json" } diff --git a/json-schemas/ProductSetMetaKeywordsAction.schema.json b/json-schemas/ProductSetMetaKeywordsAction.schema.json index 24954514..d4885169 100644 --- a/json-schemas/ProductSetMetaKeywordsAction.schema.json +++ b/json-schemas/ProductSetMetaKeywordsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetMetaKeywordsAction", "type": "object", @@ -9,5 +9,5 @@ "staged": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/ProductSetMetaKeywordsAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetMetaKeywordsAction.schema.json" } diff --git a/json-schemas/ProductSetMetaTitleAction.schema.json b/json-schemas/ProductSetMetaTitleAction.schema.json index b41a0df4..33468e46 100644 --- a/json-schemas/ProductSetMetaTitleAction.schema.json +++ b/json-schemas/ProductSetMetaTitleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetMetaTitleAction", "type": "object", @@ -9,5 +9,5 @@ "staged": {"type": "boolean"} }, "required": ["action"], - "$id": "https://example.com/ProductSetMetaTitleAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetMetaTitleAction.schema.json" } diff --git a/json-schemas/ProductSetPriceModeAction.schema.json b/json-schemas/ProductSetPriceModeAction.schema.json new file mode 100644 index 00000000..745e36e2 --- /dev/null +++ b/json-schemas/ProductSetPriceModeAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProductSetPriceModeAction", + "type": "object", + "properties": { + "priceMode": {"$ref": "ProductPriceModeEnumEnum.schema.json"}, + "action": {"enum": ["setPriceMode"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/ProductSetPriceModeAction.schema.json" +} diff --git a/json-schemas/ProductSetPricesAction.schema.json b/json-schemas/ProductSetPricesAction.schema.json index 747f7a38..ac52ca32 100644 --- a/json-schemas/ProductSetPricesAction.schema.json +++ b/json-schemas/ProductSetPricesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetPricesAction", "type": "object", @@ -17,5 +17,5 @@ "action", "prices" ], - "$id": "https://example.com/ProductSetPricesAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetPricesAction.schema.json" } diff --git a/json-schemas/ProductSetProductPriceCustomFieldAction.schema.json b/json-schemas/ProductSetProductPriceCustomFieldAction.schema.json index b306cdd0..a8240006 100644 --- a/json-schemas/ProductSetProductPriceCustomFieldAction.schema.json +++ b/json-schemas/ProductSetProductPriceCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetProductPriceCustomFieldAction", "type": "object", @@ -22,5 +22,5 @@ "priceId", "name" ], - "$id": "https://example.com/ProductSetProductPriceCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetProductPriceCustomFieldAction.schema.json" } diff --git a/json-schemas/ProductSetProductPriceCustomTypeAction.schema.json b/json-schemas/ProductSetProductPriceCustomTypeAction.schema.json index e26e8ce3..661a6385 100644 --- a/json-schemas/ProductSetProductPriceCustomTypeAction.schema.json +++ b/json-schemas/ProductSetProductPriceCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetProductPriceCustomTypeAction", "type": "object", @@ -14,5 +14,5 @@ "action", "priceId" ], - "$id": "https://example.com/ProductSetProductPriceCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetProductPriceCustomTypeAction.schema.json" } diff --git a/json-schemas/ProductSetProductVariantKeyAction.schema.json b/json-schemas/ProductSetProductVariantKeyAction.schema.json index f919234e..b45403e5 100644 --- a/json-schemas/ProductSetProductVariantKeyAction.schema.json +++ b/json-schemas/ProductSetProductVariantKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetProductVariantKeyAction", "type": "object", @@ -11,5 +11,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductSetProductVariantKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetProductVariantKeyAction.schema.json" } diff --git a/json-schemas/ProductSetSearchKeywordsAction.schema.json b/json-schemas/ProductSetSearchKeywordsAction.schema.json index 90fd0c0d..412a6c6d 100644 --- a/json-schemas/ProductSetSearchKeywordsAction.schema.json +++ b/json-schemas/ProductSetSearchKeywordsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetSearchKeywordsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "searchKeywords" ], - "$id": "https://example.com/ProductSetSearchKeywordsAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetSearchKeywordsAction.schema.json" } diff --git a/json-schemas/ProductSetSkuAction.schema.json b/json-schemas/ProductSetSkuAction.schema.json index 94f05dbd..4fb17c65 100644 --- a/json-schemas/ProductSetSkuAction.schema.json +++ b/json-schemas/ProductSetSkuAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetSkuAction", "type": "object", @@ -13,5 +13,5 @@ "action", "variantId" ], - "$id": "https://example.com/ProductSetSkuAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetSkuAction.schema.json" } diff --git a/json-schemas/ProductSetTaxCategoryAction.schema.json b/json-schemas/ProductSetTaxCategoryAction.schema.json index 2508bdd2..34d46e64 100644 --- a/json-schemas/ProductSetTaxCategoryAction.schema.json +++ b/json-schemas/ProductSetTaxCategoryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSetTaxCategoryAction", "type": "object", @@ -8,5 +8,5 @@ "taxCategory": {"$ref": "TaxCategoryResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ProductSetTaxCategoryAction.schema.json" + "$id": "https://api.commercetools.com/ProductSetTaxCategoryAction.schema.json" } diff --git a/json-schemas/ProductSlugChangedMessage.schema.json b/json-schemas/ProductSlugChangedMessage.schema.json index 771e78a5..00e5c742 100644 --- a/json-schemas/ProductSlugChangedMessage.schema.json +++ b/json-schemas/ProductSlugChangedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSlugChangedMessage", "type": "object", @@ -35,5 +35,5 @@ "type", "slug" ], - "$id": "https://example.com/ProductSlugChangedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductSlugChangedMessage.schema.json" } diff --git a/json-schemas/ProductSlugChangedMessagePayload.schema.json b/json-schemas/ProductSlugChangedMessagePayload.schema.json index e2728cf3..0fdb8b61 100644 --- a/json-schemas/ProductSlugChangedMessagePayload.schema.json +++ b/json-schemas/ProductSlugChangedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductSlugChangedMessagePayload", "type": "object", @@ -12,5 +12,5 @@ "type", "slug" ], - "$id": "https://example.com/ProductSlugChangedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductSlugChangedMessagePayload.schema.json" } diff --git a/json-schemas/ProductStateTransitionMessage.schema.json b/json-schemas/ProductStateTransitionMessage.schema.json index 7e6c2786..e91fc691 100644 --- a/json-schemas/ProductStateTransitionMessage.schema.json +++ b/json-schemas/ProductStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductStateTransitionMessage", "type": "object", @@ -36,5 +36,5 @@ "state", "force" ], - "$id": "https://example.com/ProductStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/ProductStateTransitionMessage.schema.json" } diff --git a/json-schemas/ProductStateTransitionMessagePayload.schema.json b/json-schemas/ProductStateTransitionMessagePayload.schema.json index d395c0e7..64384dcd 100644 --- a/json-schemas/ProductStateTransitionMessagePayload.schema.json +++ b/json-schemas/ProductStateTransitionMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductStateTransitionMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "state", "force" ], - "$id": "https://example.com/ProductStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/ProductTransitionStateAction.schema.json b/json-schemas/ProductTransitionStateAction.schema.json index 812bacea..2ac56882 100644 --- a/json-schemas/ProductTransitionStateAction.schema.json +++ b/json-schemas/ProductTransitionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTransitionStateAction", "type": "object", @@ -9,5 +9,5 @@ "state": {"$ref": "StateResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ProductTransitionStateAction.schema.json" + "$id": "https://api.commercetools.com/ProductTransitionStateAction.schema.json" } diff --git a/json-schemas/ProductType.schema.json b/json-schemas/ProductType.schema.json index dffe8fab..875ed917 100644 --- a/json-schemas/ProductType.schema.json +++ b/json-schemas/ProductType.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductType", "type": "object", @@ -32,5 +32,5 @@ "name", "description" ], - "$id": "https://example.com/ProductType.schema.json" + "$id": "https://api.commercetools.com/ProductType.schema.json" } diff --git a/json-schemas/ProductTypeAddAttributeDefinitionAction.schema.json b/json-schemas/ProductTypeAddAttributeDefinitionAction.schema.json index c1743b7a..afa2036c 100644 --- a/json-schemas/ProductTypeAddAttributeDefinitionAction.schema.json +++ b/json-schemas/ProductTypeAddAttributeDefinitionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeAddAttributeDefinitionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "attribute" ], - "$id": "https://example.com/ProductTypeAddAttributeDefinitionAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeAddAttributeDefinitionAction.schema.json" } diff --git a/json-schemas/ProductTypeAddLocalizedEnumValueAction.schema.json b/json-schemas/ProductTypeAddLocalizedEnumValueAction.schema.json index 00ddd252..2254070e 100644 --- a/json-schemas/ProductTypeAddLocalizedEnumValueAction.schema.json +++ b/json-schemas/ProductTypeAddLocalizedEnumValueAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Adds a localizable enum to the values of [AttributeLocalizedEnumType](ctp:api:type:AttributeLocalizedEnumType). It can update an AttributeLocalizedEnumType AttributeDefinition or an [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeLocalizedEnumType AttributeDefinition.", "additionalProperties": false, "title": "ProductTypeAddLocalizedEnumValueAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "value" ], - "$id": "https://example.com/ProductTypeAddLocalizedEnumValueAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeAddLocalizedEnumValueAction.schema.json" } diff --git a/json-schemas/ProductTypeAddPlainEnumValueAction.schema.json b/json-schemas/ProductTypeAddPlainEnumValueAction.schema.json index 8eb692e2..1c391794 100644 --- a/json-schemas/ProductTypeAddPlainEnumValueAction.schema.json +++ b/json-schemas/ProductTypeAddPlainEnumValueAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Adds an enum to the values of [AttributeEnumType](ctp:api:type:AttributeEnumType) AttributeDefinition, or [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType AttributeDefinition.", "additionalProperties": false, "title": "ProductTypeAddPlainEnumValueAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "value" ], - "$id": "https://example.com/ProductTypeAddPlainEnumValueAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeAddPlainEnumValueAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeAttributeConstraintAction.schema.json b/json-schemas/ProductTypeChangeAttributeConstraintAction.schema.json index 73a5670e..4e2494ee 100644 --- a/json-schemas/ProductTypeChangeAttributeConstraintAction.schema.json +++ b/json-schemas/ProductTypeChangeAttributeConstraintAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the `attributeConstraint` of an [AttributeDefinition](ctp:api:type:AttributeDefinition). For now only following changes are supported: `SameForAll` to `None` and `Unique` to `None`.", "additionalProperties": false, "title": "ProductTypeChangeAttributeConstraintAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "newValue" ], - "$id": "https://example.com/ProductTypeChangeAttributeConstraintAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeAttributeConstraintAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeAttributeNameAction.schema.json b/json-schemas/ProductTypeChangeAttributeNameAction.schema.json index 51c8e952..be3a036f 100644 --- a/json-schemas/ProductTypeChangeAttributeNameAction.schema.json +++ b/json-schemas/ProductTypeChangeAttributeNameAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Renames an AttributeDefinition and also renames all corresponding Attributes on all [Products](/projects/products) with this ProductType. The renaming of the Attributes is [eventually consistent](/general-concepts#eventual-consistency).", "additionalProperties": false, "title": "ProductTypeChangeAttributeNameAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "newAttributeName" ], - "$id": "https://example.com/ProductTypeChangeAttributeNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeAttributeNameAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeAttributeOrderAction.schema.json b/json-schemas/ProductTypeChangeAttributeOrderAction.schema.json index d61ee0ec..927151af 100644 --- a/json-schemas/ProductTypeChangeAttributeOrderAction.schema.json +++ b/json-schemas/ProductTypeChangeAttributeOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeChangeAttributeOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "attributes" ], - "$id": "https://example.com/ProductTypeChangeAttributeOrderAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeAttributeOrderAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeAttributeOrderByNameAction.schema.json b/json-schemas/ProductTypeChangeAttributeOrderByNameAction.schema.json index 86fb12ec..e8529ea2 100644 --- a/json-schemas/ProductTypeChangeAttributeOrderByNameAction.schema.json +++ b/json-schemas/ProductTypeChangeAttributeOrderByNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeChangeAttributeOrderByNameAction", "type": "object", @@ -14,5 +14,5 @@ "action", "attributeNames" ], - "$id": "https://example.com/ProductTypeChangeAttributeOrderByNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeAttributeOrderByNameAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeDescriptionAction.schema.json b/json-schemas/ProductTypeChangeDescriptionAction.schema.json index e86454e7..d38c9fb6 100644 --- a/json-schemas/ProductTypeChangeDescriptionAction.schema.json +++ b/json-schemas/ProductTypeChangeDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeChangeDescriptionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "description" ], - "$id": "https://example.com/ProductTypeChangeDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeDescriptionAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeEnumKeyAction.schema.json b/json-schemas/ProductTypeChangeEnumKeyAction.schema.json index 9c6a50e5..055ad9f1 100644 --- a/json-schemas/ProductTypeChangeEnumKeyAction.schema.json +++ b/json-schemas/ProductTypeChangeEnumKeyAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the key of a single enum `value` in an [AttributeEnumType](ctp:api:type:AttributeEnumType) AttributeDefinition, [AttributeLocalizedEnumType](ctp:api:type:AttributeLocalizedEnumType) AttributeDefinition, [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType AttributeDefinition, or AttributeSetType of AttributeLocalizedEnumType AttributeDefinition.\n\nAll Products will be updated to the new key in an [eventually consistent](/general-concepts#eventual-consistency) way.", "additionalProperties": false, "title": "ProductTypeChangeEnumKeyAction", "type": "object", @@ -15,5 +16,5 @@ "key", "newKey" ], - "$id": "https://example.com/ProductTypeChangeEnumKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeEnumKeyAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeInputHintAction.schema.json b/json-schemas/ProductTypeChangeInputHintAction.schema.json index 3e8f323d..20bf0bf9 100644 --- a/json-schemas/ProductTypeChangeInputHintAction.schema.json +++ b/json-schemas/ProductTypeChangeInputHintAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the `inputHint` of an [AttributeDefinition](ctp:api:type:AttributeDefinition).", "additionalProperties": false, "title": "ProductTypeChangeInputHintAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "newValue" ], - "$id": "https://example.com/ProductTypeChangeInputHintAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeInputHintAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeIsSearchableAction.schema.json b/json-schemas/ProductTypeChangeIsSearchableAction.schema.json index ec492671..e76d3e25 100644 --- a/json-schemas/ProductTypeChangeIsSearchableAction.schema.json +++ b/json-schemas/ProductTypeChangeIsSearchableAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Following this update the Products are reindexed asynchronously to reflect this change on the search endpoint. When enabling search on an existing Attribute type definition, the constraint regarding the maximum size of a searchable Attribute will not be enforced. Instead, Product AttributeDefinitions exceeding this limit will be treated as not searchable and will not be available for full-text search.", "additionalProperties": false, "title": "ProductTypeChangeIsSearchableAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "isSearchable" ], - "$id": "https://example.com/ProductTypeChangeIsSearchableAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeIsSearchableAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeLabelAction.schema.json b/json-schemas/ProductTypeChangeLabelAction.schema.json index ed61d208..fa651700 100644 --- a/json-schemas/ProductTypeChangeLabelAction.schema.json +++ b/json-schemas/ProductTypeChangeLabelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeChangeLabelAction", "type": "object", @@ -13,5 +13,5 @@ "attributeName", "label" ], - "$id": "https://example.com/ProductTypeChangeLabelAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeLabelAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json b/json-schemas/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json index a0e42e39..226a3499 100644 --- a/json-schemas/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json +++ b/json-schemas/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the label of a single enum `value` in an [AttributeLocalizedEnumType](ctp:api:type:AttributeLocalizedEnumType) AttributeDefinition, or [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeLocalizedEnumType AttributeDefinition.\n\nAll Products will be updated to the new label in an [eventually consistent](/general-concepts#eventual-consistency) way.", "additionalProperties": false, "title": "ProductTypeChangeLocalizedEnumValueLabelAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "newValue" ], - "$id": "https://example.com/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json b/json-schemas/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json index 359d39e2..47f75c4b 100644 --- a/json-schemas/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json +++ b/json-schemas/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the order of localized enum `values` in an [AttributeLocalizedEnumType](ctp:api:type:AttributeLocalizedEnumType) AttributeDefinition. It can update an AttributeLocalizedEnumType AttributeDefinition or an [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeLocalizedEnumType AttributeDefinition.", "additionalProperties": false, "title": "ProductTypeChangeLocalizedEnumValueOrderAction", "type": "object", @@ -16,5 +17,5 @@ "attributeName", "values" ], - "$id": "https://example.com/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json" } diff --git a/json-schemas/ProductTypeChangeNameAction.schema.json b/json-schemas/ProductTypeChangeNameAction.schema.json index 4037fe64..519d2a0c 100644 --- a/json-schemas/ProductTypeChangeNameAction.schema.json +++ b/json-schemas/ProductTypeChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ProductTypeChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangeNameAction.schema.json" } diff --git a/json-schemas/ProductTypeChangePlainEnumValueLabelAction.schema.json b/json-schemas/ProductTypeChangePlainEnumValueLabelAction.schema.json index 5e65f41e..a599069a 100644 --- a/json-schemas/ProductTypeChangePlainEnumValueLabelAction.schema.json +++ b/json-schemas/ProductTypeChangePlainEnumValueLabelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the label of a single enum `value` in an [AttributeEnumType](ctp:api:type:AttributeEnumType) AttributeDefinition, or [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType AttributeDefinition.\n\nAll Products will be updated to the new label in an [eventually consistent](/general-concepts#eventual-consistency) way.", "additionalProperties": false, "title": "ProductTypeChangePlainEnumValueLabelAction", "type": "object", @@ -13,5 +14,5 @@ "attributeName", "newValue" ], - "$id": "https://example.com/ProductTypeChangePlainEnumValueLabelAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangePlainEnumValueLabelAction.schema.json" } diff --git a/json-schemas/ProductTypeChangePlainEnumValueOrderAction.schema.json b/json-schemas/ProductTypeChangePlainEnumValueOrderAction.schema.json index a8631358..377169ac 100644 --- a/json-schemas/ProductTypeChangePlainEnumValueOrderAction.schema.json +++ b/json-schemas/ProductTypeChangePlainEnumValueOrderAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Updates the order of enum `values` in an [AttributeEnumType](ctp:api:type:AttributeEnumType) AttributeDefinition. It can update an AttributeEnumType AttributeDefinition or an [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType AttributeDefinition.", "additionalProperties": false, "title": "ProductTypeChangePlainEnumValueOrderAction", "type": "object", @@ -16,5 +17,5 @@ "attributeName", "values" ], - "$id": "https://example.com/ProductTypeChangePlainEnumValueOrderAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeChangePlainEnumValueOrderAction.schema.json" } diff --git a/json-schemas/ProductTypeDraft.schema.json b/json-schemas/ProductTypeDraft.schema.json index b976e567..476d2342 100644 --- a/json-schemas/ProductTypeDraft.schema.json +++ b/json-schemas/ProductTypeDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeDraft", "type": "object", @@ -16,5 +16,5 @@ "name", "description" ], - "$id": "https://example.com/ProductTypeDraft.schema.json" + "$id": "https://api.commercetools.com/ProductTypeDraft.schema.json" } diff --git a/json-schemas/ProductTypePagedQueryResponse.schema.json b/json-schemas/ProductTypePagedQueryResponse.schema.json index 14d62822..b2ae42ec 100644 --- a/json-schemas/ProductTypePagedQueryResponse.schema.json +++ b/json-schemas/ProductTypePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [ProductType](ctp:api:type:ProductType).", "additionalProperties": false, "title": "ProductTypePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ProductTypePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ProductTypePagedQueryResponse.schema.json" } diff --git a/json-schemas/ProductTypeReference.schema.json b/json-schemas/ProductTypeReference.schema.json index bbf245df..29769ecc 100644 --- a/json-schemas/ProductTypeReference.schema.json +++ b/json-schemas/ProductTypeReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [ProductType](ctp:api:type:ProductType).", "additionalProperties": false, "title": "ProductTypeReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ProductTypeReference.schema.json" + "$id": "https://api.commercetools.com/ProductTypeReference.schema.json" } diff --git a/json-schemas/ProductTypeRemoveAttributeDefinitionAction.schema.json b/json-schemas/ProductTypeRemoveAttributeDefinitionAction.schema.json index c2dbec5d..1856af5b 100644 --- a/json-schemas/ProductTypeRemoveAttributeDefinitionAction.schema.json +++ b/json-schemas/ProductTypeRemoveAttributeDefinitionAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Removes an AttributeDefinition and also deletes all corresponding Attributes on all [Products](/projects/products) with this ProductType. The removal of the Attributes is [eventually consistent](/general-concepts#eventual-consistency).\n\nThe `CombinationUnique` constraint is not checked when an Attribute is removed, and uniqueness violations may occur when you remove an Attribute with a `CombinationUnique` constraint.", "additionalProperties": false, "title": "ProductTypeRemoveAttributeDefinitionAction", "type": "object", @@ -11,5 +12,5 @@ "action", "name" ], - "$id": "https://example.com/ProductTypeRemoveAttributeDefinitionAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeRemoveAttributeDefinitionAction.schema.json" } diff --git a/json-schemas/ProductTypeRemoveEnumValuesAction.schema.json b/json-schemas/ProductTypeRemoveEnumValuesAction.schema.json index 6ac8a8b8..9ea33a08 100644 --- a/json-schemas/ProductTypeRemoveEnumValuesAction.schema.json +++ b/json-schemas/ProductTypeRemoveEnumValuesAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Removes enum values from an AttributeDefinition of [AttributeEnumType](ctp:api:type:AttributeEnumType), [AttributeLocalizedEnumType](ctp:api:type:AttributeLocalizedEnumType), [AttributeSetType](ctp:api:type:AttributeSetType) of AttributeEnumType, or AttributeSetType of AttributeLocalizedEnumType.\n\nIf the Attribute is **not** required, the Attributes of all Products using those enum keys will also be removed in an [eventually consistent](/general-concepts#eventual-consistency) way. If the Attribute is required, the operation will fail with the [EnumValueIsUsed](/errors#product-types-400-enum-value-is-used) error code.", "additionalProperties": false, "title": "ProductTypeRemoveEnumValuesAction", "type": "object", @@ -16,5 +17,5 @@ "attributeName", "keys" ], - "$id": "https://example.com/ProductTypeRemoveEnumValuesAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeRemoveEnumValuesAction.schema.json" } diff --git a/json-schemas/ProductTypeResourceIdentifier.schema.json b/json-schemas/ProductTypeResourceIdentifier.schema.json index 34c7ce1b..1463a2ef 100644 --- a/json-schemas/ProductTypeResourceIdentifier.schema.json +++ b/json-schemas/ProductTypeResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductType](ctp:api:type:ProductType).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ProductTypeResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ProductTypeResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ProductTypeResourceIdentifier.schema.json" } diff --git a/json-schemas/ProductTypeSetInputTipAction.schema.json b/json-schemas/ProductTypeSetInputTipAction.schema.json index 8c614643..be5b16f4 100644 --- a/json-schemas/ProductTypeSetInputTipAction.schema.json +++ b/json-schemas/ProductTypeSetInputTipAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeSetInputTipAction", "type": "object", @@ -12,5 +12,5 @@ "action", "attributeName" ], - "$id": "https://example.com/ProductTypeSetInputTipAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeSetInputTipAction.schema.json" } diff --git a/json-schemas/ProductTypeSetKeyAction.schema.json b/json-schemas/ProductTypeSetKeyAction.schema.json index 84191e60..b721d062 100644 --- a/json-schemas/ProductTypeSetKeyAction.schema.json +++ b/json-schemas/ProductTypeSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ProductTypeSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ProductTypeSetKeyAction.schema.json" } diff --git a/json-schemas/ProductTypeUpdate.schema.json b/json-schemas/ProductTypeUpdate.schema.json index 6fc3b769..d79018af 100644 --- a/json-schemas/ProductTypeUpdate.schema.json +++ b/json-schemas/ProductTypeUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ProductTypeUpdate.schema.json" + "$id": "https://api.commercetools.com/ProductTypeUpdate.schema.json" } diff --git a/json-schemas/ProductTypeUpdateAction.schema.json b/json-schemas/ProductTypeUpdateAction.schema.json index 07c602af..8c6f8c7c 100644 --- a/json-schemas/ProductTypeUpdateAction.schema.json +++ b/json-schemas/ProductTypeUpdateAction.schema.json @@ -1,33 +1,55 @@ { "oneOf": [ - {"$ref": "https://example.com/ProductTypeAddAttributeDefinitionAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeAddLocalizedEnumValueAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeAddPlainEnumValueAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeAttributeConstraintAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeAttributeNameAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeAttributeOrderAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeAttributeOrderByNameAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeEnumKeyAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeInputHintAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeIsSearchableAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeLabelAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangePlainEnumValueLabelAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeChangePlainEnumValueOrderAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeRemoveAttributeDefinitionAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeRemoveEnumValuesAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeSetInputTipAction.schema.json"}, - {"$ref": "https://example.com/ProductTypeSetKeyAction.schema.json"} + {"$ref": "https://api.commercetools.com/ProductTypeAddAttributeDefinitionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeAddLocalizedEnumValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeAddPlainEnumValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeAttributeConstraintAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeAttributeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeAttributeOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeAttributeOrderByNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeEnumKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeInputHintAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeIsSearchableAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeLocalizedEnumValueLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeLocalizedEnumValueOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangePlainEnumValueLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeChangePlainEnumValueOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeRemoveAttributeDefinitionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeRemoveEnumValuesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeSetInputTipAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeSetKeyAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductTypeUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addAttributeDefinition", + "addLocalizedEnumValue", + "addPlainEnumValue", + "changeAttributeConstraint", + "changeAttributeName", + "changeAttributeOrder", + "changeAttributeOrderByName", + "changeDescription", + "changeEnumKey", + "changeInputHint", + "changeIsSearchable", + "changeLabel", + "changeLocalizedEnumValueLabel", + "changeLocalizedEnumValueOrder", + "changeName", + "changePlainEnumValueLabel", + "changePlainEnumValueOrder", + "removeAttributeDefinition", + "removeEnumValues", + "setInputTip", + "setKey" + ]}}, "required": ["action"], - "$id": "https://example.com/ProductTypeUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ProductTypeUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ProductUnpublishAction.schema.json b/json-schemas/ProductUnpublishAction.schema.json index f7cd8eb7..e5d951a5 100644 --- a/json-schemas/ProductUnpublishAction.schema.json +++ b/json-schemas/ProductUnpublishAction.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductUnpublishAction", "type": "object", "properties": {"action": {"enum": ["unpublish"]}}, "required": ["action"], - "$id": "https://example.com/ProductUnpublishAction.schema.json" + "$id": "https://api.commercetools.com/ProductUnpublishAction.schema.json" } diff --git a/json-schemas/ProductUnpublishedMessage.schema.json b/json-schemas/ProductUnpublishedMessage.schema.json index 4852aa18..c6865ef5 100644 --- a/json-schemas/ProductUnpublishedMessage.schema.json +++ b/json-schemas/ProductUnpublishedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductUnpublishedMessage", "type": "object", @@ -32,5 +32,5 @@ "resourceVersion", "type" ], - "$id": "https://example.com/ProductUnpublishedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductUnpublishedMessage.schema.json" } diff --git a/json-schemas/ProductUnpublishedMessagePayload.schema.json b/json-schemas/ProductUnpublishedMessagePayload.schema.json index 63e0e35b..521f5732 100644 --- a/json-schemas/ProductUnpublishedMessagePayload.schema.json +++ b/json-schemas/ProductUnpublishedMessagePayload.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductUnpublishedMessagePayload", "type": "object", "properties": {"type": {"enum": ["ProductUnpublished"]}}, "required": ["type"], - "$id": "https://example.com/ProductUnpublishedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductUnpublishedMessagePayload.schema.json" } diff --git a/json-schemas/ProductUpdate.schema.json b/json-schemas/ProductUpdate.schema.json index 8230d33a..fbb1f6cd 100644 --- a/json-schemas/ProductUpdate.schema.json +++ b/json-schemas/ProductUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ProductUpdate.schema.json" + "$id": "https://api.commercetools.com/ProductUpdate.schema.json" } diff --git a/json-schemas/ProductUpdateAction.schema.json b/json-schemas/ProductUpdateAction.schema.json index 5e8de720..c36ace76 100644 --- a/json-schemas/ProductUpdateAction.schema.json +++ b/json-schemas/ProductUpdateAction.schema.json @@ -1,58 +1,107 @@ { "oneOf": [ - {"$ref": "https://example.com/ProductAddAssetAction.schema.json"}, - {"$ref": "https://example.com/ProductAddExternalImageAction.schema.json"}, - {"$ref": "https://example.com/ProductAddPriceAction.schema.json"}, - {"$ref": "https://example.com/ProductAddToCategoryAction.schema.json"}, - {"$ref": "https://example.com/ProductAddVariantAction.schema.json"}, - {"$ref": "https://example.com/ProductChangeAssetNameAction.schema.json"}, - {"$ref": "https://example.com/ProductChangeAssetOrderAction.schema.json"}, - {"$ref": "https://example.com/ProductChangeMasterVariantAction.schema.json"}, - {"$ref": "https://example.com/ProductChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ProductChangePriceAction.schema.json"}, - {"$ref": "https://example.com/ProductChangeSlugAction.schema.json"}, - {"$ref": "https://example.com/ProductLegacySetSkuAction.schema.json"}, - {"$ref": "https://example.com/ProductMoveImageToPositionAction.schema.json"}, - {"$ref": "https://example.com/ProductPublishAction.schema.json"}, - {"$ref": "https://example.com/ProductRemoveAssetAction.schema.json"}, - {"$ref": "https://example.com/ProductRemoveFromCategoryAction.schema.json"}, - {"$ref": "https://example.com/ProductRemoveImageAction.schema.json"}, - {"$ref": "https://example.com/ProductRemovePriceAction.schema.json"}, - {"$ref": "https://example.com/ProductRemoveVariantAction.schema.json"}, - {"$ref": "https://example.com/ProductRevertStagedChangesAction.schema.json"}, - {"$ref": "https://example.com/ProductRevertStagedVariantChangesAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetKeyAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetSourcesAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAssetTagsAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAttributeAction.schema.json"}, - {"$ref": "https://example.com/ProductSetAttributeInAllVariantsAction.schema.json"}, - {"$ref": "https://example.com/ProductSetCategoryOrderHintAction.schema.json"}, - {"$ref": "https://example.com/ProductSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ProductSetDiscountedPriceAction.schema.json"}, - {"$ref": "https://example.com/ProductSetImageLabelAction.schema.json"}, - {"$ref": "https://example.com/ProductSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ProductSetMetaDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ProductSetMetaKeywordsAction.schema.json"}, - {"$ref": "https://example.com/ProductSetMetaTitleAction.schema.json"}, - {"$ref": "https://example.com/ProductSetPricesAction.schema.json"}, - {"$ref": "https://example.com/ProductSetProductPriceCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ProductSetProductPriceCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ProductSetProductVariantKeyAction.schema.json"}, - {"$ref": "https://example.com/ProductSetSearchKeywordsAction.schema.json"}, - {"$ref": "https://example.com/ProductSetSkuAction.schema.json"}, - {"$ref": "https://example.com/ProductSetTaxCategoryAction.schema.json"}, - {"$ref": "https://example.com/ProductTransitionStateAction.schema.json"}, - {"$ref": "https://example.com/ProductUnpublishAction.schema.json"} + {"$ref": "https://api.commercetools.com/ProductAddAssetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddExternalImageAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddToCategoryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductAddVariantAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangeAssetNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangeAssetOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangeMasterVariantAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangePriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductChangeSlugAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductLegacySetSkuAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductMoveImageToPositionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductPublishAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemoveAssetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemoveFromCategoryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemoveImageAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemovePriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRemoveVariantAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRevertStagedChangesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductRevertStagedVariantChangesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetSourcesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAssetTagsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAttributeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetAttributeInAllVariantsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetCategoryOrderHintAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetDiscountedPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetImageLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetMetaDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetMetaKeywordsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetMetaTitleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetPriceModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetPricesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetProductPriceCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetProductPriceCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetProductVariantKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetSearchKeywordsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetSkuAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSetTaxCategoryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTransitionStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductUnpublishAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addAsset", + "addExternalImage", + "addPrice", + "addToCategory", + "addVariant", + "changeAssetName", + "changeAssetOrder", + "changeMasterVariant", + "changeName", + "changePrice", + "changeSlug", + "legacySetSku", + "moveImageToPosition", + "publish", + "removeAsset", + "removeFromCategory", + "removeImage", + "removePrice", + "removeVariant", + "revertStagedChanges", + "revertStagedVariantChanges", + "setAssetCustomField", + "setAssetCustomType", + "setAssetDescription", + "setAssetKey", + "setAssetSources", + "setAssetTags", + "setAttribute", + "setAttributeInAllVariants", + "setCategoryOrderHint", + "setDescription", + "setDiscountedPrice", + "setImageLabel", + "setKey", + "setMetaDescription", + "setMetaKeywords", + "setMetaTitle", + "setPriceMode", + "setPrices", + "setProductPriceCustomField", + "setProductPriceCustomType", + "setProductVariantKey", + "setSearchKeywords", + "setSku", + "setTaxCategory", + "transitionState", + "unpublish" + ]}}, "required": ["action"], - "$id": "https://example.com/ProductUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ProductUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ProductVariant.schema.json b/json-schemas/ProductVariant.schema.json index 713c6981..b0874e04 100644 --- a/json-schemas/ProductVariant.schema.json +++ b/json-schemas/ProductVariant.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariant", "type": "object", @@ -30,5 +30,5 @@ "key": {"type": "string"} }, "required": ["id"], - "$id": "https://example.com/ProductVariant.schema.json" + "$id": "https://api.commercetools.com/ProductVariant.schema.json" } diff --git a/json-schemas/ProductVariantAddedMessage.schema.json b/json-schemas/ProductVariantAddedMessage.schema.json index f9f1f27b..dab61b94 100644 --- a/json-schemas/ProductVariantAddedMessage.schema.json +++ b/json-schemas/ProductVariantAddedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariantAddedMessage", "type": "object", @@ -36,5 +36,5 @@ "variant", "staged" ], - "$id": "https://example.com/ProductVariantAddedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductVariantAddedMessage.schema.json" } diff --git a/json-schemas/ProductVariantAddedMessagePayload.schema.json b/json-schemas/ProductVariantAddedMessagePayload.schema.json index 20ccdbee..edef38dc 100644 --- a/json-schemas/ProductVariantAddedMessagePayload.schema.json +++ b/json-schemas/ProductVariantAddedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariantAddedMessagePayload", "type": "object", @@ -13,5 +13,5 @@ "variant", "staged" ], - "$id": "https://example.com/ProductVariantAddedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductVariantAddedMessagePayload.schema.json" } diff --git a/json-schemas/ProductVariantAvailability.schema.json b/json-schemas/ProductVariantAvailability.schema.json index b4cfb85d..79f8d56b 100644 --- a/json-schemas/ProductVariantAvailability.schema.json +++ b/json-schemas/ProductVariantAvailability.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ProductVariantAvailability", "type": "object", "properties": { @@ -9,5 +9,5 @@ "channels": {"$ref": "ProductVariantChannelAvailabilityMap.schema.json"}, "isOnStock": {"type": "boolean"} }, - "$id": "https://example.com/ProductVariantAvailability.schema.json" + "$id": "https://api.commercetools.com/ProductVariantAvailability.schema.json" } diff --git a/json-schemas/ProductVariantChannelAvailability.schema.json b/json-schemas/ProductVariantChannelAvailability.schema.json index 76d94f11..4c3f0dad 100644 --- a/json-schemas/ProductVariantChannelAvailability.schema.json +++ b/json-schemas/ProductVariantChannelAvailability.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ProductVariantChannelAvailability", "type": "object", "properties": { @@ -8,5 +8,5 @@ "availableQuantity": {"type": "number"}, "isOnStock": {"type": "boolean"} }, - "$id": "https://example.com/ProductVariantChannelAvailability.schema.json" + "$id": "https://api.commercetools.com/ProductVariantChannelAvailability.schema.json" } diff --git a/json-schemas/ProductVariantChannelAvailabilityMap.schema.json b/json-schemas/ProductVariantChannelAvailabilityMap.schema.json index 1f7766cc..4dd869ab 100644 --- a/json-schemas/ProductVariantChannelAvailabilityMap.schema.json +++ b/json-schemas/ProductVariantChannelAvailabilityMap.schema.json @@ -1,9 +1,9 @@ { "patternProperties": {"": {"$ref": "ProductVariantChannelAvailability.schema.json"}}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariantChannelAvailabilityMap", "type": "object", "properties": {}, - "$id": "https://example.com/ProductVariantChannelAvailabilityMap.schema.json" + "$id": "https://api.commercetools.com/ProductVariantChannelAvailabilityMap.schema.json" } diff --git a/json-schemas/ProductVariantDeletedMessage.schema.json b/json-schemas/ProductVariantDeletedMessage.schema.json index 605c9cc3..6c7917c1 100644 --- a/json-schemas/ProductVariantDeletedMessage.schema.json +++ b/json-schemas/ProductVariantDeletedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariantDeletedMessage", "type": "object", @@ -39,5 +39,5 @@ "variant", "removedImageUrls" ], - "$id": "https://example.com/ProductVariantDeletedMessage.schema.json" + "$id": "https://api.commercetools.com/ProductVariantDeletedMessage.schema.json" } diff --git a/json-schemas/ProductVariantDeletedMessagePayload.schema.json b/json-schemas/ProductVariantDeletedMessagePayload.schema.json index bf2e8f28..e8fa837b 100644 --- a/json-schemas/ProductVariantDeletedMessagePayload.schema.json +++ b/json-schemas/ProductVariantDeletedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProductVariantDeletedMessagePayload", "type": "object", @@ -16,5 +16,5 @@ "variant", "removedImageUrls" ], - "$id": "https://example.com/ProductVariantDeletedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ProductVariantDeletedMessagePayload.schema.json" } diff --git a/json-schemas/ProductVariantDraft.schema.json b/json-schemas/ProductVariantDraft.schema.json index faf7c3ec..2008a08b 100644 --- a/json-schemas/ProductVariantDraft.schema.json +++ b/json-schemas/ProductVariantDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ProductVariantDraft", "type": "object", "properties": { @@ -23,5 +23,5 @@ }, "key": {"type": "string"} }, - "$id": "https://example.com/ProductVariantDraft.schema.json" + "$id": "https://api.commercetools.com/ProductVariantDraft.schema.json" } diff --git a/json-schemas/ProductVariantImportDraft.schema.json b/json-schemas/ProductVariantImportDraft.schema.json index 7b502d68..b66a3dd0 100644 --- a/json-schemas/ProductVariantImportDraft.schema.json +++ b/json-schemas/ProductVariantImportDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ProductVariantImportDraft", "type": "object", "properties": { @@ -19,5 +19,5 @@ "items": {"$ref": "PriceDraft.schema.json"} } }, - "$id": "https://example.com/ProductVariantImportDraft.schema.json" + "$id": "https://api.commercetools.com/ProductVariantImportDraft.schema.json" } diff --git a/json-schemas/ProductVariantSelection.schema.json b/json-schemas/ProductVariantSelection.schema.json new file mode 100644 index 00000000..4ac21683 --- /dev/null +++ b/json-schemas/ProductVariantSelection.schema.json @@ -0,0 +1,18 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/ProductVariantSelectionExclusion.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductVariantSelectionInclusion.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Polymorphic base type for Product Variant Selections. The actual type is determined by the `type` field.", + "additionalProperties": false, + "title": "ProductVariantSelection", + "type": "object", + "properties": {"type": {"enum": [ + "exclusion", + "inclusion" + ]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/ProductVariantSelection.schema.json", + "discriminator": {"propertyName": "type"} +} diff --git a/json-schemas/ProductVariantSelectionExclusion.schema.json b/json-schemas/ProductVariantSelectionExclusion.schema.json new file mode 100644 index 00000000..8179273f --- /dev/null +++ b/json-schemas/ProductVariantSelectionExclusion.schema.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "All Product Variants except the explicitly stated SKUs are part of the Product Selection.", + "additionalProperties": false, + "title": "ProductVariantSelectionExclusion", + "type": "object", + "properties": { + "type": {"enum": ["exclusion"]}, + "skus": { + "type": "array", + "items": {"type": "string"} + } + }, + "required": [ + "type", + "skus" + ], + "$id": "https://api.commercetools.com/ProductVariantSelectionExclusion.schema.json" +} diff --git a/json-schemas/ProductVariantSelectionInclusion.schema.json b/json-schemas/ProductVariantSelectionInclusion.schema.json new file mode 100644 index 00000000..eb9b01c6 --- /dev/null +++ b/json-schemas/ProductVariantSelectionInclusion.schema.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Only Product Variants with explicitly stated SKUs are part of the Product Selection.", + "additionalProperties": false, + "title": "ProductVariantSelectionInclusion", + "type": "object", + "properties": { + "type": {"enum": ["inclusion"]}, + "skus": { + "type": "array", + "items": {"type": "string"} + } + }, + "required": [ + "type", + "skus" + ], + "$id": "https://api.commercetools.com/ProductVariantSelectionInclusion.schema.json" +} diff --git a/json-schemas/ProductVariantSelectionTypeEnumEnum.schema.json b/json-schemas/ProductVariantSelectionTypeEnumEnum.schema.json new file mode 100644 index 00000000..55184a68 --- /dev/null +++ b/json-schemas/ProductVariantSelectionTypeEnumEnum.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "ProductVariantSelectionTypeEnum", + "type": "string", + "enum": [ + "inclusion", + "exclusion" + ], + "$id": "https://api.commercetools.com/ProductVariantSelectionTypeEnumEnum.schema.json" +} diff --git a/json-schemas/ProductsInStorePagedQueryResponse.schema.json b/json-schemas/ProductsInStorePagedQueryResponse.schema.json new file mode 100644 index 00000000..8a365b40 --- /dev/null +++ b/json-schemas/ProductsInStorePagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) containing an array of [ProductSelectionAssignment](ctp:api:type:ProductSelectionAssignment).", + "additionalProperties": false, + "title": "ProductsInStorePagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "ProductSelectionAssignment.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/ProductsInStorePagedQueryResponse.schema.json" +} diff --git a/json-schemas/Project.schema.json b/json-schemas/Project.schema.json index 054b3ae8..106a657f 100644 --- a/json-schemas/Project.schema.json +++ b/json-schemas/Project.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Project", "type": "object", "properties": { "externalOAuth": {"$ref": "ExternalOAuth.schema.json"}, + "shoppingLists": {"$ref": "ShoppingListsConfiguration.schema.json"}, "languages": { "type": "array", "items": {"type": "string"} @@ -23,7 +24,7 @@ }, "carts": {"$ref": "CartsConfiguration.schema.json"}, "name": {"type": "string"}, - "messages": {"$ref": "MessageConfiguration.schema.json"}, + "messages": {"$ref": "MessagesConfiguration.schema.json"}, "key": {"type": "string"}, "currencies": { "type": "array", @@ -41,5 +42,5 @@ "messages", "carts" ], - "$id": "https://example.com/Project.schema.json" + "$id": "https://api.commercetools.com/Project.schema.json" } diff --git a/json-schemas/ProjectChangeCartsConfigurationAction.schema.json b/json-schemas/ProjectChangeCartsConfigurationAction.schema.json new file mode 100644 index 00000000..1a93f223 --- /dev/null +++ b/json-schemas/ProjectChangeCartsConfigurationAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProjectChangeCartsConfigurationAction", + "type": "object", + "properties": { + "action": {"enum": ["changeCartsConfiguration"]}, + "cartsConfiguration": {"$ref": "CartsConfiguration.schema.json"} + }, + "required": [ + "action", + "cartsConfiguration" + ], + "$id": "https://api.commercetools.com/ProjectChangeCartsConfigurationAction.schema.json" +} diff --git a/json-schemas/ProjectChangeCountriesAction.schema.json b/json-schemas/ProjectChangeCountriesAction.schema.json index bbd9d3d7..32ccbb59 100644 --- a/json-schemas/ProjectChangeCountriesAction.schema.json +++ b/json-schemas/ProjectChangeCountriesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeCountriesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "countries" ], - "$id": "https://example.com/ProjectChangeCountriesAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeCountriesAction.schema.json" } diff --git a/json-schemas/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json b/json-schemas/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json index 1cc4cc73..80928d56 100644 --- a/json-schemas/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json +++ b/json-schemas/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeCountryTaxRateFallbackEnabledAction", "type": "object", @@ -11,5 +11,5 @@ "action", "countryTaxRateFallbackEnabled" ], - "$id": "https://example.com/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json" } diff --git a/json-schemas/ProjectChangeCurrenciesAction.schema.json b/json-schemas/ProjectChangeCurrenciesAction.schema.json index 53223fc1..91e47fb0 100644 --- a/json-schemas/ProjectChangeCurrenciesAction.schema.json +++ b/json-schemas/ProjectChangeCurrenciesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeCurrenciesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "currencies" ], - "$id": "https://example.com/ProjectChangeCurrenciesAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeCurrenciesAction.schema.json" } diff --git a/json-schemas/ProjectChangeLanguagesAction.schema.json b/json-schemas/ProjectChangeLanguagesAction.schema.json index 55f94d3e..a835e256 100644 --- a/json-schemas/ProjectChangeLanguagesAction.schema.json +++ b/json-schemas/ProjectChangeLanguagesAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "If a language is used by a [Store](ctp:api:type:Store), it cannot be deleted. Attempts to delete such language will lead to [LanguageUsedInStores](/../api/errors#projects-400-language-used-in-stores) errors.", "additionalProperties": false, "title": "ProjectChangeLanguagesAction", "type": "object", @@ -14,5 +15,5 @@ "action", "languages" ], - "$id": "https://example.com/ProjectChangeLanguagesAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeLanguagesAction.schema.json" } diff --git a/json-schemas/ProjectChangeMessagesConfigurationAction.schema.json b/json-schemas/ProjectChangeMessagesConfigurationAction.schema.json index 38705ffd..70137d36 100644 --- a/json-schemas/ProjectChangeMessagesConfigurationAction.schema.json +++ b/json-schemas/ProjectChangeMessagesConfigurationAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeMessagesConfigurationAction", "type": "object", "properties": { "action": {"enum": ["changeMessagesConfiguration"]}, - "messagesConfiguration": {"$ref": "MessageConfigurationDraft.schema.json"} + "messagesConfiguration": {"$ref": "MessagesConfigurationDraft.schema.json"} }, "required": [ "action", "messagesConfiguration" ], - "$id": "https://example.com/ProjectChangeMessagesConfigurationAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeMessagesConfigurationAction.schema.json" } diff --git a/json-schemas/ProjectChangeMessagesEnabledAction.schema.json b/json-schemas/ProjectChangeMessagesEnabledAction.schema.json index 518f92f7..89c60da3 100644 --- a/json-schemas/ProjectChangeMessagesEnabledAction.schema.json +++ b/json-schemas/ProjectChangeMessagesEnabledAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeMessagesEnabledAction", "type": "object", @@ -11,5 +11,5 @@ "action", "messagesEnabled" ], - "$id": "https://example.com/ProjectChangeMessagesEnabledAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeMessagesEnabledAction.schema.json" } diff --git a/json-schemas/ProjectChangeNameAction.schema.json b/json-schemas/ProjectChangeNameAction.schema.json index b241be51..15ac5e65 100644 --- a/json-schemas/ProjectChangeNameAction.schema.json +++ b/json-schemas/ProjectChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ProjectChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeNameAction.schema.json" } diff --git a/json-schemas/ProjectChangeOrderSearchStatusAction.schema.json b/json-schemas/ProjectChangeOrderSearchStatusAction.schema.json new file mode 100644 index 00000000..823bb610 --- /dev/null +++ b/json-schemas/ProjectChangeOrderSearchStatusAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProjectChangeOrderSearchStatusAction", + "type": "object", + "properties": { + "action": {"enum": ["changeOrderSearchStatus"]}, + "status": {"$ref": "OrderSearchStatusEnum.schema.json"} + }, + "required": [ + "action", + "status" + ], + "$id": "https://api.commercetools.com/ProjectChangeOrderSearchStatusAction.schema.json" +} diff --git a/json-schemas/ProjectChangeProductSearchIndexingEnabledAction.schema.json b/json-schemas/ProjectChangeProductSearchIndexingEnabledAction.schema.json index 423953bd..803e18cc 100644 --- a/json-schemas/ProjectChangeProductSearchIndexingEnabledAction.schema.json +++ b/json-schemas/ProjectChangeProductSearchIndexingEnabledAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectChangeProductSearchIndexingEnabledAction", "type": "object", @@ -11,5 +11,5 @@ "action", "enabled" ], - "$id": "https://example.com/ProjectChangeProductSearchIndexingEnabledAction.schema.json" + "$id": "https://api.commercetools.com/ProjectChangeProductSearchIndexingEnabledAction.schema.json" } diff --git a/json-schemas/ProjectChangeShoppingListsConfigurationAction.schema.json b/json-schemas/ProjectChangeShoppingListsConfigurationAction.schema.json new file mode 100644 index 00000000..48506f98 --- /dev/null +++ b/json-schemas/ProjectChangeShoppingListsConfigurationAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ProjectChangeShoppingListsConfigurationAction", + "type": "object", + "properties": { + "action": {"enum": ["changeShoppingListsConfiguration"]}, + "shoppingListsConfiguration": {"$ref": "ShoppingListsConfiguration.schema.json"} + }, + "required": [ + "action", + "shoppingListsConfiguration" + ], + "$id": "https://api.commercetools.com/ProjectChangeShoppingListsConfigurationAction.schema.json" +} diff --git a/json-schemas/ProjectNotConfiguredForLanguagesError.schema.json b/json-schemas/ProjectNotConfiguredForLanguagesError.schema.json index 6841e35a..e4e09c8e 100644 --- a/json-schemas/ProjectNotConfiguredForLanguagesError.schema.json +++ b/json-schemas/ProjectNotConfiguredForLanguagesError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectNotConfiguredForLanguagesError", "type": "object", @@ -15,5 +23,5 @@ "code", "message" ], - "$id": "https://example.com/ProjectNotConfiguredForLanguagesError.schema.json" + "$id": "https://api.commercetools.com/ProjectNotConfiguredForLanguagesError.schema.json" } diff --git a/json-schemas/ProjectSetExternalOAuthAction.schema.json b/json-schemas/ProjectSetExternalOAuthAction.schema.json index 3d9a7ca4..ebf74a4e 100644 --- a/json-schemas/ProjectSetExternalOAuthAction.schema.json +++ b/json-schemas/ProjectSetExternalOAuthAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectSetExternalOAuthAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setExternalOAuth"]} }, "required": ["action"], - "$id": "https://example.com/ProjectSetExternalOAuthAction.schema.json" + "$id": "https://api.commercetools.com/ProjectSetExternalOAuthAction.schema.json" } diff --git a/json-schemas/ProjectSetShippingRateInputTypeAction.schema.json b/json-schemas/ProjectSetShippingRateInputTypeAction.schema.json index c75aa49b..1f51b1a5 100644 --- a/json-schemas/ProjectSetShippingRateInputTypeAction.schema.json +++ b/json-schemas/ProjectSetShippingRateInputTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectSetShippingRateInputTypeAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setShippingRateInputType"]} }, "required": ["action"], - "$id": "https://example.com/ProjectSetShippingRateInputTypeAction.schema.json" + "$id": "https://api.commercetools.com/ProjectSetShippingRateInputTypeAction.schema.json" } diff --git a/json-schemas/ProjectUpdate.schema.json b/json-schemas/ProjectUpdate.schema.json index cec0eea3..9096ce20 100644 --- a/json-schemas/ProjectUpdate.schema.json +++ b/json-schemas/ProjectUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ProjectUpdate.schema.json" + "$id": "https://api.commercetools.com/ProjectUpdate.schema.json" } diff --git a/json-schemas/ProjectUpdateAction.schema.json b/json-schemas/ProjectUpdateAction.schema.json index dda04453..1061ea4b 100644 --- a/json-schemas/ProjectUpdateAction.schema.json +++ b/json-schemas/ProjectUpdateAction.schema.json @@ -1,22 +1,39 @@ { "oneOf": [ - {"$ref": "https://example.com/ProjectChangeCountriesAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeCurrenciesAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeLanguagesAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeMessagesConfigurationAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeMessagesEnabledAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ProjectChangeProductSearchIndexingEnabledAction.schema.json"}, - {"$ref": "https://example.com/ProjectSetExternalOAuthAction.schema.json"}, - {"$ref": "https://example.com/ProjectSetShippingRateInputTypeAction.schema.json"} + {"$ref": "https://api.commercetools.com/ProjectChangeCartsConfigurationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeCountriesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeCountryTaxRateFallbackEnabledAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeCurrenciesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeLanguagesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeMessagesConfigurationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeMessagesEnabledAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeOrderSearchStatusAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeProductSearchIndexingEnabledAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectChangeShoppingListsConfigurationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectSetExternalOAuthAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ProjectSetShippingRateInputTypeAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ProjectUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeCartsConfiguration", + "changeCountries", + "changeCountryTaxRateFallbackEnabled", + "changeCurrencies", + "changeLanguages", + "changeMessagesConfiguration", + "changeMessagesEnabled", + "changeName", + "changeOrderSearchStatus", + "changeProductSearchIndexingEnabled", + "changeShoppingListsConfiguration", + "setExternalOAuth", + "setShippingRateInputType" + ]}}, "required": ["action"], - "$id": "https://example.com/ProjectUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ProjectUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/QueryComplexityLimitExceededError.schema.json b/json-schemas/QueryComplexityLimitExceededError.schema.json index 084c854c..fbc05f98 100644 --- a/json-schemas/QueryComplexityLimitExceededError.schema.json +++ b/json-schemas/QueryComplexityLimitExceededError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "QueryComplexityLimitExceededError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/QueryComplexityLimitExceededError.schema.json" + "$id": "https://api.commercetools.com/QueryComplexityLimitExceededError.schema.json" } diff --git a/json-schemas/QueryPrice.schema.json b/json-schemas/QueryPrice.schema.json index efc13e0b..71e577be 100644 --- a/json-schemas/QueryPrice.schema.json +++ b/json-schemas/QueryPrice.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "QueryPrice", "type": "object", "properties": { - "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "discounted": {"$ref": "DiscountedPriceDraft.schema.json"}, "country": {"type": "string"}, "tiers": { "type": "array", @@ -24,9 +24,6 @@ }, "value": {"$ref": "Money.schema.json"} }, - "required": [ - "id", - "value" - ], - "$id": "https://example.com/QueryPrice.schema.json" + "required": ["value"], + "$id": "https://api.commercetools.com/QueryPrice.schema.json" } diff --git a/json-schemas/QueryTimedOutError.schema.json b/json-schemas/QueryTimedOutError.schema.json index ce14efef..bc46c8da 100644 --- a/json-schemas/QueryTimedOutError.schema.json +++ b/json-schemas/QueryTimedOutError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "QueryTimedOutError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/QueryTimedOutError.schema.json" + "$id": "https://api.commercetools.com/QueryTimedOutError.schema.json" } diff --git a/json-schemas/MyCart.schema.json b/json-schemas/Quote.schema.json similarity index 69% rename from json-schemas/MyCart.schema.json rename to json-schemas/Quote.schema.json index d7856b75..b55ed8f5 100644 --- a/json-schemas/MyCart.schema.json +++ b/json-schemas/Quote.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "MyCart", + "title": "Quote", "type": "object", "properties": { "country": {"type": "string"}, @@ -10,19 +10,10 @@ "format": "date-time" }, "totalPrice": {"$ref": "TypedMoney.schema.json"}, + "stagedQuote": {"$ref": "StagedQuoteReference.schema.json"}, "taxedPrice": {"$ref": "TaxedPrice.schema.json"}, "shippingRateInput": {"$ref": "ShippingRateInput.schema.json"}, "shippingInfo": {"$ref": "ShippingInfo.schema.json"}, - "deleteDaysAfterLastModification": { - "type": "number", - "format": "integer" - }, - "origin": {"$ref": "CartOriginEnum.schema.json"}, - "refusedGifts": { - "type": "array", - "items": {"$ref": "CartDiscountReference.schema.json"} - }, - "locale": {"type": "string"}, "inventoryMode": {"$ref": "InventoryModeEnum.schema.json"}, "lineItems": { "type": "array", @@ -40,15 +31,16 @@ "type": "array", "items": {"$ref": "Address.schema.json"} }, - "customerEmail": {"type": "string"}, - "customerId": {"type": "string"}, - "cartState": {"$ref": "CartStateEnum.schema.json"}, "id": {"type": "string"}, + "quoteRequest": {"$ref": "QuoteRequestReference.schema.json"}, "key": {"type": "string"}, - "anonymousId": {"type": "string"}, - "discountCodes": { + "validTo": { + "type": "string", + "format": "date-time" + }, + "directDiscounts": { "type": "array", - "items": {"$ref": "DiscountCodeInfo.schema.json"} + "items": {"$ref": "DirectDiscount.schema.json"} }, "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, @@ -56,27 +48,28 @@ "store": {"$ref": "StoreKeyReference.schema.json"}, "taxCalculationMode": {"$ref": "TaxCalculationModeEnum.schema.json"}, "version": {"type": "number"}, + "sellerComment": {"type": "string"}, "taxRoundingMode": {"$ref": "RoundingModeEnum.schema.json"}, "createdBy": {"$ref": "CreatedBy.schema.json"}, "taxMode": {"$ref": "TaxModeEnum.schema.json"}, "shippingAddress": {"$ref": "Address.schema.json"}, "billingAddress": {"$ref": "Address.schema.json"}, - "paymentInfo": {"$ref": "PaymentInfo.schema.json"} + "paymentInfo": {"$ref": "PaymentInfo.schema.json"}, + "customer": {"$ref": "CustomerReference.schema.json"} }, "required": [ "id", "version", "createdAt", "lastModifiedAt", + "quoteRequest", + "stagedQuote", "lineItems", "customLineItems", "totalPrice", - "cartState", "taxMode", "taxRoundingMode", - "taxCalculationMode", - "refusedGifts", - "origin" + "taxCalculationMode" ], - "$id": "https://example.com/MyCart.schema.json" + "$id": "https://api.commercetools.com/Quote.schema.json" } diff --git a/json-schemas/QuoteChangeQuoteStateAction.schema.json b/json-schemas/QuoteChangeQuoteStateAction.schema.json new file mode 100644 index 00000000..e1b362ae --- /dev/null +++ b/json-schemas/QuoteChangeQuoteStateAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteChangeQuoteStateAction", + "type": "object", + "properties": { + "action": {"enum": ["changeQuoteState"]}, + "quoteState": {"$ref": "QuoteStateEnum.schema.json"} + }, + "required": [ + "action", + "quoteState" + ], + "$id": "https://api.commercetools.com/QuoteChangeQuoteStateAction.schema.json" +} diff --git a/json-schemas/QuoteCreatedMessage.schema.json b/json-schemas/QuoteCreatedMessage.schema.json new file mode 100644 index 00000000..f626abc1 --- /dev/null +++ b/json-schemas/QuoteCreatedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteCreatedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["QuoteCreated"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/QuoteCreatedMessage.schema.json" +} diff --git a/json-schemas/QuoteCreatedMessagePayload.schema.json b/json-schemas/QuoteCreatedMessagePayload.schema.json new file mode 100644 index 00000000..8e9d0bc5 --- /dev/null +++ b/json-schemas/QuoteCreatedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteCreatedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["QuoteCreated"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/QuoteCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteDeletedMessage.schema.json b/json-schemas/QuoteDeletedMessage.schema.json new file mode 100644 index 00000000..2855fba8 --- /dev/null +++ b/json-schemas/QuoteDeletedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["QuoteDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/QuoteDeletedMessage.schema.json" +} diff --git a/json-schemas/QuoteDeletedMessagePayload.schema.json b/json-schemas/QuoteDeletedMessagePayload.schema.json new file mode 100644 index 00000000..b8b02cd9 --- /dev/null +++ b/json-schemas/QuoteDeletedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["QuoteDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/QuoteDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteDraft.schema.json b/json-schemas/QuoteDraft.schema.json new file mode 100644 index 00000000..2a37d192 --- /dev/null +++ b/json-schemas/QuoteDraft.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteDraft", + "type": "object", + "properties": { + "stagedQuoteVersion": {"type": "number"}, + "stagedQuote": {"$ref": "StagedQuoteResourceIdentifier.schema.json"}, + "key": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} + }, + "required": [ + "stagedQuote", + "stagedQuoteVersion" + ], + "$id": "https://api.commercetools.com/QuoteDraft.schema.json" +} diff --git a/json-schemas/QuotePagedQueryResponse.schema.json b/json-schemas/QuotePagedQueryResponse.schema.json new file mode 100644 index 00000000..bd3ecace --- /dev/null +++ b/json-schemas/QuotePagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Quote](ctp:api:type:Quote).", + "additionalProperties": false, + "title": "QuotePagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "Quote.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/QuotePagedQueryResponse.schema.json" +} diff --git a/json-schemas/QuoteReference.schema.json b/json-schemas/QuoteReference.schema.json new file mode 100644 index 00000000..c3f38245 --- /dev/null +++ b/json-schemas/QuoteReference.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Quote](ctp:api:type:Quote).", + "additionalProperties": false, + "title": "QuoteReference", + "type": "object", + "properties": { + "typeId": {"enum": ["quote"]}, + "obj": {"$ref": "Quote.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "typeId", + "id" + ], + "$id": "https://api.commercetools.com/QuoteReference.schema.json" +} diff --git a/json-schemas/MyOrder.schema.json b/json-schemas/QuoteRequest.schema.json similarity index 56% rename from json-schemas/MyOrder.schema.json rename to json-schemas/QuoteRequest.schema.json index 42965f07..6cb298f9 100644 --- a/json-schemas/MyOrder.schema.json +++ b/json-schemas/QuoteRequest.schema.json @@ -1,37 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "MyOrder", + "title": "QuoteRequest", "type": "object", "properties": { - "shipmentState": {"$ref": "ShipmentStateEnum.schema.json"}, "country": {"type": "string"}, "lastModifiedAt": { "type": "string", "format": "date-time" }, - "orderNumber": {"type": "string"}, "totalPrice": {"$ref": "TypedMoney.schema.json"}, "taxedPrice": {"$ref": "TaxedPrice.schema.json"}, "shippingRateInput": {"$ref": "ShippingRateInput.schema.json"}, "shippingInfo": {"$ref": "ShippingInfo.schema.json"}, - "origin": {"$ref": "CartOriginEnum.schema.json"}, - "refusedGifts": { - "type": "array", - "items": {"$ref": "CartDiscountReference.schema.json"} - }, - "locale": {"type": "string"}, - "cart": {"$ref": "CartReference.schema.json"}, - "orderState": {"$ref": "OrderStateEnum.schema.json"}, "inventoryMode": {"$ref": "InventoryModeEnum.schema.json"}, "lineItems": { "type": "array", "items": {"$ref": "LineItem.schema.json"} }, - "returnInfo": { - "type": "array", - "items": {"$ref": "ReturnInfo.schema.json"} - }, "createdAt": { "type": "string", "format": "date-time" @@ -44,19 +30,12 @@ "type": "array", "items": {"$ref": "Address.schema.json"} }, - "customerEmail": {"type": "string"}, - "customerId": {"type": "string"}, + "quoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"}, "id": {"type": "string"}, - "state": {"$ref": "StateReference.schema.json"}, - "paymentState": {"$ref": "PaymentStateEnum.schema.json"}, - "anonymousId": {"type": "string"}, - "completedAt": { - "type": "string", - "format": "date-time" - }, - "discountCodes": { + "key": {"type": "string"}, + "directDiscounts": { "type": "array", - "items": {"$ref": "DiscountCodeInfo.schema.json"} + "items": {"$ref": "DirectDiscount.schema.json"} }, "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, @@ -64,31 +43,28 @@ "store": {"$ref": "StoreKeyReference.schema.json"}, "taxCalculationMode": {"$ref": "TaxCalculationModeEnum.schema.json"}, "version": {"type": "number"}, - "syncInfo": { - "type": "array", - "items": {"$ref": "SyncInfo.schema.json"} - }, - "lastMessageSequenceNumber": {"type": "number"}, "taxRoundingMode": {"$ref": "RoundingModeEnum.schema.json"}, "createdBy": {"$ref": "CreatedBy.schema.json"}, "taxMode": {"$ref": "TaxModeEnum.schema.json"}, "shippingAddress": {"$ref": "Address.schema.json"}, + "comment": {"type": "string"}, "billingAddress": {"$ref": "Address.schema.json"}, - "paymentInfo": {"$ref": "PaymentInfo.schema.json"} + "paymentInfo": {"$ref": "PaymentInfo.schema.json"}, + "customer": {"$ref": "CustomerReference.schema.json"} }, "required": [ "id", "version", "createdAt", "lastModifiedAt", + "quoteRequestState", + "customer", "lineItems", "customLineItems", "totalPrice", - "orderState", - "syncInfo", - "lastMessageSequenceNumber", - "origin", - "refusedGifts" + "taxMode", + "taxRoundingMode", + "taxCalculationMode" ], - "$id": "https://example.com/MyOrder.schema.json" + "$id": "https://api.commercetools.com/QuoteRequest.schema.json" } diff --git a/json-schemas/QuoteRequestChangeQuoteRequestStateAction.schema.json b/json-schemas/QuoteRequestChangeQuoteRequestStateAction.schema.json new file mode 100644 index 00000000..19ad842d --- /dev/null +++ b/json-schemas/QuoteRequestChangeQuoteRequestStateAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Transitions the Quote Request to a different state.", + "additionalProperties": false, + "title": "QuoteRequestChangeQuoteRequestStateAction", + "type": "object", + "properties": { + "action": {"enum": ["changeQuoteRequestState"]}, + "quoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"} + }, + "required": [ + "action", + "quoteRequestState" + ], + "$id": "https://api.commercetools.com/QuoteRequestChangeQuoteRequestStateAction.schema.json" +} diff --git a/json-schemas/QuoteRequestCreatedMessage.schema.json b/json-schemas/QuoteRequestCreatedMessage.schema.json new file mode 100644 index 00000000..d94cbbd5 --- /dev/null +++ b/json-schemas/QuoteRequestCreatedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestCreatedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["QuoteRequestCreated"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/QuoteRequestCreatedMessage.schema.json" +} diff --git a/json-schemas/QuoteRequestCreatedMessagePayload.schema.json b/json-schemas/QuoteRequestCreatedMessagePayload.schema.json new file mode 100644 index 00000000..118525a4 --- /dev/null +++ b/json-schemas/QuoteRequestCreatedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestCreatedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["QuoteRequestCreated"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/QuoteRequestCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteRequestDeletedMessage.schema.json b/json-schemas/QuoteRequestDeletedMessage.schema.json new file mode 100644 index 00000000..a298e54c --- /dev/null +++ b/json-schemas/QuoteRequestDeletedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["QuoteRequestDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/QuoteRequestDeletedMessage.schema.json" +} diff --git a/json-schemas/QuoteRequestDeletedMessagePayload.schema.json b/json-schemas/QuoteRequestDeletedMessagePayload.schema.json new file mode 100644 index 00000000..2352af02 --- /dev/null +++ b/json-schemas/QuoteRequestDeletedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["QuoteRequestDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/QuoteRequestDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteRequestDraft.schema.json b/json-schemas/QuoteRequestDraft.schema.json new file mode 100644 index 00000000..c6ff27ca --- /dev/null +++ b/json-schemas/QuoteRequestDraft.schema.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestDraft", + "type": "object", + "properties": { + "comment": {"type": "string"}, + "cartVersion": {"type": "number"}, + "cart": {"$ref": "CartResourceIdentifier.schema.json"}, + "key": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} + }, + "required": [ + "cart", + "cartVersion", + "comment" + ], + "$id": "https://api.commercetools.com/QuoteRequestDraft.schema.json" +} diff --git a/json-schemas/QuoteRequestPagedQueryResponse.schema.json b/json-schemas/QuoteRequestPagedQueryResponse.schema.json new file mode 100644 index 00000000..a29449ee --- /dev/null +++ b/json-schemas/QuoteRequestPagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [QuoteRequest](ctp:api:type:QuoteRequest).", + "additionalProperties": false, + "title": "QuoteRequestPagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "QuoteRequest.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/QuoteRequestPagedQueryResponse.schema.json" +} diff --git a/json-schemas/QuoteRequestReference.schema.json b/json-schemas/QuoteRequestReference.schema.json new file mode 100644 index 00000000..ca923681 --- /dev/null +++ b/json-schemas/QuoteRequestReference.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [QuoteRequest](ctp:api:type:QuoteRequest).", + "additionalProperties": false, + "title": "QuoteRequestReference", + "type": "object", + "properties": { + "typeId": {"enum": ["quote-request"]}, + "obj": {"$ref": "QuoteRequest.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "typeId", + "id" + ], + "$id": "https://api.commercetools.com/QuoteRequestReference.schema.json" +} diff --git a/json-schemas/QuoteRequestResourceIdentifier.schema.json b/json-schemas/QuoteRequestResourceIdentifier.schema.json new file mode 100644 index 00000000..4ab06efb --- /dev/null +++ b/json-schemas/QuoteRequestResourceIdentifier.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [QuoteRequest](ctp:api:type:QuoteRequest).", + "additionalProperties": false, + "title": "QuoteRequestResourceIdentifier", + "type": "object", + "properties": { + "typeId": {"enum": ["quote-request"]}, + "key": {"type": "string"}, + "id": {"type": "string"} + }, + "required": ["typeId"], + "$id": "https://api.commercetools.com/QuoteRequestResourceIdentifier.schema.json" +} diff --git a/json-schemas/QuoteRequestSetCustomFieldAction.schema.json b/json-schemas/QuoteRequestSetCustomFieldAction.schema.json new file mode 100644 index 00000000..1e5f8697 --- /dev/null +++ b/json-schemas/QuoteRequestSetCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestSetCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/QuoteRequestSetCustomFieldAction.schema.json" +} diff --git a/json-schemas/QuoteRequestSetCustomTypeAction.schema.json b/json-schemas/QuoteRequestSetCustomTypeAction.schema.json new file mode 100644 index 00000000..d335cba5 --- /dev/null +++ b/json-schemas/QuoteRequestSetCustomTypeAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestSetCustomTypeAction", + "type": "object", + "properties": { + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "action": {"enum": ["setCustomType"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/QuoteRequestSetCustomTypeAction.schema.json" +} diff --git a/json-schemas/QuoteRequestStateChangedMessage.schema.json b/json-schemas/QuoteRequestStateChangedMessage.schema.json new file mode 100644 index 00000000..c8bab271 --- /dev/null +++ b/json-schemas/QuoteRequestStateChangedMessage.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestStateChangedMessage", + "type": "object", + "properties": { + "oldQuoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"}, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["QuoteRequestStateChanged"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "quoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "quoteRequestState", + "oldQuoteRequestState" + ], + "$id": "https://api.commercetools.com/QuoteRequestStateChangedMessage.schema.json" +} diff --git a/json-schemas/QuoteRequestStateChangedMessagePayload.schema.json b/json-schemas/QuoteRequestStateChangedMessagePayload.schema.json new file mode 100644 index 00000000..43138cd4 --- /dev/null +++ b/json-schemas/QuoteRequestStateChangedMessagePayload.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestStateChangedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["QuoteRequestStateChanged"]}, + "oldQuoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"}, + "quoteRequestState": {"$ref": "QuoteRequestStateEnum.schema.json"} + }, + "required": [ + "type", + "quoteRequestState", + "oldQuoteRequestState" + ], + "$id": "https://api.commercetools.com/QuoteRequestStateChangedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteRequestStateEnum.schema.json b/json-schemas/QuoteRequestStateEnum.schema.json new file mode 100644 index 00000000..7ef68d69 --- /dev/null +++ b/json-schemas/QuoteRequestStateEnum.schema.json @@ -0,0 +1,14 @@ +{ + "description": "Predefined states tracking the status of the Quote Request in the negotiation process.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "QuoteRequestState", + "type": "string", + "enum": [ + "Submitted", + "Accepted", + "Closed", + "Rejected", + "Cancelled" + ], + "$id": "https://api.commercetools.com/QuoteRequestStateEnum.schema.json" +} diff --git a/json-schemas/QuoteRequestUpdate.schema.json b/json-schemas/QuoteRequestUpdate.schema.json new file mode 100644 index 00000000..76c94f1e --- /dev/null +++ b/json-schemas/QuoteRequestUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "QuoteRequestUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/QuoteRequestUpdate.schema.json" +} diff --git a/json-schemas/QuoteRequestUpdateAction.schema.json b/json-schemas/QuoteRequestUpdateAction.schema.json new file mode 100644 index 00000000..83ecbe1c --- /dev/null +++ b/json-schemas/QuoteRequestUpdateAction.schema.json @@ -0,0 +1,19 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/QuoteRequestChangeQuoteRequestStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestSetCustomTypeAction.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteRequestUpdateAction", + "type": "object", + "properties": {"action": {"enum": [ + "changeQuoteRequestState", + "setCustomField", + "setCustomType" + ]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/QuoteRequestUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/QuoteResourceIdentifier.schema.json b/json-schemas/QuoteResourceIdentifier.schema.json new file mode 100644 index 00000000..9750d00d --- /dev/null +++ b/json-schemas/QuoteResourceIdentifier.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Quote](ctp:api:type:Quote).", + "additionalProperties": false, + "title": "QuoteResourceIdentifier", + "type": "object", + "properties": { + "typeId": {"enum": ["quote"]}, + "key": {"type": "string"}, + "id": {"type": "string"} + }, + "required": ["typeId"], + "$id": "https://api.commercetools.com/QuoteResourceIdentifier.schema.json" +} diff --git a/json-schemas/QuoteSetCustomFieldAction.schema.json b/json-schemas/QuoteSetCustomFieldAction.schema.json new file mode 100644 index 00000000..6acaaf27 --- /dev/null +++ b/json-schemas/QuoteSetCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteSetCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/QuoteSetCustomFieldAction.schema.json" +} diff --git a/json-schemas/QuoteSetCustomTypeAction.schema.json b/json-schemas/QuoteSetCustomTypeAction.schema.json new file mode 100644 index 00000000..fb1f67b2 --- /dev/null +++ b/json-schemas/QuoteSetCustomTypeAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteSetCustomTypeAction", + "type": "object", + "properties": { + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "action": {"enum": ["setCustomType"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/QuoteSetCustomTypeAction.schema.json" +} diff --git a/json-schemas/QuoteStateChangedMessage.schema.json b/json-schemas/QuoteStateChangedMessage.schema.json new file mode 100644 index 00000000..2eb10b8e --- /dev/null +++ b/json-schemas/QuoteStateChangedMessage.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteStateChangedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["QuoteStateChanged"]}, + "version": {"type": "number"}, + "oldQuoteState": {"$ref": "QuoteStateEnum.schema.json"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"}, + "quoteState": {"$ref": "QuoteStateEnum.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "quoteState", + "oldQuoteState" + ], + "$id": "https://api.commercetools.com/QuoteStateChangedMessage.schema.json" +} diff --git a/json-schemas/QuoteStateChangedMessagePayload.schema.json b/json-schemas/QuoteStateChangedMessagePayload.schema.json new file mode 100644 index 00000000..dd627caf --- /dev/null +++ b/json-schemas/QuoteStateChangedMessagePayload.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteStateChangedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["QuoteStateChanged"]}, + "quoteState": {"$ref": "QuoteStateEnum.schema.json"}, + "oldQuoteState": {"$ref": "QuoteStateEnum.schema.json"} + }, + "required": [ + "type", + "quoteState", + "oldQuoteState" + ], + "$id": "https://api.commercetools.com/QuoteStateChangedMessagePayload.schema.json" +} diff --git a/json-schemas/QuoteStateEnum.schema.json b/json-schemas/QuoteStateEnum.schema.json new file mode 100644 index 00000000..4f5eab30 --- /dev/null +++ b/json-schemas/QuoteStateEnum.schema.json @@ -0,0 +1,14 @@ +{ + "description": "Predefined states tracking the status of the Quote.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "QuoteState", + "type": "string", + "enum": [ + "Pending", + "Declined", + "Accepted", + "Failed", + "Withdrawn" + ], + "$id": "https://api.commercetools.com/QuoteStateEnum.schema.json" +} diff --git a/json-schemas/QuoteUpdate.schema.json b/json-schemas/QuoteUpdate.schema.json new file mode 100644 index 00000000..f8678c05 --- /dev/null +++ b/json-schemas/QuoteUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "QuoteUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/QuoteUpdate.schema.json" +} diff --git a/json-schemas/QuoteUpdateAction.schema.json b/json-schemas/QuoteUpdateAction.schema.json new file mode 100644 index 00000000..5efe5810 --- /dev/null +++ b/json-schemas/QuoteUpdateAction.schema.json @@ -0,0 +1,19 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/QuoteChangeQuoteStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteSetCustomTypeAction.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "QuoteUpdateAction", + "type": "object", + "properties": {"action": {"enum": [ + "changeQuoteState", + "setCustomField", + "setCustomType" + ]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/QuoteUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/RangeFacetResult.schema.json b/json-schemas/RangeFacetResult.schema.json index 5d1cdddc..aef4b809 100644 --- a/json-schemas/RangeFacetResult.schema.json +++ b/json-schemas/RangeFacetResult.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "RangeFacetResult", "type": "object", @@ -7,12 +7,12 @@ "type": {"enum": ["range"]}, "ranges": { "type": "array", - "items": {"$ref": "FacetResultRange.schema.json"} + "items": {"$ref": "FacetRange.schema.json"} } }, "required": [ "type", "ranges" ], - "$id": "https://example.com/RangeFacetResult.schema.json" + "$id": "https://api.commercetools.com/RangeFacetResult.schema.json" } diff --git a/json-schemas/Reference.schema.json b/json-schemas/Reference.schema.json index 26d18e1b..91767a6c 100644 --- a/json-schemas/Reference.schema.json +++ b/json-schemas/Reference.schema.json @@ -1,41 +1,76 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountReference.schema.json"}, - {"$ref": "https://example.com/CartReference.schema.json"}, - {"$ref": "https://example.com/CategoryReference.schema.json"}, - {"$ref": "https://example.com/ChannelReference.schema.json"}, - {"$ref": "https://example.com/CustomObjectReference.schema.json"}, - {"$ref": "https://example.com/CustomerGroupReference.schema.json"}, - {"$ref": "https://example.com/CustomerReference.schema.json"}, - {"$ref": "https://example.com/DiscountCodeReference.schema.json"}, - {"$ref": "https://example.com/InventoryEntryReference.schema.json"}, - {"$ref": "https://example.com/OrderEditReference.schema.json"}, - {"$ref": "https://example.com/OrderReference.schema.json"}, - {"$ref": "https://example.com/PaymentReference.schema.json"}, - {"$ref": "https://example.com/ProductDiscountReference.schema.json"}, - {"$ref": "https://example.com/ProductTypeReference.schema.json"}, - {"$ref": "https://example.com/ProductReference.schema.json"}, - {"$ref": "https://example.com/ReviewReference.schema.json"}, - {"$ref": "https://example.com/ShippingMethodReference.schema.json"}, - {"$ref": "https://example.com/ShoppingListReference.schema.json"}, - {"$ref": "https://example.com/StateReference.schema.json"}, - {"$ref": "https://example.com/StoreReference.schema.json"}, - {"$ref": "https://example.com/TaxCategoryReference.schema.json"}, - {"$ref": "https://example.com/TypeReference.schema.json"}, - {"$ref": "https://example.com/ZoneReference.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountReference.schema.json"}, + {"$ref": "https://api.commercetools.com/CartReference.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelReference.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomObjectReference.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupReference.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerReference.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeReference.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryReference.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditReference.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderReference.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductReference.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestReference.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListReference.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteReference.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceReference.schema.json"}, + {"$ref": "https://api.commercetools.com/StateReference.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreReference.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategoryReference.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeReference.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneReference.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "A Reference represents a loose reference to another resource in the same Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then.", "additionalProperties": false, "title": "Reference", "type": "object", "properties": { - "typeId": {"$ref": "ReferenceTypeIdEnum.schema.json"}, + "typeId": {"enum": [ + "cart-discount", + "cart", + "category", + "channel", + "key-value-document", + "customer-group", + "customer", + "discount-code", + "inventory-entry", + "order-edit", + "order", + "payment", + "product-discount", + "product-selection", + "product-type", + "product", + "quote-request", + "quote", + "review", + "shipping-method", + "shopping-list", + "staged-quote", + "standalone-price", + "state", + "store", + "tax-category", + "type", + "zone" + ]}, "id": {"type": "string"} }, "required": [ "typeId", "id" ], - "$id": "https://example.com/Reference.schema.json", + "$id": "https://api.commercetools.com/Reference.schema.json", "discriminator": {"propertyName": "typeId"} } diff --git a/json-schemas/ReferenceExistsError.schema.json b/json-schemas/ReferenceExistsError.schema.json index b7f666fc..6b25fc83 100644 --- a/json-schemas/ReferenceExistsError.schema.json +++ b/json-schemas/ReferenceExistsError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReferenceExistsError", "type": "object", @@ -12,5 +20,5 @@ "code", "message" ], - "$id": "https://example.com/ReferenceExistsError.schema.json" + "$id": "https://api.commercetools.com/ReferenceExistsError.schema.json" } diff --git a/json-schemas/ReferenceTypeIdEnum.schema.json b/json-schemas/ReferenceTypeIdEnum.schema.json index 1551cece..29f5c3c7 100644 --- a/json-schemas/ReferenceTypeIdEnum.schema.json +++ b/json-schemas/ReferenceTypeIdEnum.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Type of resource the value should reference. Supported resource type identifiers are:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ReferenceTypeId", "type": "string", "enum": [ @@ -8,9 +9,7 @@ "category", "channel", "customer", - "customer-email-token", "customer-group", - "customer-password-token", "discount-code", "extension", "inventory-entry", @@ -20,10 +19,15 @@ "payment", "product", "product-discount", + "product-price", + "product-selection", "product-type", + "quote", + "quote-request", "review", "shipping-method", "shopping-list", + "staged-quote", "state", "store", "subscription", @@ -31,5 +35,5 @@ "type", "zone" ], - "$id": "https://example.com/ReferenceTypeIdEnum.schema.json" + "$id": "https://api.commercetools.com/ReferenceTypeIdEnum.schema.json" } diff --git a/json-schemas/ReferencedResourceNotFoundError.schema.json b/json-schemas/ReferencedResourceNotFoundError.schema.json index 6d27e94f..4ec9ac63 100644 --- a/json-schemas/ReferencedResourceNotFoundError.schema.json +++ b/json-schemas/ReferencedResourceNotFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReferencedResourceNotFoundError", "type": "object", @@ -15,5 +23,5 @@ "message", "typeId" ], - "$id": "https://example.com/ReferencedResourceNotFoundError.schema.json" + "$id": "https://api.commercetools.com/ReferencedResourceNotFoundError.schema.json" } diff --git a/json-schemas/ReplicaCartDraft.schema.json b/json-schemas/ReplicaCartDraft.schema.json index 9aae6a7b..515c2ffb 100644 --- a/json-schemas/ReplicaCartDraft.schema.json +++ b/json-schemas/ReplicaCartDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReplicaCartDraft", "type": "object", @@ -15,5 +15,5 @@ "key": {"type": "string"} }, "required": ["reference"], - "$id": "https://example.com/ReplicaCartDraft.schema.json" + "$id": "https://api.commercetools.com/ReplicaCartDraft.schema.json" } diff --git a/json-schemas/ReplicaMyCartDraft.schema.json b/json-schemas/ReplicaMyCartDraft.schema.json new file mode 100644 index 00000000..aa6e03f7 --- /dev/null +++ b/json-schemas/ReplicaMyCartDraft.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ReplicaMyCartDraft", + "type": "object", + "properties": {"reference": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "required": ["reference"], + "$id": "https://api.commercetools.com/ReplicaMyCartDraft.schema.json" +} diff --git a/json-schemas/RequiredFieldError.schema.json b/json-schemas/RequiredFieldError.schema.json index 895a8b64..c8aa3cf6 100644 --- a/json-schemas/RequiredFieldError.schema.json +++ b/json-schemas/RequiredFieldError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "RequiredFieldError", "type": "object", @@ -13,5 +21,5 @@ "message", "field" ], - "$id": "https://example.com/RequiredFieldError.schema.json" + "$id": "https://api.commercetools.com/RequiredFieldError.schema.json" } diff --git a/json-schemas/ResourceCreatedDelivery.schema.json b/json-schemas/ResourceCreatedDeliveryPayload.schema.json similarity index 73% rename from json-schemas/ResourceCreatedDelivery.schema.json rename to json-schemas/ResourceCreatedDeliveryPayload.schema.json index ed961098..6ec214ca 100644 --- a/json-schemas/ResourceCreatedDelivery.schema.json +++ b/json-schemas/ResourceCreatedDeliveryPayload.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "ResourceCreatedDelivery", + "title": "ResourceCreatedDeliveryPayload", "type": "object", "properties": { "projectKey": {"type": "string"}, @@ -21,5 +21,5 @@ "version", "modifiedAt" ], - "$id": "https://example.com/ResourceCreatedDelivery.schema.json" + "$id": "https://api.commercetools.com/ResourceCreatedDeliveryPayload.schema.json" } diff --git a/json-schemas/ResourceDeletedDelivery.schema.json b/json-schemas/ResourceDeletedDeliveryPayload.schema.json similarity index 75% rename from json-schemas/ResourceDeletedDelivery.schema.json rename to json-schemas/ResourceDeletedDeliveryPayload.schema.json index 695e3c0e..42644231 100644 --- a/json-schemas/ResourceDeletedDelivery.schema.json +++ b/json-schemas/ResourceDeletedDeliveryPayload.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "ResourceDeletedDelivery", + "title": "ResourceDeletedDeliveryPayload", "type": "object", "properties": { "projectKey": {"type": "string"}, @@ -22,5 +22,5 @@ "version", "modifiedAt" ], - "$id": "https://example.com/ResourceDeletedDelivery.schema.json" + "$id": "https://api.commercetools.com/ResourceDeletedDeliveryPayload.schema.json" } diff --git a/json-schemas/ResourceIdentifier.schema.json b/json-schemas/ResourceIdentifier.schema.json index 04a3aff5..c2b86f9e 100644 --- a/json-schemas/ResourceIdentifier.schema.json +++ b/json-schemas/ResourceIdentifier.schema.json @@ -1,37 +1,72 @@ { "oneOf": [ - {"$ref": "https://example.com/CartDiscountResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/CartResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/CategoryResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ChannelResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/CustomerGroupResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/CustomerResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/DiscountCodeResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/InventoryEntryResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/OrderEditResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/OrderResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/PaymentResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ProductDiscountResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ProductTypeResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ProductResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ReviewResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ShippingMethodResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ShoppingListResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/StateResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/StoreResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/TaxCategoryResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/TypeResourceIdentifier.schema.json"}, - {"$ref": "https://example.com/ZoneResourceIdentifier.schema.json"} + {"$ref": "https://api.commercetools.com/CartDiscountResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/CartResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/CategoryResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ChannelResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerGroupResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/CustomerResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/DiscountCodeResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/InventoryEntryResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderEditResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/OrderResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/PaymentResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductDiscountResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductSelectionResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductTypeResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ProductResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteRequestResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/QuoteResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/StateResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategoryResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeResourceIdentifier.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneResourceIdentifier.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Draft type to create a [Reference](ctp:api:type:Reference) or a [KeyReference](ctp:api:type:KeyReference) to a resource. Provide either the `id` or (wherever supported) the `key` of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field `parent` of a [CategoryDraft](ctp:api:type:CategoryDraft) takes a ResourceIdentifier for its value while the value of the corresponding field of a [Category](ctp:api:type:Category) is a Reference.\n\nEach resource type has its corresponding ResourceIdentifier, like [ChannelResourceIdentifier](ctp:api:type:ChannelResourceIdentifier).", "additionalProperties": false, "title": "ResourceIdentifier", "type": "object", "properties": { - "typeId": {"$ref": "ReferenceTypeIdEnum.schema.json"}, + "typeId": {"enum": [ + "cart-discount", + "cart", + "category", + "channel", + "customer-group", + "customer", + "discount-code", + "inventory-entry", + "order-edit", + "order", + "payment", + "product-discount", + "product-selection", + "product-type", + "product", + "quote-request", + "quote", + "review", + "shipping-method", + "shopping-list", + "staged-quote", + "standalone-price", + "state", + "store", + "tax-category", + "type", + "zone" + ]}, "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ResourceIdentifier.schema.json", + "required": ["typeId"], + "$id": "https://api.commercetools.com/ResourceIdentifier.schema.json", "discriminator": {"propertyName": "typeId"} } diff --git a/json-schemas/ResourceNotFoundError.schema.json b/json-schemas/ResourceNotFoundError.schema.json index de14d22e..872a5a5f 100644 --- a/json-schemas/ResourceNotFoundError.schema.json +++ b/json-schemas/ResourceNotFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ResourceNotFoundError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/ResourceNotFoundError.schema.json" + "$id": "https://api.commercetools.com/ResourceNotFoundError.schema.json" } diff --git a/json-schemas/ResourceSizeLimitExceededError.schema.json b/json-schemas/ResourceSizeLimitExceededError.schema.json index 6cc2c17d..37f2008b 100644 --- a/json-schemas/ResourceSizeLimitExceededError.schema.json +++ b/json-schemas/ResourceSizeLimitExceededError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ResourceSizeLimitExceededError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/ResourceSizeLimitExceededError.schema.json" + "$id": "https://api.commercetools.com/ResourceSizeLimitExceededError.schema.json" } diff --git a/json-schemas/ResourceTypeIdEnum.schema.json b/json-schemas/ResourceTypeIdEnum.schema.json index 69b2b2f0..b0405762 100644 --- a/json-schemas/ResourceTypeIdEnum.schema.json +++ b/json-schemas/ResourceTypeIdEnum.schema.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "IDs indicating the [customizable resources and data types](/../api/projects/types#list-of-customizable-data-types).", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ResourceTypeId", "type": "string", "enum": [ "address", "asset", + "cart-discount", "category", "channel", "customer", - "order", - "order-edit", + "customer-group", + "custom-line-item", + "discount-code", "inventory-entry", "line-item", - "custom-line-item", - "product-price", + "order", + "order-edit", + "order-delivery", + "order-parcel", + "order-return-item", "payment", "payment-interface-interaction", + "product-price", + "product-selection", + "quote", "review", "shipping-method", "shopping-list", "shopping-list-text-line-item", - "discount-code", - "cart-discount", - "customer-group" + "store", + "transaction" ], - "$id": "https://example.com/ResourceTypeIdEnum.schema.json" + "$id": "https://api.commercetools.com/ResourceTypeIdEnum.schema.json" } diff --git a/json-schemas/ResourceUpdatedDelivery.schema.json b/json-schemas/ResourceUpdatedDeliveryPayload.schema.json similarity index 75% rename from json-schemas/ResourceUpdatedDelivery.schema.json rename to json-schemas/ResourceUpdatedDeliveryPayload.schema.json index c3ff96eb..264a17b3 100644 --- a/json-schemas/ResourceUpdatedDelivery.schema.json +++ b/json-schemas/ResourceUpdatedDeliveryPayload.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "ResourceUpdatedDelivery", + "title": "ResourceUpdatedDeliveryPayload", "type": "object", "properties": { "projectKey": {"type": "string"}, @@ -23,5 +23,5 @@ "oldVersion", "modifiedAt" ], - "$id": "https://example.com/ResourceUpdatedDelivery.schema.json" + "$id": "https://api.commercetools.com/ResourceUpdatedDeliveryPayload.schema.json" } diff --git a/json-schemas/ReturnInfo.schema.json b/json-schemas/ReturnInfo.schema.json index db9a3845..f7f04af0 100644 --- a/json-schemas/ReturnInfo.schema.json +++ b/json-schemas/ReturnInfo.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReturnInfo", "type": "object", @@ -15,5 +15,5 @@ } }, "required": ["items"], - "$id": "https://example.com/ReturnInfo.schema.json" + "$id": "https://api.commercetools.com/ReturnInfo.schema.json" } diff --git a/json-schemas/ReturnInfoDraft.schema.json b/json-schemas/ReturnInfoDraft.schema.json new file mode 100644 index 00000000..c3cc225c --- /dev/null +++ b/json-schemas/ReturnInfoDraft.schema.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ReturnInfoDraft", + "type": "object", + "properties": { + "returnTrackingId": {"type": "string"}, + "items": { + "type": "array", + "items": {"$ref": "ReturnItemDraft.schema.json"} + }, + "returnDate": { + "type": "string", + "format": "date-time" + } + }, + "required": ["items"], + "$id": "https://api.commercetools.com/ReturnInfoDraft.schema.json" +} diff --git a/json-schemas/ReturnItem.schema.json b/json-schemas/ReturnItem.schema.json index 37a4e18b..a2a584c3 100644 --- a/json-schemas/ReturnItem.schema.json +++ b/json-schemas/ReturnItem.schema.json @@ -1,9 +1,9 @@ { "oneOf": [ - {"$ref": "https://example.com/CustomLineItemReturnItem.schema.json"}, - {"$ref": "https://example.com/LineItemReturnItem.schema.json"} + {"$ref": "https://api.commercetools.com/CustomLineItemReturnItem.schema.json"}, + {"$ref": "https://api.commercetools.com/LineItemReturnItem.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReturnItem", "type": "object", @@ -18,9 +18,13 @@ "type": "string", "format": "date-time" }, + "custom": {"$ref": "CustomFields.schema.json"}, "comment": {"type": "string"}, "id": {"type": "string"}, - "type": {"type": "string"}, + "type": {"enum": [ + "CustomLineItemReturnItem", + "LineItemReturnItem" + ]}, "paymentState": {"$ref": "ReturnPaymentStateEnum.schema.json"} }, "required": [ @@ -32,6 +36,6 @@ "lastModifiedAt", "createdAt" ], - "$id": "https://example.com/ReturnItem.schema.json", + "$id": "https://api.commercetools.com/ReturnItem.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ReturnItemDraft.schema.json b/json-schemas/ReturnItemDraft.schema.json index d23a703e..abc1e646 100644 --- a/json-schemas/ReturnItemDraft.schema.json +++ b/json-schemas/ReturnItemDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReturnItemDraft", "type": "object", @@ -8,11 +8,12 @@ "customLineItemId": {"type": "string"}, "comment": {"type": "string"}, "quantity": {"type": "number"}, - "lineItemId": {"type": "string"} + "lineItemId": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": [ "quantity", "shipmentState" ], - "$id": "https://example.com/ReturnItemDraft.schema.json" + "$id": "https://api.commercetools.com/ReturnItemDraft.schema.json" } diff --git a/json-schemas/ReturnPaymentStateEnum.schema.json b/json-schemas/ReturnPaymentStateEnum.schema.json index b1b6b417..cf05f948 100644 --- a/json-schemas/ReturnPaymentStateEnum.schema.json +++ b/json-schemas/ReturnPaymentStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ReturnPaymentState", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "Refunded", "NotRefunded" ], - "$id": "https://example.com/ReturnPaymentStateEnum.schema.json" + "$id": "https://api.commercetools.com/ReturnPaymentStateEnum.schema.json" } diff --git a/json-schemas/ReturnShipmentStateEnum.schema.json b/json-schemas/ReturnShipmentStateEnum.schema.json index 280c2e20..22210008 100644 --- a/json-schemas/ReturnShipmentStateEnum.schema.json +++ b/json-schemas/ReturnShipmentStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ReturnShipmentState", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "BackInStock", "Unusable" ], - "$id": "https://example.com/ReturnShipmentStateEnum.schema.json" + "$id": "https://api.commercetools.com/ReturnShipmentStateEnum.schema.json" } diff --git a/json-schemas/Review.schema.json b/json-schemas/Review.schema.json index 61d06a22..3c0aa6e1 100644 --- a/json-schemas/Review.schema.json +++ b/json-schemas/Review.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Review", "type": "object", @@ -43,5 +43,5 @@ "lastModifiedAt", "includedInStatistics" ], - "$id": "https://example.com/Review.schema.json" + "$id": "https://api.commercetools.com/Review.schema.json" } diff --git a/json-schemas/ReviewCreatedMessage.schema.json b/json-schemas/ReviewCreatedMessage.schema.json index 5f3b43b6..9c53ed2f 100644 --- a/json-schemas/ReviewCreatedMessage.schema.json +++ b/json-schemas/ReviewCreatedMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewCreatedMessage", "type": "object", @@ -34,5 +34,5 @@ "type", "review" ], - "$id": "https://example.com/ReviewCreatedMessage.schema.json" + "$id": "https://api.commercetools.com/ReviewCreatedMessage.schema.json" } diff --git a/json-schemas/ReviewCreatedMessagePayload.schema.json b/json-schemas/ReviewCreatedMessagePayload.schema.json index bdebfe67..c4552758 100644 --- a/json-schemas/ReviewCreatedMessagePayload.schema.json +++ b/json-schemas/ReviewCreatedMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewCreatedMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "review" ], - "$id": "https://example.com/ReviewCreatedMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ReviewCreatedMessagePayload.schema.json" } diff --git a/json-schemas/ReviewDraft.schema.json b/json-schemas/ReviewDraft.schema.json index 47519797..5d9a04b5 100644 --- a/json-schemas/ReviewDraft.schema.json +++ b/json-schemas/ReviewDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ReviewDraft", "type": "object", "properties": { @@ -23,5 +23,5 @@ ]}, "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, - "$id": "https://example.com/ReviewDraft.schema.json" + "$id": "https://api.commercetools.com/ReviewDraft.schema.json" } diff --git a/json-schemas/ReviewPagedQueryResponse.schema.json b/json-schemas/ReviewPagedQueryResponse.schema.json index 7d177744..b450964c 100644 --- a/json-schemas/ReviewPagedQueryResponse.schema.json +++ b/json-schemas/ReviewPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/ReviewPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ReviewPagedQueryResponse.schema.json" } diff --git a/json-schemas/ReviewRatingSetMessage.schema.json b/json-schemas/ReviewRatingSetMessage.schema.json index d4f926f9..d3195c76 100644 --- a/json-schemas/ReviewRatingSetMessage.schema.json +++ b/json-schemas/ReviewRatingSetMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewRatingSetMessage", "type": "object", @@ -37,5 +37,5 @@ "type", "includedInStatistics" ], - "$id": "https://example.com/ReviewRatingSetMessage.schema.json" + "$id": "https://api.commercetools.com/ReviewRatingSetMessage.schema.json" } diff --git a/json-schemas/ReviewRatingSetMessagePayload.schema.json b/json-schemas/ReviewRatingSetMessagePayload.schema.json index bc92962d..05ea80f6 100644 --- a/json-schemas/ReviewRatingSetMessagePayload.schema.json +++ b/json-schemas/ReviewRatingSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewRatingSetMessagePayload", "type": "object", @@ -14,5 +14,5 @@ "type", "includedInStatistics" ], - "$id": "https://example.com/ReviewRatingSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ReviewRatingSetMessagePayload.schema.json" } diff --git a/json-schemas/ReviewRatingStatistics.schema.json b/json-schemas/ReviewRatingStatistics.schema.json index 5de5e6be..d2ef218a 100644 --- a/json-schemas/ReviewRatingStatistics.schema.json +++ b/json-schemas/ReviewRatingStatistics.schema.json @@ -1,13 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewRatingStatistics", "type": "object", "properties": { - "count": { - "type": "number", - "format": "integer" - }, + "count": {"type": "number"}, "highestRating": {"type": "number"}, "lowestRating": {"type": "number"}, "ratingsDistribution": {"type": "object"}, @@ -20,5 +17,5 @@ "count", "ratingsDistribution" ], - "$id": "https://example.com/ReviewRatingStatistics.schema.json" + "$id": "https://api.commercetools.com/ReviewRatingStatistics.schema.json" } diff --git a/json-schemas/ReviewReference.schema.json b/json-schemas/ReviewReference.schema.json index 95cfe667..f1985ef1 100644 --- a/json-schemas/ReviewReference.schema.json +++ b/json-schemas/ReviewReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Review](ctp:api:type:Review).", "additionalProperties": false, "title": "ReviewReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ReviewReference.schema.json" + "$id": "https://api.commercetools.com/ReviewReference.schema.json" } diff --git a/json-schemas/ReviewResourceIdentifier.schema.json b/json-schemas/ReviewResourceIdentifier.schema.json index c65319cf..2bf3c485 100644 --- a/json-schemas/ReviewResourceIdentifier.schema.json +++ b/json-schemas/ReviewResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Review](ctp:api:type:Review).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ReviewResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ReviewResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ReviewResourceIdentifier.schema.json" } diff --git a/json-schemas/ReviewSetAuthorNameAction.schema.json b/json-schemas/ReviewSetAuthorNameAction.schema.json index 269030c6..74b789a7 100644 --- a/json-schemas/ReviewSetAuthorNameAction.schema.json +++ b/json-schemas/ReviewSetAuthorNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetAuthorNameAction", "type": "object", @@ -8,5 +8,5 @@ "authorName": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ReviewSetAuthorNameAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetAuthorNameAction.schema.json" } diff --git a/json-schemas/ReviewSetCustomFieldAction.schema.json b/json-schemas/ReviewSetCustomFieldAction.schema.json index 2fbedad6..faff61dc 100644 --- a/json-schemas/ReviewSetCustomFieldAction.schema.json +++ b/json-schemas/ReviewSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/ReviewSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetCustomFieldAction.schema.json" } diff --git a/json-schemas/ReviewSetCustomTypeAction.schema.json b/json-schemas/ReviewSetCustomTypeAction.schema.json index 64db8a6e..eb32147b 100644 --- a/json-schemas/ReviewSetCustomTypeAction.schema.json +++ b/json-schemas/ReviewSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/ReviewSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetCustomTypeAction.schema.json" } diff --git a/json-schemas/ReviewSetCustomerAction.schema.json b/json-schemas/ReviewSetCustomerAction.schema.json index 520adae7..19094595 100644 --- a/json-schemas/ReviewSetCustomerAction.schema.json +++ b/json-schemas/ReviewSetCustomerAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetCustomerAction", "type": "object", @@ -8,5 +8,5 @@ "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ReviewSetCustomerAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetCustomerAction.schema.json" } diff --git a/json-schemas/ReviewSetKeyAction.schema.json b/json-schemas/ReviewSetKeyAction.schema.json index ed85cd35..72cd3872 100644 --- a/json-schemas/ReviewSetKeyAction.schema.json +++ b/json-schemas/ReviewSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ReviewSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetKeyAction.schema.json" } diff --git a/json-schemas/ReviewSetLocaleAction.schema.json b/json-schemas/ReviewSetLocaleAction.schema.json index 728abab8..c8985471 100644 --- a/json-schemas/ReviewSetLocaleAction.schema.json +++ b/json-schemas/ReviewSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/ReviewSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetLocaleAction.schema.json" } diff --git a/json-schemas/ReviewSetRatingAction.schema.json b/json-schemas/ReviewSetRatingAction.schema.json index f0057789..3d91ca7a 100644 --- a/json-schemas/ReviewSetRatingAction.schema.json +++ b/json-schemas/ReviewSetRatingAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetRatingAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setRating"]} }, "required": ["action"], - "$id": "https://example.com/ReviewSetRatingAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetRatingAction.schema.json" } diff --git a/json-schemas/ReviewSetTargetAction.schema.json b/json-schemas/ReviewSetTargetAction.schema.json index a4abe351..63a0ec18 100644 --- a/json-schemas/ReviewSetTargetAction.schema.json +++ b/json-schemas/ReviewSetTargetAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetTargetAction", "type": "object", @@ -18,5 +18,5 @@ "action", "target" ], - "$id": "https://example.com/ReviewSetTargetAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetTargetAction.schema.json" } diff --git a/json-schemas/ReviewSetTextAction.schema.json b/json-schemas/ReviewSetTextAction.schema.json index 73b8e69b..72f06a82 100644 --- a/json-schemas/ReviewSetTextAction.schema.json +++ b/json-schemas/ReviewSetTextAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetTextAction", "type": "object", @@ -8,5 +8,5 @@ "text": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ReviewSetTextAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetTextAction.schema.json" } diff --git a/json-schemas/ReviewSetTitleAction.schema.json b/json-schemas/ReviewSetTitleAction.schema.json index 374bd99e..5bbefcdd 100644 --- a/json-schemas/ReviewSetTitleAction.schema.json +++ b/json-schemas/ReviewSetTitleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewSetTitleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setTitle"]} }, "required": ["action"], - "$id": "https://example.com/ReviewSetTitleAction.schema.json" + "$id": "https://api.commercetools.com/ReviewSetTitleAction.schema.json" } diff --git a/json-schemas/ReviewStateTransitionMessage.schema.json b/json-schemas/ReviewStateTransitionMessage.schema.json index 09451f13..dd673102 100644 --- a/json-schemas/ReviewStateTransitionMessage.schema.json +++ b/json-schemas/ReviewStateTransitionMessage.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewStateTransitionMessage", "type": "object", @@ -44,5 +44,5 @@ "target", "force" ], - "$id": "https://example.com/ReviewStateTransitionMessage.schema.json" + "$id": "https://api.commercetools.com/ReviewStateTransitionMessage.schema.json" } diff --git a/json-schemas/ReviewStateTransitionMessagePayload.schema.json b/json-schemas/ReviewStateTransitionMessagePayload.schema.json index 4166ecd7..7a67fb35 100644 --- a/json-schemas/ReviewStateTransitionMessagePayload.schema.json +++ b/json-schemas/ReviewStateTransitionMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewStateTransitionMessagePayload", "type": "object", @@ -21,5 +21,5 @@ "target", "force" ], - "$id": "https://example.com/ReviewStateTransitionMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ReviewStateTransitionMessagePayload.schema.json" } diff --git a/json-schemas/ReviewTransitionStateAction.schema.json b/json-schemas/ReviewTransitionStateAction.schema.json index e36bc8b8..40e49f6d 100644 --- a/json-schemas/ReviewTransitionStateAction.schema.json +++ b/json-schemas/ReviewTransitionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewTransitionStateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "state" ], - "$id": "https://example.com/ReviewTransitionStateAction.schema.json" + "$id": "https://api.commercetools.com/ReviewTransitionStateAction.schema.json" } diff --git a/json-schemas/ReviewUpdate.schema.json b/json-schemas/ReviewUpdate.schema.json index cec6724b..e8b8651a 100644 --- a/json-schemas/ReviewUpdate.schema.json +++ b/json-schemas/ReviewUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ReviewUpdate.schema.json" + "$id": "https://api.commercetools.com/ReviewUpdate.schema.json" } diff --git a/json-schemas/ReviewUpdateAction.schema.json b/json-schemas/ReviewUpdateAction.schema.json index 816335f7..2018287a 100644 --- a/json-schemas/ReviewUpdateAction.schema.json +++ b/json-schemas/ReviewUpdateAction.schema.json @@ -1,23 +1,35 @@ { "oneOf": [ - {"$ref": "https://example.com/ReviewSetAuthorNameAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetCustomerAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetRatingAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetTargetAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetTextAction.schema.json"}, - {"$ref": "https://example.com/ReviewSetTitleAction.schema.json"}, - {"$ref": "https://example.com/ReviewTransitionStateAction.schema.json"} + {"$ref": "https://api.commercetools.com/ReviewSetAuthorNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetCustomerAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetRatingAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetTargetAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetTextAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewSetTitleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ReviewTransitionStateAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ReviewUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "setAuthorName", + "setCustomField", + "setCustomType", + "setCustomer", + "setKey", + "setLocale", + "setRating", + "setTarget", + "setText", + "setTitle", + "transitionState" + ]}}, "required": ["action"], - "$id": "https://example.com/ReviewUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ReviewUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/RoundingModeEnum.schema.json b/json-schemas/RoundingModeEnum.schema.json index 96dbcb86..5e0095c4 100644 --- a/json-schemas/RoundingModeEnum.schema.json +++ b/json-schemas/RoundingModeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "RoundingMode", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "HalfUp", "HalfDown" ], - "$id": "https://example.com/RoundingModeEnum.schema.json" + "$id": "https://api.commercetools.com/RoundingModeEnum.schema.json" } diff --git a/json-schemas/ScopedPrice.schema.json b/json-schemas/ScopedPrice.schema.json index 7a3f6a06..8003ebf7 100644 --- a/json-schemas/ScopedPrice.schema.json +++ b/json-schemas/ScopedPrice.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ScopedPrice", "type": "object", @@ -26,5 +26,5 @@ "value", "currentValue" ], - "$id": "https://example.com/ScopedPrice.schema.json" + "$id": "https://api.commercetools.com/ScopedPrice.schema.json" } diff --git a/json-schemas/ScoreShippingRateInput.schema.json b/json-schemas/ScoreShippingRateInput.schema.json index 2b17beac..ed7d565f 100644 --- a/json-schemas/ScoreShippingRateInput.schema.json +++ b/json-schemas/ScoreShippingRateInput.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ScoreShippingRateInput", "type": "object", @@ -11,5 +11,5 @@ "type", "score" ], - "$id": "https://example.com/ScoreShippingRateInput.schema.json" + "$id": "https://api.commercetools.com/ScoreShippingRateInput.schema.json" } diff --git a/json-schemas/ScoreShippingRateInputDraft.schema.json b/json-schemas/ScoreShippingRateInputDraft.schema.json index e3cf7785..74aec66b 100644 --- a/json-schemas/ScoreShippingRateInputDraft.schema.json +++ b/json-schemas/ScoreShippingRateInputDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ScoreShippingRateInputDraft", "type": "object", @@ -11,5 +11,5 @@ "type", "score" ], - "$id": "https://example.com/ScoreShippingRateInputDraft.schema.json" + "$id": "https://api.commercetools.com/ScoreShippingRateInputDraft.schema.json" } diff --git a/json-schemas/SearchDeactivatedError.schema.json b/json-schemas/SearchDeactivatedError.schema.json index 1f23261b..a70393ba 100644 --- a/json-schemas/SearchDeactivatedError.schema.json +++ b/json-schemas/SearchDeactivatedError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchDeactivatedError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SearchDeactivatedError.schema.json" + "$id": "https://api.commercetools.com/SearchDeactivatedError.schema.json" } diff --git a/json-schemas/SearchExecutionFailureError.schema.json b/json-schemas/SearchExecutionFailureError.schema.json index 5d064029..8a96d315 100644 --- a/json-schemas/SearchExecutionFailureError.schema.json +++ b/json-schemas/SearchExecutionFailureError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchExecutionFailureError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SearchExecutionFailureError.schema.json" + "$id": "https://api.commercetools.com/SearchExecutionFailureError.schema.json" } diff --git a/json-schemas/SearchFacetPathNotFoundError.schema.json b/json-schemas/SearchFacetPathNotFoundError.schema.json index 5f4fb7f7..3e95c2b5 100644 --- a/json-schemas/SearchFacetPathNotFoundError.schema.json +++ b/json-schemas/SearchFacetPathNotFoundError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchFacetPathNotFoundError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SearchFacetPathNotFoundError.schema.json" + "$id": "https://api.commercetools.com/SearchFacetPathNotFoundError.schema.json" } diff --git a/json-schemas/SearchIndexingConfiguration.schema.json b/json-schemas/SearchIndexingConfiguration.schema.json index cb431d2a..87c26c21 100644 --- a/json-schemas/SearchIndexingConfiguration.schema.json +++ b/json-schemas/SearchIndexingConfiguration.schema.json @@ -1,8 +1,12 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Controls indexing of resources to be provided on high performance read-only search endpoints.", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "SearchIndexingConfiguration", "type": "object", - "properties": {"products": {"$ref": "SearchIndexingConfigurationValues.schema.json"}}, - "$id": "https://example.com/SearchIndexingConfiguration.schema.json" + "properties": { + "orders": {"$ref": "SearchIndexingConfigurationValues.schema.json"}, + "products": {"$ref": "SearchIndexingConfigurationValues.schema.json"} + }, + "$id": "https://api.commercetools.com/SearchIndexingConfiguration.schema.json" } diff --git a/json-schemas/SearchIndexingConfigurationStatusEnum.schema.json b/json-schemas/SearchIndexingConfigurationStatusEnum.schema.json new file mode 100644 index 00000000..501c3a51 --- /dev/null +++ b/json-schemas/SearchIndexingConfigurationStatusEnum.schema.json @@ -0,0 +1,12 @@ +{ + "description": "Status of resource indexing.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "SearchIndexingConfigurationStatus", + "type": "string", + "enum": [ + "Activated", + "Deactivated", + "Indexing" + ], + "$id": "https://api.commercetools.com/SearchIndexingConfigurationStatusEnum.schema.json" +} diff --git a/json-schemas/SearchIndexingConfigurationValues.schema.json b/json-schemas/SearchIndexingConfigurationValues.schema.json index 35bebb42..b8d8cc58 100644 --- a/json-schemas/SearchIndexingConfigurationValues.schema.json +++ b/json-schemas/SearchIndexingConfigurationValues.schema.json @@ -1,8 +1,15 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "SearchIndexingConfigurationValues", "type": "object", - "properties": {"status": {"type": "string"}}, - "$id": "https://example.com/SearchIndexingConfigurationValues.schema.json" + "properties": { + "status": {"$ref": "SearchIndexingConfigurationStatusEnum.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"} + }, + "$id": "https://api.commercetools.com/SearchIndexingConfigurationValues.schema.json" } diff --git a/json-schemas/SearchIndexingInProgressError.schema.json b/json-schemas/SearchIndexingInProgressError.schema.json index 7e75f1de..2f639a64 100644 --- a/json-schemas/SearchIndexingInProgressError.schema.json +++ b/json-schemas/SearchIndexingInProgressError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchIndexingInProgressError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SearchIndexingInProgressError.schema.json" + "$id": "https://api.commercetools.com/SearchIndexingInProgressError.schema.json" } diff --git a/json-schemas/SearchKeyword.schema.json b/json-schemas/SearchKeyword.schema.json index 0040bf36..971a0878 100644 --- a/json-schemas/SearchKeyword.schema.json +++ b/json-schemas/SearchKeyword.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchKeyword", "type": "object", @@ -8,5 +8,5 @@ "text": {"type": "string"} }, "required": ["text"], - "$id": "https://example.com/SearchKeyword.schema.json" + "$id": "https://api.commercetools.com/SearchKeyword.schema.json" } diff --git a/json-schemas/SearchKeywords.schema.json b/json-schemas/SearchKeywords.schema.json index f2c75eb3..defe7927 100644 --- a/json-schemas/SearchKeywords.schema.json +++ b/json-schemas/SearchKeywords.schema.json @@ -3,10 +3,10 @@ "type": "array", "items": {"$ref": "SearchKeyword.schema.json"} }}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SearchKeywords", "type": "object", "properties": {}, - "$id": "https://example.com/SearchKeywords.schema.json" + "$id": "https://api.commercetools.com/SearchKeywords.schema.json" } diff --git a/json-schemas/SelectionModeEnum.schema.json b/json-schemas/SelectionModeEnum.schema.json index e880241f..62cf1fe0 100644 --- a/json-schemas/SelectionModeEnum.schema.json +++ b/json-schemas/SelectionModeEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Defines which matching items are to be discounted.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "SelectionMode", "type": "string", "enum": [ "Cheapest", "MostExpensive" ], - "$id": "https://example.com/SelectionModeEnum.schema.json" + "$id": "https://api.commercetools.com/SelectionModeEnum.schema.json" } diff --git a/json-schemas/SemanticErrorError.schema.json b/json-schemas/SemanticErrorError.schema.json index 2e4711b4..c15db17d 100644 --- a/json-schemas/SemanticErrorError.schema.json +++ b/json-schemas/SemanticErrorError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SemanticErrorError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SemanticErrorError.schema.json" + "$id": "https://api.commercetools.com/SemanticErrorError.schema.json" } diff --git a/json-schemas/ShipmentStateEnum.schema.json b/json-schemas/ShipmentStateEnum.schema.json index 1857bddc..dd2ebebd 100644 --- a/json-schemas/ShipmentStateEnum.schema.json +++ b/json-schemas/ShipmentStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ShipmentState", "type": "string", "enum": [ @@ -10,5 +10,5 @@ "Partial", "Backorder" ], - "$id": "https://example.com/ShipmentStateEnum.schema.json" + "$id": "https://api.commercetools.com/ShipmentStateEnum.schema.json" } diff --git a/json-schemas/ShippingInfo.schema.json b/json-schemas/ShippingInfo.schema.json index e16ff49f..05c1c07f 100644 --- a/json-schemas/ShippingInfo.schema.json +++ b/json-schemas/ShippingInfo.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingInfo", "type": "object", @@ -24,5 +24,5 @@ "shippingRate", "shippingMethodState" ], - "$id": "https://example.com/ShippingInfo.schema.json" + "$id": "https://api.commercetools.com/ShippingInfo.schema.json" } diff --git a/json-schemas/ShippingInfoImportDraft.schema.json b/json-schemas/ShippingInfoImportDraft.schema.json index 2ed65aa6..0aedfdee 100644 --- a/json-schemas/ShippingInfoImportDraft.schema.json +++ b/json-schemas/ShippingInfoImportDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingInfoImportDraft", "type": "object", @@ -22,5 +22,5 @@ "price", "shippingRate" ], - "$id": "https://example.com/ShippingInfoImportDraft.schema.json" + "$id": "https://api.commercetools.com/ShippingInfoImportDraft.schema.json" } diff --git a/json-schemas/ShippingMethod.schema.json b/json-schemas/ShippingMethod.schema.json index 1312020f..82db34be 100644 --- a/json-schemas/ShippingMethod.schema.json +++ b/json-schemas/ShippingMethod.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethod", "type": "object", "properties": { + "localizedName": {"$ref": "LocalizedString.schema.json"}, "lastModifiedAt": { "type": "string", "format": "date-time" @@ -39,5 +40,5 @@ "zoneRates", "isDefault" ], - "$id": "https://example.com/ShippingMethod.schema.json" + "$id": "https://api.commercetools.com/ShippingMethod.schema.json" } diff --git a/json-schemas/ShippingMethodAddShippingRateAction.schema.json b/json-schemas/ShippingMethodAddShippingRateAction.schema.json index e02952a8..0869b6bb 100644 --- a/json-schemas/ShippingMethodAddShippingRateAction.schema.json +++ b/json-schemas/ShippingMethodAddShippingRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodAddShippingRateAction", "type": "object", @@ -13,5 +13,5 @@ "zone", "shippingRate" ], - "$id": "https://example.com/ShippingMethodAddShippingRateAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodAddShippingRateAction.schema.json" } diff --git a/json-schemas/ShippingMethodAddZoneAction.schema.json b/json-schemas/ShippingMethodAddZoneAction.schema.json index 3d3f8d1b..0f0a64d8 100644 --- a/json-schemas/ShippingMethodAddZoneAction.schema.json +++ b/json-schemas/ShippingMethodAddZoneAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodAddZoneAction", "type": "object", @@ -11,5 +11,5 @@ "action", "zone" ], - "$id": "https://example.com/ShippingMethodAddZoneAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodAddZoneAction.schema.json" } diff --git a/json-schemas/ShippingMethodChangeIsDefaultAction.schema.json b/json-schemas/ShippingMethodChangeIsDefaultAction.schema.json index 0e85141c..14aab507 100644 --- a/json-schemas/ShippingMethodChangeIsDefaultAction.schema.json +++ b/json-schemas/ShippingMethodChangeIsDefaultAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodChangeIsDefaultAction", "type": "object", @@ -11,5 +11,5 @@ "action", "isDefault" ], - "$id": "https://example.com/ShippingMethodChangeIsDefaultAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodChangeIsDefaultAction.schema.json" } diff --git a/json-schemas/ShippingMethodChangeNameAction.schema.json b/json-schemas/ShippingMethodChangeNameAction.schema.json index 962921d6..75ad023c 100644 --- a/json-schemas/ShippingMethodChangeNameAction.schema.json +++ b/json-schemas/ShippingMethodChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ShippingMethodChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodChangeNameAction.schema.json" } diff --git a/json-schemas/ShippingMethodChangeTaxCategoryAction.schema.json b/json-schemas/ShippingMethodChangeTaxCategoryAction.schema.json index e33e09c0..c43b4ad7 100644 --- a/json-schemas/ShippingMethodChangeTaxCategoryAction.schema.json +++ b/json-schemas/ShippingMethodChangeTaxCategoryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodChangeTaxCategoryAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxCategory" ], - "$id": "https://example.com/ShippingMethodChangeTaxCategoryAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodChangeTaxCategoryAction.schema.json" } diff --git a/json-schemas/ShippingMethodDoesNotMatchCartError.schema.json b/json-schemas/ShippingMethodDoesNotMatchCartError.schema.json index 7ac3df80..eb65da5d 100644 --- a/json-schemas/ShippingMethodDoesNotMatchCartError.schema.json +++ b/json-schemas/ShippingMethodDoesNotMatchCartError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodDoesNotMatchCartError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/ShippingMethodDoesNotMatchCartError.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodDoesNotMatchCartError.schema.json" } diff --git a/json-schemas/ShippingMethodDraft.schema.json b/json-schemas/ShippingMethodDraft.schema.json index 9b8ff1d1..31003c65 100644 --- a/json-schemas/ShippingMethodDraft.schema.json +++ b/json-schemas/ShippingMethodDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodDraft", "type": "object", @@ -9,6 +9,7 @@ "items": {"$ref": "ZoneRateDraft.schema.json"} }, "predicate": {"type": "string"}, + "localizedName": {"$ref": "LocalizedString.schema.json"}, "isDefault": {"type": "boolean"}, "custom": {"$ref": "CustomFieldsDraft.schema.json"}, "name": {"type": "string"}, @@ -23,5 +24,5 @@ "zoneRates", "isDefault" ], - "$id": "https://example.com/ShippingMethodDraft.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodDraft.schema.json" } diff --git a/json-schemas/ShippingMethodPagedQueryResponse.schema.json b/json-schemas/ShippingMethodPagedQueryResponse.schema.json index 4fe30ac2..40a78bc5 100644 --- a/json-schemas/ShippingMethodPagedQueryResponse.schema.json +++ b/json-schemas/ShippingMethodPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) with `results` containing an array of [ShippingMethod](ctp:api:type:ShippingMethod).", "additionalProperties": false, "title": "ShippingMethodPagedQueryResponse", "type": "object", @@ -17,5 +18,5 @@ "count", "results" ], - "$id": "https://example.com/ShippingMethodPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodPagedQueryResponse.schema.json" } diff --git a/json-schemas/ShippingMethodReference.schema.json b/json-schemas/ShippingMethodReference.schema.json index f461ae65..bbb8ff7a 100644 --- a/json-schemas/ShippingMethodReference.schema.json +++ b/json-schemas/ShippingMethodReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [ShippingMethod](ctp:api:type:ShippingMethod).", "additionalProperties": false, "title": "ShippingMethodReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ShippingMethodReference.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodReference.schema.json" } diff --git a/json-schemas/ShippingMethodRemoveShippingRateAction.schema.json b/json-schemas/ShippingMethodRemoveShippingRateAction.schema.json index 862e7ba4..0c487c12 100644 --- a/json-schemas/ShippingMethodRemoveShippingRateAction.schema.json +++ b/json-schemas/ShippingMethodRemoveShippingRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodRemoveShippingRateAction", "type": "object", @@ -13,5 +13,5 @@ "zone", "shippingRate" ], - "$id": "https://example.com/ShippingMethodRemoveShippingRateAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodRemoveShippingRateAction.schema.json" } diff --git a/json-schemas/ShippingMethodRemoveZoneAction.schema.json b/json-schemas/ShippingMethodRemoveZoneAction.schema.json index 2839ccd5..05d3a065 100644 --- a/json-schemas/ShippingMethodRemoveZoneAction.schema.json +++ b/json-schemas/ShippingMethodRemoveZoneAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodRemoveZoneAction", "type": "object", @@ -11,5 +11,5 @@ "action", "zone" ], - "$id": "https://example.com/ShippingMethodRemoveZoneAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodRemoveZoneAction.schema.json" } diff --git a/json-schemas/ShippingMethodResourceIdentifier.schema.json b/json-schemas/ShippingMethodResourceIdentifier.schema.json index c3e4f8e7..05a993a4 100644 --- a/json-schemas/ShippingMethodResourceIdentifier.schema.json +++ b/json-schemas/ShippingMethodResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ShippingMethodResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ShippingMethodResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ShippingMethodResourceIdentifier.schema.json" } diff --git a/json-schemas/ShippingMethodSetCustomFieldAction.schema.json b/json-schemas/ShippingMethodSetCustomFieldAction.schema.json index 158b6364..309dfcdd 100644 --- a/json-schemas/ShippingMethodSetCustomFieldAction.schema.json +++ b/json-schemas/ShippingMethodSetCustomFieldAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This action sets, overwrites, or removes any existing [Custom Field](/projects/custom-fields) for an existing ShippingMethod.", "additionalProperties": false, "title": "ShippingMethodSetCustomFieldAction", "type": "object", @@ -19,5 +20,5 @@ "action", "name" ], - "$id": "https://example.com/ShippingMethodSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetCustomFieldAction.schema.json" } diff --git a/json-schemas/ShippingMethodSetCustomTypeAction.schema.json b/json-schemas/ShippingMethodSetCustomTypeAction.schema.json index 932c59fc..f305b44d 100644 --- a/json-schemas/ShippingMethodSetCustomTypeAction.schema.json +++ b/json-schemas/ShippingMethodSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/ShippingMethodSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetCustomTypeAction.schema.json" } diff --git a/json-schemas/ShippingMethodSetDescriptionAction.schema.json b/json-schemas/ShippingMethodSetDescriptionAction.schema.json index 69b6e361..88076ab5 100644 --- a/json-schemas/ShippingMethodSetDescriptionAction.schema.json +++ b/json-schemas/ShippingMethodSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShippingMethodSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetDescriptionAction.schema.json" } diff --git a/json-schemas/ShippingMethodSetKeyAction.schema.json b/json-schemas/ShippingMethodSetKeyAction.schema.json index 022deae4..a89ee864 100644 --- a/json-schemas/ShippingMethodSetKeyAction.schema.json +++ b/json-schemas/ShippingMethodSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShippingMethodSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetKeyAction.schema.json" } diff --git a/json-schemas/ShippingMethodSetLocalizedDescriptionAction.schema.json b/json-schemas/ShippingMethodSetLocalizedDescriptionAction.schema.json index bf17f0b2..68df7367 100644 --- a/json-schemas/ShippingMethodSetLocalizedDescriptionAction.schema.json +++ b/json-schemas/ShippingMethodSetLocalizedDescriptionAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodSetLocalizedDescriptionAction", "type": "object", "properties": { - "localizedDescription": {"type": "string"}, + "localizedDescription": {"$ref": "LocalizedString.schema.json"}, "action": {"enum": ["setLocalizedDescription"]} }, "required": ["action"], - "$id": "https://example.com/ShippingMethodSetLocalizedDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetLocalizedDescriptionAction.schema.json" } diff --git a/json-schemas/ShippingMethodSetLocalizedNameAction.schema.json b/json-schemas/ShippingMethodSetLocalizedNameAction.schema.json new file mode 100644 index 00000000..eb062828 --- /dev/null +++ b/json-schemas/ShippingMethodSetLocalizedNameAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "ShippingMethodSetLocalizedNameAction", + "type": "object", + "properties": { + "action": {"enum": ["setLocalizedName"]}, + "localizedName": {"$ref": "LocalizedString.schema.json"} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/ShippingMethodSetLocalizedNameAction.schema.json" +} diff --git a/json-schemas/ShippingMethodSetPredicateAction.schema.json b/json-schemas/ShippingMethodSetPredicateAction.schema.json index 62a3fb5a..99e3f2e0 100644 --- a/json-schemas/ShippingMethodSetPredicateAction.schema.json +++ b/json-schemas/ShippingMethodSetPredicateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodSetPredicateAction", "type": "object", @@ -8,5 +8,5 @@ "predicate": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShippingMethodSetPredicateAction.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodSetPredicateAction.schema.json" } diff --git a/json-schemas/ShippingMethodStateEnum.schema.json b/json-schemas/ShippingMethodStateEnum.schema.json index 2c28dfca..90c60163 100644 --- a/json-schemas/ShippingMethodStateEnum.schema.json +++ b/json-schemas/ShippingMethodStateEnum.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ShippingMethodState", "type": "string", "enum": [ "DoesNotMatchCart", "MatchesCart" ], - "$id": "https://example.com/ShippingMethodStateEnum.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodStateEnum.schema.json" } diff --git a/json-schemas/ShippingMethodUpdate.schema.json b/json-schemas/ShippingMethodUpdate.schema.json index 37a753dd..66a28d7a 100644 --- a/json-schemas/ShippingMethodUpdate.schema.json +++ b/json-schemas/ShippingMethodUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ShippingMethodUpdate.schema.json" + "$id": "https://api.commercetools.com/ShippingMethodUpdate.schema.json" } diff --git a/json-schemas/ShippingMethodUpdateAction.schema.json b/json-schemas/ShippingMethodUpdateAction.schema.json index 1a68f8ec..f872fd2b 100644 --- a/json-schemas/ShippingMethodUpdateAction.schema.json +++ b/json-schemas/ShippingMethodUpdateAction.schema.json @@ -1,25 +1,41 @@ { "oneOf": [ - {"$ref": "https://example.com/ShippingMethodAddShippingRateAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodAddZoneAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodChangeIsDefaultAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodChangeTaxCategoryAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodRemoveShippingRateAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodRemoveZoneAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetLocalizedDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ShippingMethodSetPredicateAction.schema.json"} + {"$ref": "https://api.commercetools.com/ShippingMethodAddShippingRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodAddZoneAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodChangeIsDefaultAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodChangeTaxCategoryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodRemoveShippingRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodRemoveZoneAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetLocalizedDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetLocalizedNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShippingMethodSetPredicateAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingMethodUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addShippingRate", + "addZone", + "changeIsDefault", + "changeName", + "changeTaxCategory", + "removeShippingRate", + "removeZone", + "setCustomField", + "setCustomType", + "setDescription", + "setKey", + "setLocalizedDescription", + "setLocalizedName", + "setPredicate" + ]}}, "required": ["action"], - "$id": "https://example.com/ShippingMethodUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ShippingMethodUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ShippingRate.schema.json b/json-schemas/ShippingRate.schema.json index fce89be3..a269724e 100644 --- a/json-schemas/ShippingRate.schema.json +++ b/json-schemas/ShippingRate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRate", "type": "object", @@ -16,5 +16,5 @@ "price", "tiers" ], - "$id": "https://example.com/ShippingRate.schema.json" + "$id": "https://api.commercetools.com/ShippingRate.schema.json" } diff --git a/json-schemas/ShippingRateDraft.schema.json b/json-schemas/ShippingRateDraft.schema.json index 587a842e..88471adf 100644 --- a/json-schemas/ShippingRateDraft.schema.json +++ b/json-schemas/ShippingRateDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRateDraft", "type": "object", @@ -12,5 +12,5 @@ } }, "required": ["price"], - "$id": "https://example.com/ShippingRateDraft.schema.json" + "$id": "https://api.commercetools.com/ShippingRateDraft.schema.json" } diff --git a/json-schemas/ShippingRateInput.schema.json b/json-schemas/ShippingRateInput.schema.json index 13221bd7..a70ebce6 100644 --- a/json-schemas/ShippingRateInput.schema.json +++ b/json-schemas/ShippingRateInput.schema.json @@ -1,14 +1,17 @@ { "oneOf": [ - {"$ref": "https://example.com/ClassificationShippingRateInput.schema.json"}, - {"$ref": "https://example.com/ScoreShippingRateInput.schema.json"} + {"$ref": "https://api.commercetools.com/ClassificationShippingRateInput.schema.json"}, + {"$ref": "https://api.commercetools.com/ScoreShippingRateInput.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRateInput", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "Classification", + "Score" + ]}}, "required": ["type"], - "$id": "https://example.com/ShippingRateInput.schema.json", + "$id": "https://api.commercetools.com/ShippingRateInput.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ShippingRateInputDraft.schema.json b/json-schemas/ShippingRateInputDraft.schema.json index fe9347f5..6f9cc299 100644 --- a/json-schemas/ShippingRateInputDraft.schema.json +++ b/json-schemas/ShippingRateInputDraft.schema.json @@ -1,14 +1,17 @@ { "oneOf": [ - {"$ref": "https://example.com/ClassificationShippingRateInputDraft.schema.json"}, - {"$ref": "https://example.com/ScoreShippingRateInputDraft.schema.json"} + {"$ref": "https://api.commercetools.com/ClassificationShippingRateInputDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/ScoreShippingRateInputDraft.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRateInputDraft", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "Classification", + "Score" + ]}}, "required": ["type"], - "$id": "https://example.com/ShippingRateInputDraft.schema.json", + "$id": "https://api.commercetools.com/ShippingRateInputDraft.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ShippingRateInputType.schema.json b/json-schemas/ShippingRateInputType.schema.json index 4704e475..ef5bf7d5 100644 --- a/json-schemas/ShippingRateInputType.schema.json +++ b/json-schemas/ShippingRateInputType.schema.json @@ -1,15 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/CartClassificationType.schema.json"}, - {"$ref": "https://example.com/CartScoreType.schema.json"}, - {"$ref": "https://example.com/CartValueType.schema.json"} + {"$ref": "https://api.commercetools.com/CartClassificationType.schema.json"}, + {"$ref": "https://api.commercetools.com/CartScoreType.schema.json"}, + {"$ref": "https://api.commercetools.com/CartValueType.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRateInputType", "type": "object", - "properties": {"type": {"$ref": "ShippingRateTierTypeEnum.schema.json"}}, + "properties": {"type": {"enum": [ + "CartClassification", + "CartScore", + "CartValue" + ]}}, "required": ["type"], - "$id": "https://example.com/ShippingRateInputType.schema.json", + "$id": "https://api.commercetools.com/ShippingRateInputType.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ShippingRatePriceTier.schema.json b/json-schemas/ShippingRatePriceTier.schema.json index 48048d98..86833bec 100644 --- a/json-schemas/ShippingRatePriceTier.schema.json +++ b/json-schemas/ShippingRatePriceTier.schema.json @@ -1,15 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/CartClassificationTier.schema.json"}, - {"$ref": "https://example.com/CartScoreTier.schema.json"}, - {"$ref": "https://example.com/CartValueTier.schema.json"} + {"$ref": "https://api.commercetools.com/CartClassificationTier.schema.json"}, + {"$ref": "https://api.commercetools.com/CartScoreTier.schema.json"}, + {"$ref": "https://api.commercetools.com/CartValueTier.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShippingRatePriceTier", "type": "object", - "properties": {"type": {"$ref": "ShippingRateTierTypeEnum.schema.json"}}, + "properties": {"type": {"enum": [ + "CartClassification", + "CartScore", + "CartValue" + ]}}, "required": ["type"], - "$id": "https://example.com/ShippingRatePriceTier.schema.json", + "$id": "https://api.commercetools.com/ShippingRatePriceTier.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/ShippingRateTierTypeEnum.schema.json b/json-schemas/ShippingRateTierTypeEnum.schema.json index 21b63339..79eed56b 100644 --- a/json-schemas/ShippingRateTierTypeEnum.schema.json +++ b/json-schemas/ShippingRateTierTypeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ShippingRateTierType", "type": "string", "enum": [ @@ -7,5 +7,5 @@ "CartClassification", "CartScore" ], - "$id": "https://example.com/ShippingRateTierTypeEnum.schema.json" + "$id": "https://api.commercetools.com/ShippingRateTierTypeEnum.schema.json" } diff --git a/json-schemas/ShoppingList.schema.json b/json-schemas/ShoppingList.schema.json index d89ca0fb..bbc7d0ee 100644 --- a/json-schemas/ShoppingList.schema.json +++ b/json-schemas/ShoppingList.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingList", "type": "object", @@ -17,6 +17,7 @@ "custom": {"$ref": "CustomFields.schema.json"}, "deleteDaysAfterLastModification": {"type": "number"}, "description": {"$ref": "LocalizedString.schema.json"}, + "store": {"$ref": "StoreKeyReference.schema.json"}, "version": {"type": "number"}, "lineItems": { "type": "array", @@ -40,5 +41,5 @@ "lastModifiedAt", "name" ], - "$id": "https://example.com/ShoppingList.schema.json" + "$id": "https://api.commercetools.com/ShoppingList.schema.json" } diff --git a/json-schemas/ShoppingListAddLineItemAction.schema.json b/json-schemas/ShoppingListAddLineItemAction.schema.json index cffbf02a..0dbfab30 100644 --- a/json-schemas/ShoppingListAddLineItemAction.schema.json +++ b/json-schemas/ShoppingListAddLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListAddLineItemAction", "type": "object", @@ -16,5 +16,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListAddLineItemAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListAddLineItemAction.schema.json" } diff --git a/json-schemas/ShoppingListAddTextLineItemAction.schema.json b/json-schemas/ShoppingListAddTextLineItemAction.schema.json index 5c6bc515..7a160184 100644 --- a/json-schemas/ShoppingListAddTextLineItemAction.schema.json +++ b/json-schemas/ShoppingListAddTextLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListAddTextLineItemAction", "type": "object", @@ -18,5 +18,5 @@ "action", "name" ], - "$id": "https://example.com/ShoppingListAddTextLineItemAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListAddTextLineItemAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeLineItemQuantityAction.schema.json b/json-schemas/ShoppingListChangeLineItemQuantityAction.schema.json index 3a929b88..6a62b9bf 100644 --- a/json-schemas/ShoppingListChangeLineItemQuantityAction.schema.json +++ b/json-schemas/ShoppingListChangeLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "lineItemId", "quantity" ], - "$id": "https://example.com/ShoppingListChangeLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeLineItemQuantityAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeLineItemsOrderAction.schema.json b/json-schemas/ShoppingListChangeLineItemsOrderAction.schema.json index cddf9e2f..eaa89c77 100644 --- a/json-schemas/ShoppingListChangeLineItemsOrderAction.schema.json +++ b/json-schemas/ShoppingListChangeLineItemsOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeLineItemsOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "lineItemOrder" ], - "$id": "https://example.com/ShoppingListChangeLineItemsOrderAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeLineItemsOrderAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeNameAction.schema.json b/json-schemas/ShoppingListChangeNameAction.schema.json index 4972715e..a23de73e 100644 --- a/json-schemas/ShoppingListChangeNameAction.schema.json +++ b/json-schemas/ShoppingListChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ShoppingListChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeNameAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeTextLineItemNameAction.schema.json b/json-schemas/ShoppingListChangeTextLineItemNameAction.schema.json index ce609ba7..c5e21ad1 100644 --- a/json-schemas/ShoppingListChangeTextLineItemNameAction.schema.json +++ b/json-schemas/ShoppingListChangeTextLineItemNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeTextLineItemNameAction", "type": "object", @@ -13,5 +13,5 @@ "textLineItemId", "name" ], - "$id": "https://example.com/ShoppingListChangeTextLineItemNameAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeTextLineItemNameAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeTextLineItemQuantityAction.schema.json b/json-schemas/ShoppingListChangeTextLineItemQuantityAction.schema.json index 6c8867d5..fdcfa3c0 100644 --- a/json-schemas/ShoppingListChangeTextLineItemQuantityAction.schema.json +++ b/json-schemas/ShoppingListChangeTextLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeTextLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "textLineItemId", "quantity" ], - "$id": "https://example.com/ShoppingListChangeTextLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeTextLineItemQuantityAction.schema.json" } diff --git a/json-schemas/ShoppingListChangeTextLineItemsOrderAction.schema.json b/json-schemas/ShoppingListChangeTextLineItemsOrderAction.schema.json index 5130eb97..d4406043 100644 --- a/json-schemas/ShoppingListChangeTextLineItemsOrderAction.schema.json +++ b/json-schemas/ShoppingListChangeTextLineItemsOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListChangeTextLineItemsOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "textLineItemOrder" ], - "$id": "https://example.com/ShoppingListChangeTextLineItemsOrderAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListChangeTextLineItemsOrderAction.schema.json" } diff --git a/json-schemas/ShoppingListDraft.schema.json b/json-schemas/ShoppingListDraft.schema.json index 7f4aa739..8be02492 100644 --- a/json-schemas/ShoppingListDraft.schema.json +++ b/json-schemas/ShoppingListDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListDraft", "type": "object", @@ -17,10 +17,11 @@ "deleteDaysAfterLastModification": {"type": "number"}, "name": {"$ref": "LocalizedString.schema.json"}, "description": {"$ref": "LocalizedString.schema.json"}, + "store": {"$ref": "StoreResourceIdentifier.schema.json"}, "key": {"type": "string"}, "slug": {"$ref": "LocalizedString.schema.json"}, "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, "required": ["name"], - "$id": "https://example.com/ShoppingListDraft.schema.json" + "$id": "https://api.commercetools.com/ShoppingListDraft.schema.json" } diff --git a/json-schemas/ShoppingListLineItem.schema.json b/json-schemas/ShoppingListLineItem.schema.json index 200aa850..f484d7db 100644 --- a/json-schemas/ShoppingListLineItem.schema.json +++ b/json-schemas/ShoppingListLineItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListLineItem", "type": "object", @@ -30,5 +30,5 @@ "productType", "quantity" ], - "$id": "https://example.com/ShoppingListLineItem.schema.json" + "$id": "https://api.commercetools.com/ShoppingListLineItem.schema.json" } diff --git a/json-schemas/ShoppingListLineItemDraft.schema.json b/json-schemas/ShoppingListLineItemDraft.schema.json index cc684013..b50ff5af 100644 --- a/json-schemas/ShoppingListLineItemDraft.schema.json +++ b/json-schemas/ShoppingListLineItemDraft.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "ShoppingListLineItemDraft", "type": "object", "properties": { @@ -14,5 +14,5 @@ "productId": {"type": "string"}, "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, - "$id": "https://example.com/ShoppingListLineItemDraft.schema.json" + "$id": "https://api.commercetools.com/ShoppingListLineItemDraft.schema.json" } diff --git a/json-schemas/ShoppingListPagedQueryResponse.schema.json b/json-schemas/ShoppingListPagedQueryResponse.schema.json index 82897164..7c9d9022 100644 --- a/json-schemas/ShoppingListPagedQueryResponse.schema.json +++ b/json-schemas/ShoppingListPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/ShoppingListPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ShoppingListPagedQueryResponse.schema.json" } diff --git a/json-schemas/ShoppingListReference.schema.json b/json-schemas/ShoppingListReference.schema.json index 216d1694..a09352de 100644 --- a/json-schemas/ShoppingListReference.schema.json +++ b/json-schemas/ShoppingListReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [ShoppingList](ctp:api:type:ShoppingList).", "additionalProperties": false, "title": "ShoppingListReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ShoppingListReference.schema.json" + "$id": "https://api.commercetools.com/ShoppingListReference.schema.json" } diff --git a/json-schemas/ShoppingListRemoveLineItemAction.schema.json b/json-schemas/ShoppingListRemoveLineItemAction.schema.json index c09e46bf..0f5460de 100644 --- a/json-schemas/ShoppingListRemoveLineItemAction.schema.json +++ b/json-schemas/ShoppingListRemoveLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListRemoveLineItemAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/ShoppingListRemoveLineItemAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListRemoveLineItemAction.schema.json" } diff --git a/json-schemas/ShoppingListRemoveTextLineItemAction.schema.json b/json-schemas/ShoppingListRemoveTextLineItemAction.schema.json index b67b4373..556d9759 100644 --- a/json-schemas/ShoppingListRemoveTextLineItemAction.schema.json +++ b/json-schemas/ShoppingListRemoveTextLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListRemoveTextLineItemAction", "type": "object", @@ -12,5 +12,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/ShoppingListRemoveTextLineItemAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListRemoveTextLineItemAction.schema.json" } diff --git a/json-schemas/ShoppingListResourceIdentifier.schema.json b/json-schemas/ShoppingListResourceIdentifier.schema.json index 328466d6..392df620 100644 --- a/json-schemas/ShoppingListResourceIdentifier.schema.json +++ b/json-schemas/ShoppingListResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShoppingList](ctp:api:type:ShoppingList).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ShoppingListResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ShoppingListResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ShoppingListResourceIdentifier.schema.json" } diff --git a/json-schemas/ShoppingListSetAnonymousIdAction.schema.json b/json-schemas/ShoppingListSetAnonymousIdAction.schema.json index c19a4296..d43a9f94 100644 --- a/json-schemas/ShoppingListSetAnonymousIdAction.schema.json +++ b/json-schemas/ShoppingListSetAnonymousIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetAnonymousIdAction", "type": "object", @@ -8,5 +8,5 @@ "anonymousId": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetAnonymousIdAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetAnonymousIdAction.schema.json" } diff --git a/json-schemas/ShoppingListSetCustomFieldAction.schema.json b/json-schemas/ShoppingListSetCustomFieldAction.schema.json index 3a56470c..f8eaddcd 100644 --- a/json-schemas/ShoppingListSetCustomFieldAction.schema.json +++ b/json-schemas/ShoppingListSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/ShoppingListSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetCustomFieldAction.schema.json" } diff --git a/json-schemas/ShoppingListSetCustomTypeAction.schema.json b/json-schemas/ShoppingListSetCustomTypeAction.schema.json index 0e1164ee..b94ed7fb 100644 --- a/json-schemas/ShoppingListSetCustomTypeAction.schema.json +++ b/json-schemas/ShoppingListSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetCustomTypeAction.schema.json" } diff --git a/json-schemas/ShoppingListSetCustomerAction.schema.json b/json-schemas/ShoppingListSetCustomerAction.schema.json index ab6cc5e5..f3ae40ed 100644 --- a/json-schemas/ShoppingListSetCustomerAction.schema.json +++ b/json-schemas/ShoppingListSetCustomerAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetCustomerAction", "type": "object", @@ -8,5 +8,5 @@ "customer": {"$ref": "CustomerResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetCustomerAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetCustomerAction.schema.json" } diff --git a/json-schemas/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json b/json-schemas/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json index 569e9eba..3956897c 100644 --- a/json-schemas/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json +++ b/json-schemas/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetDeleteDaysAfterLastModificationAction", "type": "object", @@ -8,5 +8,5 @@ "deleteDaysAfterLastModification": {"type": "number"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json" } diff --git a/json-schemas/ShoppingListSetDescriptionAction.schema.json b/json-schemas/ShoppingListSetDescriptionAction.schema.json index e39de830..bfefbd0e 100644 --- a/json-schemas/ShoppingListSetDescriptionAction.schema.json +++ b/json-schemas/ShoppingListSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetDescriptionAction.schema.json" } diff --git a/json-schemas/ShoppingListSetKeyAction.schema.json b/json-schemas/ShoppingListSetKeyAction.schema.json index af56b9dc..d0236c72 100644 --- a/json-schemas/ShoppingListSetKeyAction.schema.json +++ b/json-schemas/ShoppingListSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetKeyAction.schema.json" } diff --git a/json-schemas/ShoppingListSetLineItemCustomFieldAction.schema.json b/json-schemas/ShoppingListSetLineItemCustomFieldAction.schema.json index d1773fc0..83fc7f0a 100644 --- a/json-schemas/ShoppingListSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/ShoppingListSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/ShoppingListSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/ShoppingListSetLineItemCustomTypeAction.schema.json b/json-schemas/ShoppingListSetLineItemCustomTypeAction.schema.json index 0f6a872e..ee0b8d8f 100644 --- a/json-schemas/ShoppingListSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/ShoppingListSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/ShoppingListSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/ShoppingListSetSlugAction.schema.json b/json-schemas/ShoppingListSetSlugAction.schema.json index 846fdfed..2734bf51 100644 --- a/json-schemas/ShoppingListSetSlugAction.schema.json +++ b/json-schemas/ShoppingListSetSlugAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetSlugAction", "type": "object", @@ -8,5 +8,5 @@ "slug": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetSlugAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetSlugAction.schema.json" } diff --git a/json-schemas/ShoppingListSetStoreAction.schema.json b/json-schemas/ShoppingListSetStoreAction.schema.json index bf32b2c5..2d065651 100644 --- a/json-schemas/ShoppingListSetStoreAction.schema.json +++ b/json-schemas/ShoppingListSetStoreAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetStoreAction", "type": "object", @@ -8,5 +8,5 @@ "store": {"$ref": "StoreResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/ShoppingListSetStoreAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetStoreAction.schema.json" } diff --git a/json-schemas/ShoppingListSetTextLineItemCustomFieldAction.schema.json b/json-schemas/ShoppingListSetTextLineItemCustomFieldAction.schema.json index 600d7bdd..9beceb49 100644 --- a/json-schemas/ShoppingListSetTextLineItemCustomFieldAction.schema.json +++ b/json-schemas/ShoppingListSetTextLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetTextLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "textLineItemId", "name" ], - "$id": "https://example.com/ShoppingListSetTextLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetTextLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/ShoppingListSetTextLineItemCustomTypeAction.schema.json b/json-schemas/ShoppingListSetTextLineItemCustomTypeAction.schema.json index 943b25d1..8e8ffbf9 100644 --- a/json-schemas/ShoppingListSetTextLineItemCustomTypeAction.schema.json +++ b/json-schemas/ShoppingListSetTextLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetTextLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/ShoppingListSetTextLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetTextLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/ShoppingListSetTextLineItemDescriptionAction.schema.json b/json-schemas/ShoppingListSetTextLineItemDescriptionAction.schema.json index c754d7ff..1298d095 100644 --- a/json-schemas/ShoppingListSetTextLineItemDescriptionAction.schema.json +++ b/json-schemas/ShoppingListSetTextLineItemDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListSetTextLineItemDescriptionAction", "type": "object", @@ -12,5 +12,5 @@ "action", "textLineItemId" ], - "$id": "https://example.com/ShoppingListSetTextLineItemDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ShoppingListSetTextLineItemDescriptionAction.schema.json" } diff --git a/json-schemas/ShoppingListStoreSetMessagePayload.schema.json b/json-schemas/ShoppingListStoreSetMessagePayload.schema.json index 5dde9e25..964cc443 100644 --- a/json-schemas/ShoppingListStoreSetMessagePayload.schema.json +++ b/json-schemas/ShoppingListStoreSetMessagePayload.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListStoreSetMessagePayload", "type": "object", @@ -11,5 +11,5 @@ "type", "store" ], - "$id": "https://example.com/ShoppingListStoreSetMessagePayload.schema.json" + "$id": "https://api.commercetools.com/ShoppingListStoreSetMessagePayload.schema.json" } diff --git a/json-schemas/ShoppingListUpdate.schema.json b/json-schemas/ShoppingListUpdate.schema.json index 875df27c..05a5e72a 100644 --- a/json-schemas/ShoppingListUpdate.schema.json +++ b/json-schemas/ShoppingListUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ShoppingListUpdate.schema.json" + "$id": "https://api.commercetools.com/ShoppingListUpdate.schema.json" } diff --git a/json-schemas/ShoppingListUpdateAction.schema.json b/json-schemas/ShoppingListUpdateAction.schema.json index 6bc1a450..8349a316 100644 --- a/json-schemas/ShoppingListUpdateAction.schema.json +++ b/json-schemas/ShoppingListUpdateAction.schema.json @@ -1,36 +1,61 @@ { "oneOf": [ - {"$ref": "https://example.com/ShoppingListAddLineItemAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListAddTextLineItemAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeLineItemsOrderAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeTextLineItemNameAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeTextLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListChangeTextLineItemsOrderAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListRemoveLineItemAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListRemoveTextLineItemAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetAnonymousIdAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetCustomerAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetKeyAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetSlugAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetStoreAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetTextLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetTextLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/ShoppingListSetTextLineItemDescriptionAction.schema.json"} + {"$ref": "https://api.commercetools.com/ShoppingListAddLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListAddTextLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeLineItemsOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeTextLineItemNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeTextLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListChangeTextLineItemsOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListRemoveLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListRemoveTextLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetAnonymousIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetCustomerAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetDeleteDaysAfterLastModificationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetSlugAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetStoreAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetTextLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetTextLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ShoppingListSetTextLineItemDescriptionAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ShoppingListUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addLineItem", + "addTextLineItem", + "changeLineItemQuantity", + "changeLineItemsOrder", + "changeName", + "changeTextLineItemName", + "changeTextLineItemQuantity", + "changeTextLineItemsOrder", + "removeLineItem", + "removeTextLineItem", + "setAnonymousId", + "setCustomField", + "setCustomType", + "setCustomer", + "setDeleteDaysAfterLastModification", + "setDescription", + "setKey", + "setLineItemCustomField", + "setLineItemCustomType", + "setSlug", + "setStore", + "setTextLineItemCustomField", + "setTextLineItemCustomType", + "setTextLineItemDescription" + ]}}, "required": ["action"], - "$id": "https://example.com/ShoppingListUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ShoppingListUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/ShoppingListsConfiguration.schema.json b/json-schemas/ShoppingListsConfiguration.schema.json new file mode 100644 index 00000000..cebe4716 --- /dev/null +++ b/json-schemas/ShoppingListsConfiguration.schema.json @@ -0,0 +1,8 @@ +{ + "additionalProperties": false, + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "ShoppingListsConfiguration", + "type": "object", + "properties": {"deleteDaysAfterLastModification": {"type": "number"}}, + "$id": "https://api.commercetools.com/ShoppingListsConfiguration.schema.json" +} diff --git a/json-schemas/SnsDestination.schema.json b/json-schemas/SnsDestination.schema.json index f7d45f54..9b0a61ba 100644 --- a/json-schemas/SnsDestination.schema.json +++ b/json-schemas/SnsDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SnsDestination", "type": "object", @@ -15,5 +15,5 @@ "accessSecret", "topicArn" ], - "$id": "https://example.com/SnsDestination.schema.json" + "$id": "https://api.commercetools.com/SnsDestination.schema.json" } diff --git a/json-schemas/SqsDestination.schema.json b/json-schemas/SqsDestination.schema.json index f71077c2..849c2963 100644 --- a/json-schemas/SqsDestination.schema.json +++ b/json-schemas/SqsDestination.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SqsDestination", "type": "object", @@ -17,5 +17,5 @@ "queueUrl", "region" ], - "$id": "https://example.com/SqsDestination.schema.json" + "$id": "https://api.commercetools.com/SqsDestination.schema.json" } diff --git a/json-schemas/StackingModeEnum.schema.json b/json-schemas/StackingModeEnum.schema.json index 47153c99..616667d0 100644 --- a/json-schemas/StackingModeEnum.schema.json +++ b/json-schemas/StackingModeEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Describes how the Cart Discount interacts with other Discounts.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "StackingMode", "type": "string", "enum": [ "Stacking", "StopAfterThisDiscount" ], - "$id": "https://example.com/StackingModeEnum.schema.json" + "$id": "https://api.commercetools.com/StackingModeEnum.schema.json" } diff --git a/json-schemas/StagedOrder.schema.json b/json-schemas/StagedOrder.schema.json index b9aeda10..ff628d7f 100644 --- a/json-schemas/StagedOrder.schema.json +++ b/json-schemas/StagedOrder.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrder", "type": "object", @@ -36,6 +36,7 @@ "type": "string", "format": "date-time" }, + "quote": {"$ref": "QuoteReference.schema.json"}, "customLineItems": { "type": "array", "items": {"$ref": "CustomLineItem.schema.json"} @@ -86,9 +87,8 @@ "totalPrice", "orderState", "syncInfo", - "lastMessageSequenceNumber", "origin", "refusedGifts" ], - "$id": "https://example.com/StagedOrder.schema.json" + "$id": "https://api.commercetools.com/StagedOrder.schema.json" } diff --git a/json-schemas/StagedOrderAddCustomLineItemAction.schema.json b/json-schemas/StagedOrderAddCustomLineItemAction.schema.json index 657104d7..b9e23607 100644 --- a/json-schemas/StagedOrderAddCustomLineItemAction.schema.json +++ b/json-schemas/StagedOrderAddCustomLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddCustomLineItemAction", "type": "object", @@ -19,5 +19,5 @@ "name", "slug" ], - "$id": "https://example.com/StagedOrderAddCustomLineItemAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddCustomLineItemAction.schema.json" } diff --git a/json-schemas/StagedOrderAddDeliveryAction.schema.json b/json-schemas/StagedOrderAddDeliveryAction.schema.json index 2e87010a..727ec39a 100644 --- a/json-schemas/StagedOrderAddDeliveryAction.schema.json +++ b/json-schemas/StagedOrderAddDeliveryAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddDeliveryAction", "type": "object", "properties": { "action": {"enum": ["addDelivery"]}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "items": { "type": "array", "items": {"$ref": "DeliveryItem.schema.json"} @@ -13,8 +13,9 @@ "parcels": { "type": "array", "items": {"$ref": "ParcelDraft.schema.json"} - } + }, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderAddDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddDeliveryAction.schema.json" } diff --git a/json-schemas/StagedOrderAddDiscountCodeAction.schema.json b/json-schemas/StagedOrderAddDiscountCodeAction.schema.json index f8a7fd3f..73248938 100644 --- a/json-schemas/StagedOrderAddDiscountCodeAction.schema.json +++ b/json-schemas/StagedOrderAddDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "code" ], - "$id": "https://example.com/StagedOrderAddDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddDiscountCodeAction.schema.json" } diff --git a/json-schemas/StagedOrderAddItemShippingAddressAction.schema.json b/json-schemas/StagedOrderAddItemShippingAddressAction.schema.json index 3926ea0f..ed0d8808 100644 --- a/json-schemas/StagedOrderAddItemShippingAddressAction.schema.json +++ b/json-schemas/StagedOrderAddItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["addItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/StagedOrderAddItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddItemShippingAddressAction.schema.json" } diff --git a/json-schemas/StagedOrderAddLineItemAction.schema.json b/json-schemas/StagedOrderAddLineItemAction.schema.json index b076edb6..a8b2bec1 100644 --- a/json-schemas/StagedOrderAddLineItemAction.schema.json +++ b/json-schemas/StagedOrderAddLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddLineItemAction", "type": "object", @@ -22,5 +22,5 @@ "sku": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderAddLineItemAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddLineItemAction.schema.json" } diff --git a/json-schemas/StagedOrderAddParcelToDeliveryAction.schema.json b/json-schemas/StagedOrderAddParcelToDeliveryAction.schema.json index 9e273782..3755109a 100644 --- a/json-schemas/StagedOrderAddParcelToDeliveryAction.schema.json +++ b/json-schemas/StagedOrderAddParcelToDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddParcelToDeliveryAction", "type": "object", @@ -17,5 +17,5 @@ "action", "deliveryId" ], - "$id": "https://example.com/StagedOrderAddParcelToDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddParcelToDeliveryAction.schema.json" } diff --git a/json-schemas/StagedOrderAddPaymentAction.schema.json b/json-schemas/StagedOrderAddPaymentAction.schema.json index f25111a3..bd10c1a6 100644 --- a/json-schemas/StagedOrderAddPaymentAction.schema.json +++ b/json-schemas/StagedOrderAddPaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddPaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/StagedOrderAddPaymentAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddPaymentAction.schema.json" } diff --git a/json-schemas/StagedOrderAddReturnInfoAction.schema.json b/json-schemas/StagedOrderAddReturnInfoAction.schema.json index 988cade1..3a538af0 100644 --- a/json-schemas/StagedOrderAddReturnInfoAction.schema.json +++ b/json-schemas/StagedOrderAddReturnInfoAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddReturnInfoAction", "type": "object", @@ -19,5 +19,5 @@ "action", "items" ], - "$id": "https://example.com/StagedOrderAddReturnInfoAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddReturnInfoAction.schema.json" } diff --git a/json-schemas/StagedOrderAddShoppingListAction.schema.json b/json-schemas/StagedOrderAddShoppingListAction.schema.json index 49f55eba..a0473cad 100644 --- a/json-schemas/StagedOrderAddShoppingListAction.schema.json +++ b/json-schemas/StagedOrderAddShoppingListAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderAddShoppingListAction", "type": "object", @@ -13,5 +13,5 @@ "action", "shoppingList" ], - "$id": "https://example.com/StagedOrderAddShoppingListAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderAddShoppingListAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeCustomLineItemMoneyAction.schema.json b/json-schemas/StagedOrderChangeCustomLineItemMoneyAction.schema.json index 1d22f8d1..884e5fe9 100644 --- a/json-schemas/StagedOrderChangeCustomLineItemMoneyAction.schema.json +++ b/json-schemas/StagedOrderChangeCustomLineItemMoneyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeCustomLineItemMoneyAction", "type": "object", @@ -13,5 +13,5 @@ "customLineItemId", "money" ], - "$id": "https://example.com/StagedOrderChangeCustomLineItemMoneyAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeCustomLineItemMoneyAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeCustomLineItemQuantityAction.schema.json b/json-schemas/StagedOrderChangeCustomLineItemQuantityAction.schema.json index 77e817d9..0d95a569 100644 --- a/json-schemas/StagedOrderChangeCustomLineItemQuantityAction.schema.json +++ b/json-schemas/StagedOrderChangeCustomLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeCustomLineItemQuantityAction", "type": "object", @@ -13,5 +13,5 @@ "customLineItemId", "quantity" ], - "$id": "https://example.com/StagedOrderChangeCustomLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeCustomLineItemQuantityAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeLineItemQuantityAction.schema.json b/json-schemas/StagedOrderChangeLineItemQuantityAction.schema.json index 59bc7aa1..9321ddd0 100644 --- a/json-schemas/StagedOrderChangeLineItemQuantityAction.schema.json +++ b/json-schemas/StagedOrderChangeLineItemQuantityAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeLineItemQuantityAction", "type": "object", @@ -15,5 +15,5 @@ "lineItemId", "quantity" ], - "$id": "https://example.com/StagedOrderChangeLineItemQuantityAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeLineItemQuantityAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeOrderStateAction.schema.json b/json-schemas/StagedOrderChangeOrderStateAction.schema.json index 3cd6d872..f50e3c4c 100644 --- a/json-schemas/StagedOrderChangeOrderStateAction.schema.json +++ b/json-schemas/StagedOrderChangeOrderStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeOrderStateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "orderState" ], - "$id": "https://example.com/StagedOrderChangeOrderStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeOrderStateAction.schema.json" } diff --git a/json-schemas/StagedOrderChangePaymentStateAction.schema.json b/json-schemas/StagedOrderChangePaymentStateAction.schema.json index 87259895..080157aa 100644 --- a/json-schemas/StagedOrderChangePaymentStateAction.schema.json +++ b/json-schemas/StagedOrderChangePaymentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangePaymentStateAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["changePaymentState"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderChangePaymentStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangePaymentStateAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeShipmentStateAction.schema.json b/json-schemas/StagedOrderChangeShipmentStateAction.schema.json index 93a1ab9f..8e85c93b 100644 --- a/json-schemas/StagedOrderChangeShipmentStateAction.schema.json +++ b/json-schemas/StagedOrderChangeShipmentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeShipmentStateAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["changeShipmentState"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderChangeShipmentStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeShipmentStateAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeTaxCalculationModeAction.schema.json b/json-schemas/StagedOrderChangeTaxCalculationModeAction.schema.json index 7b91c4e6..2ce02634 100644 --- a/json-schemas/StagedOrderChangeTaxCalculationModeAction.schema.json +++ b/json-schemas/StagedOrderChangeTaxCalculationModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeTaxCalculationModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxCalculationMode" ], - "$id": "https://example.com/StagedOrderChangeTaxCalculationModeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeTaxCalculationModeAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeTaxModeAction.schema.json b/json-schemas/StagedOrderChangeTaxModeAction.schema.json index 98cd7658..8596ef3b 100644 --- a/json-schemas/StagedOrderChangeTaxModeAction.schema.json +++ b/json-schemas/StagedOrderChangeTaxModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeTaxModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxMode" ], - "$id": "https://example.com/StagedOrderChangeTaxModeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeTaxModeAction.schema.json" } diff --git a/json-schemas/StagedOrderChangeTaxRoundingModeAction.schema.json b/json-schemas/StagedOrderChangeTaxRoundingModeAction.schema.json index 5a8c68f2..1bf478a5 100644 --- a/json-schemas/StagedOrderChangeTaxRoundingModeAction.schema.json +++ b/json-schemas/StagedOrderChangeTaxRoundingModeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderChangeTaxRoundingModeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxRoundingMode" ], - "$id": "https://example.com/StagedOrderChangeTaxRoundingModeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderChangeTaxRoundingModeAction.schema.json" } diff --git a/json-schemas/StagedOrderImportCustomLineItemStateAction.schema.json b/json-schemas/StagedOrderImportCustomLineItemStateAction.schema.json index 44bc97fe..3c294373 100644 --- a/json-schemas/StagedOrderImportCustomLineItemStateAction.schema.json +++ b/json-schemas/StagedOrderImportCustomLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderImportCustomLineItemStateAction", "type": "object", @@ -16,5 +16,5 @@ "customLineItemId", "state" ], - "$id": "https://example.com/StagedOrderImportCustomLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderImportCustomLineItemStateAction.schema.json" } diff --git a/json-schemas/StagedOrderImportLineItemStateAction.schema.json b/json-schemas/StagedOrderImportLineItemStateAction.schema.json index 721083e0..a496acc4 100644 --- a/json-schemas/StagedOrderImportLineItemStateAction.schema.json +++ b/json-schemas/StagedOrderImportLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderImportLineItemStateAction", "type": "object", @@ -16,5 +16,5 @@ "lineItemId", "state" ], - "$id": "https://example.com/StagedOrderImportLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderImportLineItemStateAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveCustomLineItemAction.schema.json b/json-schemas/StagedOrderRemoveCustomLineItemAction.schema.json index 8e0ca9a1..cfe6eaf0 100644 --- a/json-schemas/StagedOrderRemoveCustomLineItemAction.schema.json +++ b/json-schemas/StagedOrderRemoveCustomLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveCustomLineItemAction", "type": "object", @@ -11,5 +11,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/StagedOrderRemoveCustomLineItemAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveCustomLineItemAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveDeliveryAction.schema.json b/json-schemas/StagedOrderRemoveDeliveryAction.schema.json index 1320a37b..5e8ea2aa 100644 --- a/json-schemas/StagedOrderRemoveDeliveryAction.schema.json +++ b/json-schemas/StagedOrderRemoveDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveDeliveryAction", "type": "object", @@ -11,5 +11,5 @@ "action", "deliveryId" ], - "$id": "https://example.com/StagedOrderRemoveDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveDeliveryAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveDiscountCodeAction.schema.json b/json-schemas/StagedOrderRemoveDiscountCodeAction.schema.json index 62325cd4..4bf53a18 100644 --- a/json-schemas/StagedOrderRemoveDiscountCodeAction.schema.json +++ b/json-schemas/StagedOrderRemoveDiscountCodeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveDiscountCodeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "discountCode" ], - "$id": "https://example.com/StagedOrderRemoveDiscountCodeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveDiscountCodeAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveItemShippingAddressAction.schema.json b/json-schemas/StagedOrderRemoveItemShippingAddressAction.schema.json index 47f8d516..e20cbbd9 100644 --- a/json-schemas/StagedOrderRemoveItemShippingAddressAction.schema.json +++ b/json-schemas/StagedOrderRemoveItemShippingAddressAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveItemShippingAddressAction", "type": "object", @@ -11,5 +11,5 @@ "action", "addressKey" ], - "$id": "https://example.com/StagedOrderRemoveItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveItemShippingAddressAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveLineItemAction.schema.json b/json-schemas/StagedOrderRemoveLineItemAction.schema.json index 858a1d26..9090634a 100644 --- a/json-schemas/StagedOrderRemoveLineItemAction.schema.json +++ b/json-schemas/StagedOrderRemoveLineItemAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveLineItemAction", "type": "object", @@ -15,5 +15,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderRemoveLineItemAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveLineItemAction.schema.json" } diff --git a/json-schemas/StagedOrderRemoveParcelFromDeliveryAction.schema.json b/json-schemas/StagedOrderRemoveParcelFromDeliveryAction.schema.json index 51705f9e..bd46d257 100644 --- a/json-schemas/StagedOrderRemoveParcelFromDeliveryAction.schema.json +++ b/json-schemas/StagedOrderRemoveParcelFromDeliveryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemoveParcelFromDeliveryAction", "type": "object", @@ -11,5 +11,5 @@ "action", "parcelId" ], - "$id": "https://example.com/StagedOrderRemoveParcelFromDeliveryAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemoveParcelFromDeliveryAction.schema.json" } diff --git a/json-schemas/StagedOrderRemovePaymentAction.schema.json b/json-schemas/StagedOrderRemovePaymentAction.schema.json index 49feaa7f..e03e5ea6 100644 --- a/json-schemas/StagedOrderRemovePaymentAction.schema.json +++ b/json-schemas/StagedOrderRemovePaymentAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderRemovePaymentAction", "type": "object", @@ -11,5 +11,5 @@ "action", "payment" ], - "$id": "https://example.com/StagedOrderRemovePaymentAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderRemovePaymentAction.schema.json" } diff --git a/json-schemas/StagedOrderSetBillingAddressAction.schema.json b/json-schemas/StagedOrderSetBillingAddressAction.schema.json index b87259f5..8178f197 100644 --- a/json-schemas/StagedOrderSetBillingAddressAction.schema.json +++ b/json-schemas/StagedOrderSetBillingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetBillingAddressAction", "type": "object", "properties": { "action": {"enum": ["setBillingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetBillingAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetBillingAddressAction.schema.json" } diff --git a/json-schemas/OrderEditSetBillingAddressCustomFieldAction.schema.json b/json-schemas/StagedOrderSetBillingAddressCustomFieldAction.schema.json similarity index 60% rename from json-schemas/OrderEditSetBillingAddressCustomFieldAction.schema.json rename to json-schemas/StagedOrderSetBillingAddressCustomFieldAction.schema.json index b67e0fc2..b7b19ce8 100644 --- a/json-schemas/OrderEditSetBillingAddressCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetBillingAddressCustomFieldAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetBillingAddressCustomFieldAction", + "title": "StagedOrderSetBillingAddressCustomFieldAction", "type": "object", "properties": { "name": {"type": "string"}, @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderEditSetBillingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetBillingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderEditSetBillingAddressCustomTypeAction.schema.json b/json-schemas/StagedOrderSetBillingAddressCustomTypeAction.schema.json similarity index 55% rename from json-schemas/OrderEditSetBillingAddressCustomTypeAction.schema.json rename to json-schemas/StagedOrderSetBillingAddressCustomTypeAction.schema.json index cecedfea..779bc55a 100644 --- a/json-schemas/OrderEditSetBillingAddressCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetBillingAddressCustomTypeAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetBillingAddressCustomTypeAction", + "title": "StagedOrderSetBillingAddressCustomTypeAction", "type": "object", "properties": { "type": {"$ref": "TypeResourceIdentifier.schema.json"}, @@ -9,5 +9,5 @@ "action": {"enum": ["setBillingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderEditSetBillingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetBillingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCountryAction.schema.json b/json-schemas/StagedOrderSetCountryAction.schema.json index 57a01a2e..73088bfa 100644 --- a/json-schemas/StagedOrderSetCountryAction.schema.json +++ b/json-schemas/StagedOrderSetCountryAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCountryAction", "type": "object", @@ -8,5 +8,5 @@ "country": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetCountryAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCountryAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomFieldAction.schema.json b/json-schemas/StagedOrderSetCustomFieldAction.schema.json index e5e66069..e1ebce8f 100644 --- a/json-schemas/StagedOrderSetCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/StagedOrderSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomFieldAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomLineItemCustomFieldAction.schema.json b/json-schemas/StagedOrderSetCustomLineItemCustomFieldAction.schema.json index 17e76ca8..4e9efb67 100644 --- a/json-schemas/StagedOrderSetCustomLineItemCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetCustomLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "customLineItemId", "name" ], - "$id": "https://example.com/StagedOrderSetCustomLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomLineItemCustomTypeAction.schema.json b/json-schemas/StagedOrderSetCustomLineItemCustomTypeAction.schema.json index e0bf1c55..88a52df9 100644 --- a/json-schemas/StagedOrderSetCustomLineItemCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetCustomLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/StagedOrderSetCustomLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json b/json-schemas/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json index 28b19aad..ba1416df 100644 --- a/json-schemas/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json +++ b/json-schemas/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomLineItemTaxAmountAction.schema.json b/json-schemas/StagedOrderSetCustomLineItemTaxAmountAction.schema.json index b1116614..fa07cd05 100644 --- a/json-schemas/StagedOrderSetCustomLineItemTaxAmountAction.schema.json +++ b/json-schemas/StagedOrderSetCustomLineItemTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomLineItemTaxAmountAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/StagedOrderSetCustomLineItemTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomLineItemTaxAmountAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomLineItemTaxRateAction.schema.json b/json-schemas/StagedOrderSetCustomLineItemTaxRateAction.schema.json index f51020e8..3dc10467 100644 --- a/json-schemas/StagedOrderSetCustomLineItemTaxRateAction.schema.json +++ b/json-schemas/StagedOrderSetCustomLineItemTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomLineItemTaxRateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "customLineItemId" ], - "$id": "https://example.com/StagedOrderSetCustomLineItemTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomLineItemTaxRateAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomShippingMethodAction.schema.json b/json-schemas/StagedOrderSetCustomShippingMethodAction.schema.json index 614629a4..981041b7 100644 --- a/json-schemas/StagedOrderSetCustomShippingMethodAction.schema.json +++ b/json-schemas/StagedOrderSetCustomShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomShippingMethodAction", "type": "object", @@ -15,5 +15,5 @@ "shippingMethodName", "shippingRate" ], - "$id": "https://example.com/StagedOrderSetCustomShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomShippingMethodAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomTypeAction.schema.json b/json-schemas/StagedOrderSetCustomTypeAction.schema.json index dccd948e..99f8d51c 100644 --- a/json-schemas/StagedOrderSetCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomTypeAction", "type": "object", @@ -9,5 +9,5 @@ "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomerEmailAction.schema.json b/json-schemas/StagedOrderSetCustomerEmailAction.schema.json index 075c305e..30dc2712 100644 --- a/json-schemas/StagedOrderSetCustomerEmailAction.schema.json +++ b/json-schemas/StagedOrderSetCustomerEmailAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomerEmailAction", "type": "object", @@ -8,5 +8,5 @@ "email": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetCustomerEmailAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomerEmailAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomerGroupAction.schema.json b/json-schemas/StagedOrderSetCustomerGroupAction.schema.json index 00ae4d47..9c1c461a 100644 --- a/json-schemas/StagedOrderSetCustomerGroupAction.schema.json +++ b/json-schemas/StagedOrderSetCustomerGroupAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomerGroupAction", "type": "object", @@ -8,5 +8,5 @@ "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetCustomerGroupAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomerGroupAction.schema.json" } diff --git a/json-schemas/StagedOrderSetCustomerIdAction.schema.json b/json-schemas/StagedOrderSetCustomerIdAction.schema.json index bd221e6f..428e114b 100644 --- a/json-schemas/StagedOrderSetCustomerIdAction.schema.json +++ b/json-schemas/StagedOrderSetCustomerIdAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetCustomerIdAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setCustomerId"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetCustomerIdAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetCustomerIdAction.schema.json" } diff --git a/json-schemas/StagedOrderSetDeliveryAddressAction.schema.json b/json-schemas/StagedOrderSetDeliveryAddressAction.schema.json index ae6c332a..70dcf586 100644 --- a/json-schemas/StagedOrderSetDeliveryAddressAction.schema.json +++ b/json-schemas/StagedOrderSetDeliveryAddressAction.schema.json @@ -1,16 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetDeliveryAddressAction", "type": "object", "properties": { "action": {"enum": ["setDeliveryAddress"]}, "deliveryId": {"type": "string"}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "deliveryId" ], - "$id": "https://example.com/StagedOrderSetDeliveryAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryAddressAction.schema.json" } diff --git a/json-schemas/StagedOrderSetDeliveryAddressCustomFieldAction.schema.json b/json-schemas/StagedOrderSetDeliveryAddressCustomFieldAction.schema.json new file mode 100644 index 00000000..6fac59c8 --- /dev/null +++ b/json-schemas/StagedOrderSetDeliveryAddressCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetDeliveryAddressCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setDeliveryAddressCustomField"]}, + "deliveryId": {"type": "string"}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "deliveryId", + "name" + ], + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryAddressCustomFieldAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetDeliveryAddressCustomTypeAction.schema.json b/json-schemas/StagedOrderSetDeliveryAddressCustomTypeAction.schema.json new file mode 100644 index 00000000..0c59f3b6 --- /dev/null +++ b/json-schemas/StagedOrderSetDeliveryAddressCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetDeliveryAddressCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setDeliveryAddressCustomType"]}, + "deliveryId": {"type": "string"}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"} + }, + "required": [ + "action", + "deliveryId" + ], + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryAddressCustomTypeAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetDeliveryCustomFieldAction.schema.json b/json-schemas/StagedOrderSetDeliveryCustomFieldAction.schema.json new file mode 100644 index 00000000..0cb44f43 --- /dev/null +++ b/json-schemas/StagedOrderSetDeliveryCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetDeliveryCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setDeliveryCustomField"]}, + "deliveryId": {"type": "string"}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "deliveryId", + "name" + ], + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryCustomFieldAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetDeliveryCustomTypeAction.schema.json b/json-schemas/StagedOrderSetDeliveryCustomTypeAction.schema.json new file mode 100644 index 00000000..517d3517 --- /dev/null +++ b/json-schemas/StagedOrderSetDeliveryCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetDeliveryCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setDeliveryCustomType"]}, + "deliveryId": {"type": "string"}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"} + }, + "required": [ + "action", + "deliveryId" + ], + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryCustomTypeAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetDeliveryItemsAction.schema.json b/json-schemas/StagedOrderSetDeliveryItemsAction.schema.json index 76fdbd3d..66251d24 100644 --- a/json-schemas/StagedOrderSetDeliveryItemsAction.schema.json +++ b/json-schemas/StagedOrderSetDeliveryItemsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetDeliveryItemsAction", "type": "object", @@ -16,5 +16,5 @@ "deliveryId", "items" ], - "$id": "https://example.com/StagedOrderSetDeliveryItemsAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetDeliveryItemsAction.schema.json" } diff --git a/json-schemas/OrderEditSetItemShippingAddressCustomFieldAction.schema.json b/json-schemas/StagedOrderSetItemShippingAddressCustomFieldAction.schema.json similarity index 63% rename from json-schemas/OrderEditSetItemShippingAddressCustomFieldAction.schema.json rename to json-schemas/StagedOrderSetItemShippingAddressCustomFieldAction.schema.json index 1a8e6010..a70e07bb 100644 --- a/json-schemas/OrderEditSetItemShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetItemShippingAddressCustomFieldAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetItemShippingAddressCustomFieldAction", + "title": "StagedOrderSetItemShippingAddressCustomFieldAction", "type": "object", "properties": { "name": {"type": "string"}, @@ -21,5 +21,5 @@ "addressKey", "name" ], - "$id": "https://example.com/OrderEditSetItemShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetItemShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderEditSetItemShippingAddressCustomTypeAction.schema.json b/json-schemas/StagedOrderSetItemShippingAddressCustomTypeAction.schema.json similarity index 60% rename from json-schemas/OrderEditSetItemShippingAddressCustomTypeAction.schema.json rename to json-schemas/StagedOrderSetItemShippingAddressCustomTypeAction.schema.json index 33e2d7a9..c5aa2c5b 100644 --- a/json-schemas/OrderEditSetItemShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetItemShippingAddressCustomTypeAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetItemShippingAddressCustomTypeAction", + "title": "StagedOrderSetItemShippingAddressCustomTypeAction", "type": "object", "properties": { "action": {"enum": ["setItemShippingAddressCustomType"]}, @@ -13,5 +13,5 @@ "action", "addressKey" ], - "$id": "https://example.com/OrderEditSetItemShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetItemShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemCustomFieldAction.schema.json b/json-schemas/StagedOrderSetLineItemCustomFieldAction.schema.json index 3b1eb5b5..b600b017 100644 --- a/json-schemas/StagedOrderSetLineItemCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemCustomFieldAction", "type": "object", @@ -21,5 +21,5 @@ "lineItemId", "name" ], - "$id": "https://example.com/StagedOrderSetLineItemCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemCustomFieldAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemCustomTypeAction.schema.json b/json-schemas/StagedOrderSetLineItemCustomTypeAction.schema.json index 8d5b56f2..25dea1b1 100644 --- a/json-schemas/StagedOrderSetLineItemCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemCustomTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemCustomTypeAction", "type": "object", @@ -13,5 +13,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemDistributionChannelAction.schema.json b/json-schemas/StagedOrderSetLineItemDistributionChannelAction.schema.json index 1530f879..66b2263e 100644 --- a/json-schemas/StagedOrderSetLineItemDistributionChannelAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemDistributionChannelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemDistributionChannelAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemDistributionChannelAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemDistributionChannelAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemPriceAction.schema.json b/json-schemas/StagedOrderSetLineItemPriceAction.schema.json index 2e6e0f37..3ff28ea8 100644 --- a/json-schemas/StagedOrderSetLineItemPriceAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemPriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemPriceAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemPriceAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemPriceAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemShippingDetailsAction.schema.json b/json-schemas/StagedOrderSetLineItemShippingDetailsAction.schema.json index 936c41c2..062bcbbb 100644 --- a/json-schemas/StagedOrderSetLineItemShippingDetailsAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemShippingDetailsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemShippingDetailsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemShippingDetailsAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemShippingDetailsAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemTaxAmountAction.schema.json b/json-schemas/StagedOrderSetLineItemTaxAmountAction.schema.json index d6a1bd53..91705636 100644 --- a/json-schemas/StagedOrderSetLineItemTaxAmountAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemTaxAmountAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemTaxAmountAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemTaxRateAction.schema.json b/json-schemas/StagedOrderSetLineItemTaxRateAction.schema.json index 5b482103..c7451a75 100644 --- a/json-schemas/StagedOrderSetLineItemTaxRateAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemTaxRateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemTaxRateAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLineItemTotalPriceAction.schema.json b/json-schemas/StagedOrderSetLineItemTotalPriceAction.schema.json index f0eaebe5..33406917 100644 --- a/json-schemas/StagedOrderSetLineItemTotalPriceAction.schema.json +++ b/json-schemas/StagedOrderSetLineItemTotalPriceAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLineItemTotalPriceAction", "type": "object", @@ -12,5 +12,5 @@ "action", "lineItemId" ], - "$id": "https://example.com/StagedOrderSetLineItemTotalPriceAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLineItemTotalPriceAction.schema.json" } diff --git a/json-schemas/StagedOrderSetLocaleAction.schema.json b/json-schemas/StagedOrderSetLocaleAction.schema.json index f4719870..ebdba342 100644 --- a/json-schemas/StagedOrderSetLocaleAction.schema.json +++ b/json-schemas/StagedOrderSetLocaleAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetLocaleAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setLocale"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetLocaleAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetLocaleAction.schema.json" } diff --git a/json-schemas/StagedOrderSetOrderNumberAction.schema.json b/json-schemas/StagedOrderSetOrderNumberAction.schema.json index 7f2431da..4a001bb7 100644 --- a/json-schemas/StagedOrderSetOrderNumberAction.schema.json +++ b/json-schemas/StagedOrderSetOrderNumberAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetOrderNumberAction", "type": "object", @@ -8,5 +8,5 @@ "orderNumber": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetOrderNumberAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetOrderNumberAction.schema.json" } diff --git a/json-schemas/StagedOrderSetOrderTotalTaxAction.schema.json b/json-schemas/StagedOrderSetOrderTotalTaxAction.schema.json index af583549..d0406174 100644 --- a/json-schemas/StagedOrderSetOrderTotalTaxAction.schema.json +++ b/json-schemas/StagedOrderSetOrderTotalTaxAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetOrderTotalTaxAction", "type": "object", @@ -15,5 +15,5 @@ "action", "externalTotalGross" ], - "$id": "https://example.com/StagedOrderSetOrderTotalTaxAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetOrderTotalTaxAction.schema.json" } diff --git a/json-schemas/StagedOrderSetParcelCustomFieldAction.schema.json b/json-schemas/StagedOrderSetParcelCustomFieldAction.schema.json new file mode 100644 index 00000000..a239e3fe --- /dev/null +++ b/json-schemas/StagedOrderSetParcelCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetParcelCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setParcelCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}, + "parcelId": {"type": "string"} + }, + "required": [ + "action", + "parcelId", + "name" + ], + "$id": "https://api.commercetools.com/StagedOrderSetParcelCustomFieldAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetParcelCustomTypeAction.schema.json b/json-schemas/StagedOrderSetParcelCustomTypeAction.schema.json new file mode 100644 index 00000000..00d725b9 --- /dev/null +++ b/json-schemas/StagedOrderSetParcelCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetParcelCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setParcelCustomType"]}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "parcelId": {"type": "string"} + }, + "required": [ + "action", + "parcelId" + ], + "$id": "https://api.commercetools.com/StagedOrderSetParcelCustomTypeAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetParcelItemsAction.schema.json b/json-schemas/StagedOrderSetParcelItemsAction.schema.json index 3866b7c3..2b7723f9 100644 --- a/json-schemas/StagedOrderSetParcelItemsAction.schema.json +++ b/json-schemas/StagedOrderSetParcelItemsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetParcelItemsAction", "type": "object", @@ -16,5 +16,5 @@ "parcelId", "items" ], - "$id": "https://example.com/StagedOrderSetParcelItemsAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetParcelItemsAction.schema.json" } diff --git a/json-schemas/StagedOrderSetParcelMeasurementsAction.schema.json b/json-schemas/StagedOrderSetParcelMeasurementsAction.schema.json index 1b025e73..d53312fc 100644 --- a/json-schemas/StagedOrderSetParcelMeasurementsAction.schema.json +++ b/json-schemas/StagedOrderSetParcelMeasurementsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetParcelMeasurementsAction", "type": "object", @@ -12,5 +12,5 @@ "action", "parcelId" ], - "$id": "https://example.com/StagedOrderSetParcelMeasurementsAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetParcelMeasurementsAction.schema.json" } diff --git a/json-schemas/StagedOrderSetParcelTrackingDataAction.schema.json b/json-schemas/StagedOrderSetParcelTrackingDataAction.schema.json index 08b3896f..f976b948 100644 --- a/json-schemas/StagedOrderSetParcelTrackingDataAction.schema.json +++ b/json-schemas/StagedOrderSetParcelTrackingDataAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetParcelTrackingDataAction", "type": "object", @@ -12,5 +12,5 @@ "action", "parcelId" ], - "$id": "https://example.com/StagedOrderSetParcelTrackingDataAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetParcelTrackingDataAction.schema.json" } diff --git a/json-schemas/StagedOrderSetReturnInfoAction.schema.json b/json-schemas/StagedOrderSetReturnInfoAction.schema.json new file mode 100644 index 00000000..9a677db6 --- /dev/null +++ b/json-schemas/StagedOrderSetReturnInfoAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetReturnInfoAction", + "type": "object", + "properties": { + "action": {"enum": ["setReturnInfo"]}, + "items": { + "type": "array", + "items": {"$ref": "ReturnInfoDraft.schema.json"} + } + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StagedOrderSetReturnInfoAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetReturnItemCustomFieldAction.schema.json b/json-schemas/StagedOrderSetReturnItemCustomFieldAction.schema.json new file mode 100644 index 00000000..ae4a307f --- /dev/null +++ b/json-schemas/StagedOrderSetReturnItemCustomFieldAction.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetReturnItemCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setReturnItemCustomField"]}, + "returnItemId": {"type": "string"}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "returnItemId", + "name" + ], + "$id": "https://api.commercetools.com/StagedOrderSetReturnItemCustomFieldAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetReturnItemCustomTypeAction.schema.json b/json-schemas/StagedOrderSetReturnItemCustomTypeAction.schema.json new file mode 100644 index 00000000..23c0d71e --- /dev/null +++ b/json-schemas/StagedOrderSetReturnItemCustomTypeAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedOrderSetReturnItemCustomTypeAction", + "type": "object", + "properties": { + "action": {"enum": ["setReturnItemCustomType"]}, + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "returnItemId": {"type": "string"} + }, + "required": [ + "action", + "returnItemId" + ], + "$id": "https://api.commercetools.com/StagedOrderSetReturnItemCustomTypeAction.schema.json" +} diff --git a/json-schemas/StagedOrderSetReturnPaymentStateAction.schema.json b/json-schemas/StagedOrderSetReturnPaymentStateAction.schema.json index eaa68362..2f9e9e4e 100644 --- a/json-schemas/StagedOrderSetReturnPaymentStateAction.schema.json +++ b/json-schemas/StagedOrderSetReturnPaymentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetReturnPaymentStateAction", "type": "object", @@ -13,5 +13,5 @@ "returnItemId", "paymentState" ], - "$id": "https://example.com/StagedOrderSetReturnPaymentStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetReturnPaymentStateAction.schema.json" } diff --git a/json-schemas/StagedOrderSetReturnShipmentStateAction.schema.json b/json-schemas/StagedOrderSetReturnShipmentStateAction.schema.json index a2e0f332..0f887453 100644 --- a/json-schemas/StagedOrderSetReturnShipmentStateAction.schema.json +++ b/json-schemas/StagedOrderSetReturnShipmentStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetReturnShipmentStateAction", "type": "object", @@ -13,5 +13,5 @@ "returnItemId", "shipmentState" ], - "$id": "https://example.com/StagedOrderSetReturnShipmentStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetReturnShipmentStateAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingAddressAction.schema.json b/json-schemas/StagedOrderSetShippingAddressAction.schema.json index 5156d2e8..9a9b6e71 100644 --- a/json-schemas/StagedOrderSetShippingAddressAction.schema.json +++ b/json-schemas/StagedOrderSetShippingAddressAction.schema.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["setShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingAddressAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json b/json-schemas/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json index 588d2ab7..468b6d21 100644 --- a/json-schemas/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json +++ b/json-schemas/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingAddressAndCustomShippingMethodAction", "type": "object", @@ -7,7 +7,7 @@ "action": {"enum": ["setShippingAddressAndCustomShippingMethod"]}, "shippingMethodName": {"type": "string"}, "shippingRate": {"$ref": "ShippingRateDraft.schema.json"}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"}, "taxCategory": {"$ref": "TaxCategoryResourceIdentifier.schema.json"} }, @@ -17,5 +17,5 @@ "shippingMethodName", "shippingRate" ], - "$id": "https://example.com/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json b/json-schemas/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json index 3e447c8a..1e774184 100644 --- a/json-schemas/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json +++ b/json-schemas/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json @@ -1,11 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingAddressAndShippingMethodAction", "type": "object", "properties": { "action": {"enum": ["setShippingAddressAndShippingMethod"]}, - "address": {"$ref": "Address.schema.json"}, + "address": {"$ref": "BaseAddress.schema.json"}, "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"}, "shippingMethod": {"$ref": "ShippingMethodResourceIdentifier.schema.json"} }, @@ -13,5 +13,5 @@ "action", "address" ], - "$id": "https://example.com/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json" } diff --git a/json-schemas/OrderEditSetShippingAddressCustomFieldAction.schema.json b/json-schemas/StagedOrderSetShippingAddressCustomFieldAction.schema.json similarity index 60% rename from json-schemas/OrderEditSetShippingAddressCustomFieldAction.schema.json rename to json-schemas/StagedOrderSetShippingAddressCustomFieldAction.schema.json index 2542fa21..8df6f1ee 100644 --- a/json-schemas/OrderEditSetShippingAddressCustomFieldAction.schema.json +++ b/json-schemas/StagedOrderSetShippingAddressCustomFieldAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetShippingAddressCustomFieldAction", + "title": "StagedOrderSetShippingAddressCustomFieldAction", "type": "object", "properties": { "name": {"type": "string"}, @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/OrderEditSetShippingAddressCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingAddressCustomFieldAction.schema.json" } diff --git a/json-schemas/OrderEditSetShippingAddressCustomTypeAction.schema.json b/json-schemas/StagedOrderSetShippingAddressCustomTypeAction.schema.json similarity index 55% rename from json-schemas/OrderEditSetShippingAddressCustomTypeAction.schema.json rename to json-schemas/StagedOrderSetShippingAddressCustomTypeAction.schema.json index 8bd615e1..0e4c7535 100644 --- a/json-schemas/OrderEditSetShippingAddressCustomTypeAction.schema.json +++ b/json-schemas/StagedOrderSetShippingAddressCustomTypeAction.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, - "title": "OrderEditSetShippingAddressCustomTypeAction", + "title": "StagedOrderSetShippingAddressCustomTypeAction", "type": "object", "properties": { "type": {"$ref": "TypeResourceIdentifier.schema.json"}, @@ -9,5 +9,5 @@ "action": {"enum": ["setShippingAddressCustomType"]} }, "required": ["action"], - "$id": "https://example.com/OrderEditSetShippingAddressCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingAddressCustomTypeAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingMethodAction.schema.json b/json-schemas/StagedOrderSetShippingMethodAction.schema.json index 4cf8506f..a69e515b 100644 --- a/json-schemas/StagedOrderSetShippingMethodAction.schema.json +++ b/json-schemas/StagedOrderSetShippingMethodAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingMethodAction", "type": "object", @@ -9,5 +9,5 @@ "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetShippingMethodAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingMethodAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingMethodTaxAmountAction.schema.json b/json-schemas/StagedOrderSetShippingMethodTaxAmountAction.schema.json index 601cdb62..4933b31f 100644 --- a/json-schemas/StagedOrderSetShippingMethodTaxAmountAction.schema.json +++ b/json-schemas/StagedOrderSetShippingMethodTaxAmountAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingMethodTaxAmountAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setShippingMethodTaxAmount"]} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetShippingMethodTaxAmountAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingMethodTaxAmountAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingMethodTaxRateAction.schema.json b/json-schemas/StagedOrderSetShippingMethodTaxRateAction.schema.json index 792935cc..9167d113 100644 --- a/json-schemas/StagedOrderSetShippingMethodTaxRateAction.schema.json +++ b/json-schemas/StagedOrderSetShippingMethodTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingMethodTaxRateAction", "type": "object", @@ -8,5 +8,5 @@ "externalTaxRate": {"$ref": "ExternalTaxRateDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetShippingMethodTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingMethodTaxRateAction.schema.json" } diff --git a/json-schemas/StagedOrderSetShippingRateInputAction.schema.json b/json-schemas/StagedOrderSetShippingRateInputAction.schema.json index 0700cc32..a74f7b72 100644 --- a/json-schemas/StagedOrderSetShippingRateInputAction.schema.json +++ b/json-schemas/StagedOrderSetShippingRateInputAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderSetShippingRateInputAction", "type": "object", @@ -8,5 +8,5 @@ "shippingRateInput": {"$ref": "ShippingRateInputDraft.schema.json"} }, "required": ["action"], - "$id": "https://example.com/StagedOrderSetShippingRateInputAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderSetShippingRateInputAction.schema.json" } diff --git a/json-schemas/StagedOrderTransitionCustomLineItemStateAction.schema.json b/json-schemas/StagedOrderTransitionCustomLineItemStateAction.schema.json index b91f61e1..1029f746 100644 --- a/json-schemas/StagedOrderTransitionCustomLineItemStateAction.schema.json +++ b/json-schemas/StagedOrderTransitionCustomLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderTransitionCustomLineItemStateAction", "type": "object", @@ -21,5 +21,5 @@ "fromState", "toState" ], - "$id": "https://example.com/StagedOrderTransitionCustomLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderTransitionCustomLineItemStateAction.schema.json" } diff --git a/json-schemas/StagedOrderTransitionLineItemStateAction.schema.json b/json-schemas/StagedOrderTransitionLineItemStateAction.schema.json index eccb760e..8c60e5d9 100644 --- a/json-schemas/StagedOrderTransitionLineItemStateAction.schema.json +++ b/json-schemas/StagedOrderTransitionLineItemStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderTransitionLineItemStateAction", "type": "object", @@ -21,5 +21,5 @@ "fromState", "toState" ], - "$id": "https://example.com/StagedOrderTransitionLineItemStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderTransitionLineItemStateAction.schema.json" } diff --git a/json-schemas/StagedOrderTransitionStateAction.schema.json b/json-schemas/StagedOrderTransitionStateAction.schema.json index 384039e2..cd267085 100644 --- a/json-schemas/StagedOrderTransitionStateAction.schema.json +++ b/json-schemas/StagedOrderTransitionStateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderTransitionStateAction", "type": "object", @@ -12,5 +12,5 @@ "action", "state" ], - "$id": "https://example.com/StagedOrderTransitionStateAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderTransitionStateAction.schema.json" } diff --git a/json-schemas/StagedOrderUpdateAction.schema.json b/json-schemas/StagedOrderUpdateAction.schema.json index be8d39c8..ccd55768 100644 --- a/json-schemas/StagedOrderUpdateAction.schema.json +++ b/json-schemas/StagedOrderUpdateAction.schema.json @@ -1,82 +1,183 @@ { "oneOf": [ - {"$ref": "https://example.com/StagedOrderAddCustomLineItemAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddDeliveryAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddLineItemAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddParcelToDeliveryAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddPaymentAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddReturnInfoAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderAddShoppingListAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeCustomLineItemMoneyAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeCustomLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeLineItemQuantityAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeOrderStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangePaymentStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeShipmentStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeTaxCalculationModeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeTaxModeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderChangeTaxRoundingModeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderImportCustomLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderImportLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveCustomLineItemAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveDeliveryAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveDiscountCodeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveLineItemAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemoveParcelFromDeliveryAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderRemovePaymentAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetBillingAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCountryAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomLineItemTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomLineItemTaxRateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomerEmailAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomerGroupAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetCustomerIdAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetDeliveryAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetDeliveryItemsAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemDistributionChannelAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemPriceAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemShippingDetailsAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemTaxRateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLineItemTotalPriceAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetLocaleAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetOrderNumberAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetOrderTotalTaxAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetParcelItemsAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetParcelMeasurementsAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetParcelTrackingDataAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetReturnPaymentStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetReturnShipmentStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingMethodAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingMethodTaxAmountAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingMethodTaxRateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderSetShippingRateInputAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderTransitionCustomLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderTransitionLineItemStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderTransitionStateAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderUpdateItemShippingAddressAction.schema.json"}, - {"$ref": "https://example.com/StagedOrderUpdateSyncInfoAction.schema.json"} + {"$ref": "https://api.commercetools.com/StagedOrderAddCustomLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddParcelToDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddPaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddReturnInfoAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderAddShoppingListAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeCustomLineItemMoneyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeCustomLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeLineItemQuantityAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeOrderStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangePaymentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeShipmentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeTaxCalculationModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeTaxModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderChangeTaxRoundingModeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderImportCustomLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderImportLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveCustomLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveDiscountCodeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveLineItemAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemoveParcelFromDeliveryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderRemovePaymentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetBillingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetBillingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetBillingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCountryAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomLineItemTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomLineItemTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomerEmailAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomerGroupAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetCustomerIdAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetDeliveryItemsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetItemShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetItemShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemDistributionChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemShippingDetailsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLineItemTotalPriceAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetLocaleAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetOrderNumberAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetOrderTotalTaxAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetParcelCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetParcelCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetParcelItemsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetParcelMeasurementsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetParcelTrackingDataAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetReturnInfoAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetReturnItemCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetReturnItemCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetReturnPaymentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetReturnShipmentStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingAddressAndCustomShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingAddressAndShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingAddressCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingAddressCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingMethodAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingMethodTaxAmountAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingMethodTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderSetShippingRateInputAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderTransitionCustomLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderTransitionLineItemStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderTransitionStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderUpdateItemShippingAddressAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedOrderUpdateSyncInfoAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addCustomLineItem", + "addDelivery", + "addDiscountCode", + "addItemShippingAddress", + "addLineItem", + "addParcelToDelivery", + "addPayment", + "addReturnInfo", + "addShoppingList", + "changeCustomLineItemMoney", + "changeCustomLineItemQuantity", + "changeLineItemQuantity", + "changeOrderState", + "changePaymentState", + "changeShipmentState", + "changeTaxCalculationMode", + "changeTaxMode", + "changeTaxRoundingMode", + "importCustomLineItemState", + "importLineItemState", + "removeCustomLineItem", + "removeDelivery", + "removeDiscountCode", + "removeItemShippingAddress", + "removeLineItem", + "removeParcelFromDelivery", + "removePayment", + "setBillingAddress", + "setBillingAddressCustomField", + "setBillingAddressCustomType", + "setCountry", + "setCustomField", + "setCustomLineItemCustomField", + "setCustomLineItemCustomType", + "setCustomLineItemShippingDetails", + "setCustomLineItemTaxAmount", + "setCustomLineItemTaxRate", + "setCustomShippingMethod", + "setCustomType", + "setCustomerEmail", + "setCustomerGroup", + "setCustomerId", + "setDeliveryAddress", + "setDeliveryAddressCustomField", + "setDeliveryAddressCustomType", + "setDeliveryCustomField", + "setDeliveryCustomType", + "setDeliveryItems", + "setItemShippingAddressCustomField", + "setItemShippingAddressCustomType", + "setLineItemCustomField", + "setLineItemCustomType", + "setLineItemDistributionChannel", + "setLineItemPrice", + "setLineItemShippingDetails", + "setLineItemTaxAmount", + "setLineItemTaxRate", + "setLineItemTotalPrice", + "setLocale", + "setOrderNumber", + "setOrderTotalTax", + "setParcelCustomField", + "setParcelCustomType", + "setParcelItems", + "setParcelMeasurements", + "setParcelTrackingData", + "setReturnInfo", + "setReturnItemCustomField", + "setReturnItemCustomType", + "setReturnPaymentState", + "setReturnShipmentState", + "setShippingAddress", + "setShippingAddressAndCustomShippingMethod", + "setShippingAddressAndShippingMethod", + "setShippingAddressCustomField", + "setShippingAddressCustomType", + "setShippingMethod", + "setShippingMethodTaxAmount", + "setShippingMethodTaxRate", + "setShippingRateInput", + "transitionCustomLineItemState", + "transitionLineItemState", + "transitionState", + "updateItemShippingAddress", + "updateSyncInfo" + ]}}, "required": ["action"], - "$id": "https://example.com/StagedOrderUpdateAction.schema.json", + "$id": "https://api.commercetools.com/StagedOrderUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/StagedOrderUpdateItemShippingAddressAction.schema.json b/json-schemas/StagedOrderUpdateItemShippingAddressAction.schema.json index eec8167b..e5bc3cd3 100644 --- a/json-schemas/StagedOrderUpdateItemShippingAddressAction.schema.json +++ b/json-schemas/StagedOrderUpdateItemShippingAddressAction.schema.json @@ -1,15 +1,15 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderUpdateItemShippingAddressAction", "type": "object", "properties": { "action": {"enum": ["updateItemShippingAddress"]}, - "address": {"$ref": "Address.schema.json"} + "address": {"$ref": "BaseAddress.schema.json"} }, "required": [ "action", "address" ], - "$id": "https://example.com/StagedOrderUpdateItemShippingAddressAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderUpdateItemShippingAddressAction.schema.json" } diff --git a/json-schemas/StagedOrderUpdateSyncInfoAction.schema.json b/json-schemas/StagedOrderUpdateSyncInfoAction.schema.json index b82b9dee..4d17ab09 100644 --- a/json-schemas/StagedOrderUpdateSyncInfoAction.schema.json +++ b/json-schemas/StagedOrderUpdateSyncInfoAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StagedOrderUpdateSyncInfoAction", "type": "object", @@ -16,5 +16,5 @@ "action", "channel" ], - "$id": "https://example.com/StagedOrderUpdateSyncInfoAction.schema.json" + "$id": "https://api.commercetools.com/StagedOrderUpdateSyncInfoAction.schema.json" } diff --git a/json-schemas/StagedQuote.schema.json b/json-schemas/StagedQuote.schema.json new file mode 100644 index 00000000..ae91f4d2 --- /dev/null +++ b/json-schemas/StagedQuote.schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuote", + "type": "object", + "properties": { + "stagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"}, + "version": {"type": "number"}, + "sellerComment": {"type": "string"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"}, + "quoteRequest": {"$ref": "QuoteRequestReference.schema.json"}, + "key": {"type": "string"}, + "customer": {"$ref": "CustomerReference.schema.json"}, + "quotationCart": {"$ref": "CartReference.schema.json"}, + "validTo": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "stagedQuoteState", + "quoteRequest", + "quotationCart" + ], + "$id": "https://api.commercetools.com/StagedQuote.schema.json" +} diff --git a/json-schemas/StagedQuoteChangeStagedQuoteStateAction.schema.json b/json-schemas/StagedQuoteChangeStagedQuoteStateAction.schema.json new file mode 100644 index 00000000..27fc3c35 --- /dev/null +++ b/json-schemas/StagedQuoteChangeStagedQuoteStateAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteChangeStagedQuoteStateAction", + "type": "object", + "properties": { + "action": {"enum": ["changeStagedQuoteState"]}, + "stagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"} + }, + "required": [ + "action", + "stagedQuoteState" + ], + "$id": "https://api.commercetools.com/StagedQuoteChangeStagedQuoteStateAction.schema.json" +} diff --git a/json-schemas/StagedQuoteCreatedMessage.schema.json b/json-schemas/StagedQuoteCreatedMessage.schema.json new file mode 100644 index 00000000..5b353375 --- /dev/null +++ b/json-schemas/StagedQuoteCreatedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteCreatedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StagedQuoteCreated"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StagedQuoteCreatedMessage.schema.json" +} diff --git a/json-schemas/StagedQuoteCreatedMessagePayload.schema.json b/json-schemas/StagedQuoteCreatedMessagePayload.schema.json new file mode 100644 index 00000000..6358bdca --- /dev/null +++ b/json-schemas/StagedQuoteCreatedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteCreatedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["StagedQuoteCreated"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/StagedQuoteCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/StagedQuoteDeletedMessage.schema.json b/json-schemas/StagedQuoteDeletedMessage.schema.json new file mode 100644 index 00000000..50fcac0e --- /dev/null +++ b/json-schemas/StagedQuoteDeletedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StagedQuoteDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StagedQuoteDeletedMessage.schema.json" +} diff --git a/json-schemas/StagedQuoteDeletedMessagePayload.schema.json b/json-schemas/StagedQuoteDeletedMessagePayload.schema.json new file mode 100644 index 00000000..ded7b43d --- /dev/null +++ b/json-schemas/StagedQuoteDeletedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["StagedQuoteDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/StagedQuoteDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/StagedQuoteDraft.schema.json b/json-schemas/StagedQuoteDraft.schema.json new file mode 100644 index 00000000..0683cb55 --- /dev/null +++ b/json-schemas/StagedQuoteDraft.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteDraft", + "type": "object", + "properties": { + "quoteRequest": {"$ref": "QuoteRequestResourceIdentifier.schema.json"}, + "quoteRequestVersion": {"type": "number"}, + "key": {"type": "string"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} + }, + "required": [ + "quoteRequest", + "quoteRequestVersion" + ], + "$id": "https://api.commercetools.com/StagedQuoteDraft.schema.json" +} diff --git a/json-schemas/StagedQuotePagedQueryResponse.schema.json b/json-schemas/StagedQuotePagedQueryResponse.schema.json new file mode 100644 index 00000000..f190df6b --- /dev/null +++ b/json-schemas/StagedQuotePagedQueryResponse.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [StagedQuote](ctp:api:type:StagedQuote).", + "additionalProperties": false, + "title": "StagedQuotePagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "StagedQuote.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/StagedQuotePagedQueryResponse.schema.json" +} diff --git a/json-schemas/StagedQuoteReference.schema.json b/json-schemas/StagedQuoteReference.schema.json new file mode 100644 index 00000000..8d3d1451 --- /dev/null +++ b/json-schemas/StagedQuoteReference.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [StagedQuote](ctp:api:type:StagedQuote).", + "additionalProperties": false, + "title": "StagedQuoteReference", + "type": "object", + "properties": { + "typeId": {"enum": ["staged-quote"]}, + "obj": {"$ref": "StagedQuote.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "typeId", + "id" + ], + "$id": "https://api.commercetools.com/StagedQuoteReference.schema.json" +} diff --git a/json-schemas/StagedQuoteResourceIdentifier.schema.json b/json-schemas/StagedQuoteResourceIdentifier.schema.json new file mode 100644 index 00000000..8047d59f --- /dev/null +++ b/json-schemas/StagedQuoteResourceIdentifier.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [StagedQuote](ctp:api:type:StagedQuote).", + "additionalProperties": false, + "title": "StagedQuoteResourceIdentifier", + "type": "object", + "properties": { + "typeId": {"enum": ["staged-quote"]}, + "key": {"type": "string"}, + "id": {"type": "string"} + }, + "required": ["typeId"], + "$id": "https://api.commercetools.com/StagedQuoteResourceIdentifier.schema.json" +} diff --git a/json-schemas/StagedQuoteSellerCommentSetMessage.schema.json b/json-schemas/StagedQuoteSellerCommentSetMessage.schema.json new file mode 100644 index 00000000..1d484288 --- /dev/null +++ b/json-schemas/StagedQuoteSellerCommentSetMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSellerCommentSetMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StagedQuoteSellerCommentSet"]}, + "version": {"type": "number"}, + "sellerComment": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "sellerComment" + ], + "$id": "https://api.commercetools.com/StagedQuoteSellerCommentSetMessage.schema.json" +} diff --git a/json-schemas/StagedQuoteSellerCommentSetMessagePayload.schema.json b/json-schemas/StagedQuoteSellerCommentSetMessagePayload.schema.json new file mode 100644 index 00000000..bf5e0410 --- /dev/null +++ b/json-schemas/StagedQuoteSellerCommentSetMessagePayload.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSellerCommentSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StagedQuoteSellerCommentSet"]}, + "sellerComment": {"type": "string"} + }, + "required": [ + "type", + "sellerComment" + ], + "$id": "https://api.commercetools.com/StagedQuoteSellerCommentSetMessagePayload.schema.json" +} diff --git a/json-schemas/StagedQuoteSetCustomFieldAction.schema.json b/json-schemas/StagedQuoteSetCustomFieldAction.schema.json new file mode 100644 index 00000000..8fca8b4e --- /dev/null +++ b/json-schemas/StagedQuoteSetCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSetCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/StagedQuoteSetCustomFieldAction.schema.json" +} diff --git a/json-schemas/StagedQuoteSetCustomTypeAction.schema.json b/json-schemas/StagedQuoteSetCustomTypeAction.schema.json new file mode 100644 index 00000000..aa47c33e --- /dev/null +++ b/json-schemas/StagedQuoteSetCustomTypeAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSetCustomTypeAction", + "type": "object", + "properties": { + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "action": {"enum": ["setCustomType"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StagedQuoteSetCustomTypeAction.schema.json" +} diff --git a/json-schemas/StagedQuoteSetSellerCommentAction.schema.json b/json-schemas/StagedQuoteSetSellerCommentAction.schema.json new file mode 100644 index 00000000..c6d0add9 --- /dev/null +++ b/json-schemas/StagedQuoteSetSellerCommentAction.schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSetSellerCommentAction", + "type": "object", + "properties": { + "action": {"enum": ["setSellerComment"]}, + "sellerComment": {"type": "string"} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StagedQuoteSetSellerCommentAction.schema.json" +} diff --git a/json-schemas/StagedQuoteSetValidToAction.schema.json b/json-schemas/StagedQuoteSetValidToAction.schema.json new file mode 100644 index 00000000..fbdf0fae --- /dev/null +++ b/json-schemas/StagedQuoteSetValidToAction.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteSetValidToAction", + "type": "object", + "properties": { + "action": {"enum": ["setValidTo"]}, + "validTo": { + "type": "string", + "format": "date-time" + } + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StagedQuoteSetValidToAction.schema.json" +} diff --git a/json-schemas/StagedQuoteStateChangedMessage.schema.json b/json-schemas/StagedQuoteStateChangedMessage.schema.json new file mode 100644 index 00000000..20d56b4a --- /dev/null +++ b/json-schemas/StagedQuoteStateChangedMessage.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteStateChangedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "stagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "oldStagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "type": {"enum": ["StagedQuoteStateChanged"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "stagedQuoteState", + "oldStagedQuoteState" + ], + "$id": "https://api.commercetools.com/StagedQuoteStateChangedMessage.schema.json" +} diff --git a/json-schemas/StagedQuoteStateChangedMessagePayload.schema.json b/json-schemas/StagedQuoteStateChangedMessagePayload.schema.json new file mode 100644 index 00000000..3c44de21 --- /dev/null +++ b/json-schemas/StagedQuoteStateChangedMessagePayload.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteStateChangedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StagedQuoteStateChanged"]}, + "stagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"}, + "oldStagedQuoteState": {"$ref": "StagedQuoteStateEnum.schema.json"} + }, + "required": [ + "type", + "stagedQuoteState", + "oldStagedQuoteState" + ], + "$id": "https://api.commercetools.com/StagedQuoteStateChangedMessagePayload.schema.json" +} diff --git a/json-schemas/StagedQuoteStateEnum.schema.json b/json-schemas/StagedQuoteStateEnum.schema.json new file mode 100644 index 00000000..388a8daf --- /dev/null +++ b/json-schemas/StagedQuoteStateEnum.schema.json @@ -0,0 +1,12 @@ +{ + "description": "Predefined states tracking the status of the Staged Quote.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "title": "StagedQuoteState", + "type": "string", + "enum": [ + "InProgress", + "Sent", + "Closed" + ], + "$id": "https://api.commercetools.com/StagedQuoteStateEnum.schema.json" +} diff --git a/json-schemas/StagedQuoteUpdate.schema.json b/json-schemas/StagedQuoteUpdate.schema.json new file mode 100644 index 00000000..4d26b9fd --- /dev/null +++ b/json-schemas/StagedQuoteUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "StagedQuoteUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/StagedQuoteUpdate.schema.json" +} diff --git a/json-schemas/StagedQuoteUpdateAction.schema.json b/json-schemas/StagedQuoteUpdateAction.schema.json new file mode 100644 index 00000000..08caf98e --- /dev/null +++ b/json-schemas/StagedQuoteUpdateAction.schema.json @@ -0,0 +1,23 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/StagedQuoteChangeStagedQuoteStateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSetSellerCommentAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StagedQuoteSetValidToAction.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteUpdateAction", + "type": "object", + "properties": {"action": {"enum": [ + "changeStagedQuoteState", + "setCustomField", + "setCustomType", + "setSellerComment", + "setValidTo" + ]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/StagedQuoteUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/StagedQuoteValidToSetMessage.schema.json b/json-schemas/StagedQuoteValidToSetMessage.schema.json new file mode 100644 index 00000000..043f0922 --- /dev/null +++ b/json-schemas/StagedQuoteValidToSetMessage.schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteValidToSetMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StagedQuoteValidToSet"]}, + "version": {"type": "number"}, + "validTo": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "validTo" + ], + "$id": "https://api.commercetools.com/StagedQuoteValidToSetMessage.schema.json" +} diff --git a/json-schemas/StagedQuoteValidToSetMessagePayload.schema.json b/json-schemas/StagedQuoteValidToSetMessagePayload.schema.json new file mode 100644 index 00000000..29684451 --- /dev/null +++ b/json-schemas/StagedQuoteValidToSetMessagePayload.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StagedQuoteValidToSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StagedQuoteValidToSet"]}, + "validTo": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "type", + "validTo" + ], + "$id": "https://api.commercetools.com/StagedQuoteValidToSetMessagePayload.schema.json" +} diff --git a/json-schemas/StandalonePrice.schema.json b/json-schemas/StandalonePrice.schema.json new file mode 100644 index 00000000..ddbe7b9d --- /dev/null +++ b/json-schemas/StandalonePrice.schema.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePrice", + "type": "object", + "properties": { + "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "country": {"type": "string"}, + "tiers": { + "type": "array", + "items": {"$ref": "PriceTier.schema.json"} + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "customerGroup": {"$ref": "CustomerGroupReference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"}, + "channel": {"$ref": "ChannelReference.schema.json"}, + "validFrom": { + "type": "string", + "format": "date-time" + }, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "validUntil": { + "type": "string", + "format": "date-time" + }, + "id": {"type": "string"}, + "sku": {"type": "string"}, + "value": {"$ref": "TypedMoney.schema.json"}, + "key": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sku", + "value" + ], + "$id": "https://api.commercetools.com/StandalonePrice.schema.json" +} diff --git a/json-schemas/StandalonePriceChangeValueAction.schema.json b/json-schemas/StandalonePriceChangeValueAction.schema.json new file mode 100644 index 00000000..02875be9 --- /dev/null +++ b/json-schemas/StandalonePriceChangeValueAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Produces the [StandalonePriceValueChangedMessage](ctp:api:type:StandalonePriceValueChangedMessage).", + "additionalProperties": false, + "title": "StandalonePriceChangeValueAction", + "type": "object", + "properties": { + "action": {"enum": ["changeValue"]}, + "value": {"$ref": "Money.schema.json"} + }, + "required": [ + "action", + "value" + ], + "$id": "https://api.commercetools.com/StandalonePriceChangeValueAction.schema.json" +} diff --git a/json-schemas/StandalonePriceCreatedMessage.schema.json b/json-schemas/StandalonePriceCreatedMessage.schema.json new file mode 100644 index 00000000..6b51c2ef --- /dev/null +++ b/json-schemas/StandalonePriceCreatedMessage.schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Create StandalonePrice](/../api/projects/standalone-prices#create-standaloneprice) request.", + "additionalProperties": false, + "title": "StandalonePriceCreatedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StandalonePriceCreated"]}, + "version": {"type": "number"}, + "standalonePrice": {"$ref": "StandalonePrice.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "standalonePrice" + ], + "$id": "https://api.commercetools.com/StandalonePriceCreatedMessage.schema.json" +} diff --git a/json-schemas/StandalonePriceCreatedMessagePayload.schema.json b/json-schemas/StandalonePriceCreatedMessagePayload.schema.json new file mode 100644 index 00000000..208b8d67 --- /dev/null +++ b/json-schemas/StandalonePriceCreatedMessagePayload.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Create StandalonePrice](/../api/projects/standalone-prices#create-standaloneprice) request.", + "additionalProperties": false, + "title": "StandalonePriceCreatedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StandalonePriceCreated"]}, + "standalonePrice": {"$ref": "StandalonePrice.schema.json"} + }, + "required": [ + "type", + "standalonePrice" + ], + "$id": "https://api.commercetools.com/StandalonePriceCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/StandalonePriceDeletedMessage.schema.json b/json-schemas/StandalonePriceDeletedMessage.schema.json new file mode 100644 index 00000000..4ee7e528 --- /dev/null +++ b/json-schemas/StandalonePriceDeletedMessage.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Delete StandalonePrice](/../api/projects/standalone-prices#delete-standaloneprice) request.", + "additionalProperties": false, + "title": "StandalonePriceDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StandalonePriceDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StandalonePriceDeletedMessage.schema.json" +} diff --git a/json-schemas/StandalonePriceDeletedMessagePayload.schema.json b/json-schemas/StandalonePriceDeletedMessagePayload.schema.json new file mode 100644 index 00000000..6c2a17d3 --- /dev/null +++ b/json-schemas/StandalonePriceDeletedMessagePayload.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Delete StandalonePrice](/../api/projects/standalone-prices#delete-standaloneprice) request.", + "additionalProperties": false, + "title": "StandalonePriceDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["StandalonePriceDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/StandalonePriceDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/StandalonePriceDiscountSetMessage.schema.json b/json-schemas/StandalonePriceDiscountSetMessage.schema.json new file mode 100644 index 00000000..8959339c --- /dev/null +++ b/json-schemas/StandalonePriceDiscountSetMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Emitted when the affected StandalonePrice is updated based on a [Product Discount](ctp:api:type:ProductDiscount) being applied.", + "additionalProperties": false, + "title": "StandalonePriceDiscountSetMessage", + "type": "object", + "properties": { + "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StandalonePriceDiscountSet"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StandalonePriceDiscountSetMessage.schema.json" +} diff --git a/json-schemas/StandalonePriceDiscountSetMessagePayload.schema.json b/json-schemas/StandalonePriceDiscountSetMessagePayload.schema.json new file mode 100644 index 00000000..dc019458 --- /dev/null +++ b/json-schemas/StandalonePriceDiscountSetMessagePayload.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Emitted when the affected StandalonePrice is updated based on a [Product Discount](ctp:api:type:ProductDiscount) being applied.", + "additionalProperties": false, + "title": "StandalonePriceDiscountSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StandalonePriceDiscountSet"]}, + "discounted": {"$ref": "DiscountedPrice.schema.json"} + }, + "required": ["type"], + "$id": "https://api.commercetools.com/StandalonePriceDiscountSetMessagePayload.schema.json" +} diff --git a/json-schemas/StandalonePriceDraft.schema.json b/json-schemas/StandalonePriceDraft.schema.json new file mode 100644 index 00000000..ddff54d6 --- /dev/null +++ b/json-schemas/StandalonePriceDraft.schema.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Standalone Prices are defined with a scope consisting of `currency` and optionally `country`, `customerGroup`, and `channel` and/or a validity period (`validFrom` and/or `validTo`). For more information see [price selection](/../api/projects/products#price-selection).\nCreating a Standalone Price is rejected if there already exists a Standalone Price for the same SKU with exactly the same price scope, or with overlapping validity periods within the same price scope. A Price without validity period does not conflict with a Price defined for a time period.", + "additionalProperties": false, + "title": "StandalonePriceDraft", + "type": "object", + "properties": { + "discounted": {"$ref": "DiscountedPriceDraft.schema.json"}, + "country": {"type": "string"}, + "tiers": { + "type": "array", + "items": {"$ref": "PriceTierDraft.schema.json"} + }, + "customerGroup": {"$ref": "CustomerGroupResourceIdentifier.schema.json"}, + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, + "channel": {"$ref": "ChannelResourceIdentifier.schema.json"}, + "validUntil": { + "type": "string", + "format": "date-time" + }, + "validFrom": { + "type": "string", + "format": "date-time" + }, + "sku": {"type": "string"}, + "value": {"$ref": "Money.schema.json"}, + "key": {"type": "string"} + }, + "required": [ + "sku", + "value" + ], + "$id": "https://api.commercetools.com/StandalonePriceDraft.schema.json" +} diff --git a/json-schemas/StandalonePriceExternalDiscountSetMessage.schema.json b/json-schemas/StandalonePriceExternalDiscountSetMessage.schema.json new file mode 100644 index 00000000..2357e3f6 --- /dev/null +++ b/json-schemas/StandalonePriceExternalDiscountSetMessage.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This Message is the result of the Standalone Price [SetDiscountedPrice](/../api/projects/standalone-prices#set-discounted-price) update action.", + "additionalProperties": false, + "title": "StandalonePriceExternalDiscountSetMessage", + "type": "object", + "properties": { + "discounted": {"$ref": "DiscountedPrice.schema.json"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StandalonePriceExternalDiscountSet"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StandalonePriceExternalDiscountSetMessage.schema.json" +} diff --git a/json-schemas/StandalonePriceExternalDiscountSetMessagePayload.schema.json b/json-schemas/StandalonePriceExternalDiscountSetMessagePayload.schema.json new file mode 100644 index 00000000..63d71f5b --- /dev/null +++ b/json-schemas/StandalonePriceExternalDiscountSetMessagePayload.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This Message is the result of the Standalone Price [SetDiscountedPrice](/../api/projects/standalone-prices#set-discounted-price) update action.", + "additionalProperties": false, + "title": "StandalonePriceExternalDiscountSetMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StandalonePriceExternalDiscountSet"]}, + "discounted": {"$ref": "DiscountedPrice.schema.json"} + }, + "required": ["type"], + "$id": "https://api.commercetools.com/StandalonePriceExternalDiscountSetMessagePayload.schema.json" +} diff --git a/json-schemas/StandalonePricePagedQueryResponse.schema.json b/json-schemas/StandalonePricePagedQueryResponse.schema.json new file mode 100644 index 00000000..ee4b902f --- /dev/null +++ b/json-schemas/StandalonePricePagedQueryResponse.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePricePagedQueryResponse", + "type": "object", + "properties": { + "limit": {"type": "number"}, + "count": {"type": "number"}, + "total": {"type": "number"}, + "offset": {"type": "number"}, + "results": { + "type": "array", + "items": {"$ref": "StandalonePrice.schema.json"} + } + }, + "required": [ + "limit", + "offset", + "count", + "results" + ], + "$id": "https://api.commercetools.com/StandalonePricePagedQueryResponse.schema.json" +} diff --git a/json-schemas/StandalonePriceReference.schema.json b/json-schemas/StandalonePriceReference.schema.json new file mode 100644 index 00000000..dce92732 --- /dev/null +++ b/json-schemas/StandalonePriceReference.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](/../api/types#reference) to a [StandalonePrice](ctp:api:type:StandalonePrice).", + "additionalProperties": false, + "title": "StandalonePriceReference", + "type": "object", + "properties": { + "typeId": {"enum": ["standalone-price"]}, + "obj": {"$ref": "StandalonePrice.schema.json"}, + "id": {"type": "string"} + }, + "required": [ + "typeId", + "id" + ], + "$id": "https://api.commercetools.com/StandalonePriceReference.schema.json" +} diff --git a/json-schemas/StandalonePriceResourceIdentifier.schema.json b/json-schemas/StandalonePriceResourceIdentifier.schema.json new file mode 100644 index 00000000..276ea3a9 --- /dev/null +++ b/json-schemas/StandalonePriceResourceIdentifier.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](/../api/types#resourceidentifier) to a [StandalonePrice](ctp:api:type:StandalonePrice).", + "additionalProperties": false, + "title": "StandalonePriceResourceIdentifier", + "type": "object", + "properties": { + "typeId": {"enum": ["standalone-price"]}, + "key": {"type": "string"}, + "id": {"type": "string"} + }, + "required": ["typeId"], + "$id": "https://api.commercetools.com/StandalonePriceResourceIdentifier.schema.json" +} diff --git a/json-schemas/StandalonePriceSetCustomFieldAction.schema.json b/json-schemas/StandalonePriceSetCustomFieldAction.schema.json new file mode 100644 index 00000000..990a83bb --- /dev/null +++ b/json-schemas/StandalonePriceSetCustomFieldAction.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePriceSetCustomFieldAction", + "type": "object", + "properties": { + "name": {"type": "string"}, + "action": {"enum": ["setCustomField"]}, + "value": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]} + }, + "required": [ + "action", + "name" + ], + "$id": "https://api.commercetools.com/StandalonePriceSetCustomFieldAction.schema.json" +} diff --git a/json-schemas/StandalonePriceSetCustomTypeAction.schema.json b/json-schemas/StandalonePriceSetCustomTypeAction.schema.json new file mode 100644 index 00000000..13e95a1a --- /dev/null +++ b/json-schemas/StandalonePriceSetCustomTypeAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePriceSetCustomTypeAction", + "type": "object", + "properties": { + "type": {"$ref": "TypeResourceIdentifier.schema.json"}, + "fields": {"$ref": "FieldContainer.schema.json"}, + "action": {"enum": ["setCustomType"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StandalonePriceSetCustomTypeAction.schema.json" +} diff --git a/json-schemas/StandalonePriceSetDiscountedPriceAction.schema.json b/json-schemas/StandalonePriceSetDiscountedPriceAction.schema.json new file mode 100644 index 00000000..46218362 --- /dev/null +++ b/json-schemas/StandalonePriceSetDiscountedPriceAction.schema.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Discounts a Standalone Price. The referenced [ProductDiscount](ctp:api:type:ProductDiscount) in the discounted field must be of type external, active, and its predicate must match the referenced Price. Produces the [StandalonePriceExternalDiscountSet](ctp:api:type:StandalonePriceExternalDiscountSetMessage) Message.", + "additionalProperties": false, + "title": "StandalonePriceSetDiscountedPriceAction", + "type": "object", + "properties": { + "discounted": {"$ref": "DiscountedPriceDraft.schema.json"}, + "action": {"enum": ["setDiscountedPrice"]} + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StandalonePriceSetDiscountedPriceAction.schema.json" +} diff --git a/json-schemas/StandalonePriceUpdate.schema.json b/json-schemas/StandalonePriceUpdate.schema.json new file mode 100644 index 00000000..d200c21f --- /dev/null +++ b/json-schemas/StandalonePriceUpdate.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePriceUpdate", + "type": "object", + "properties": { + "version": {"type": "number"}, + "actions": { + "type": "array", + "items": {"$ref": "StandalonePriceUpdateAction.schema.json"} + } + }, + "required": [ + "version", + "actions" + ], + "$id": "https://api.commercetools.com/StandalonePriceUpdate.schema.json" +} diff --git a/json-schemas/StandalonePriceUpdateAction.schema.json b/json-schemas/StandalonePriceUpdateAction.schema.json new file mode 100644 index 00000000..bf0c6526 --- /dev/null +++ b/json-schemas/StandalonePriceUpdateAction.schema.json @@ -0,0 +1,21 @@ +{ + "oneOf": [ + {"$ref": "https://api.commercetools.com/StandalonePriceChangeValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StandalonePriceSetDiscountedPriceAction.schema.json"} + ], + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StandalonePriceUpdateAction", + "type": "object", + "properties": {"action": {"enum": [ + "changeValue", + "setCustomField", + "setCustomType", + "setDiscountedPrice" + ]}}, + "required": ["action"], + "$id": "https://api.commercetools.com/StandalonePriceUpdateAction.schema.json", + "discriminator": {"propertyName": "action"} +} diff --git a/json-schemas/StandalonePriceValueChangedMessage.schema.json b/json-schemas/StandalonePriceValueChangedMessage.schema.json new file mode 100644 index 00000000..f2a5326d --- /dev/null +++ b/json-schemas/StandalonePriceValueChangedMessage.schema.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Change Value](ctp:api:types:StandalonePriceChangeValueAction) update action.", + "additionalProperties": false, + "title": "StandalonePriceValueChangedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StandalonePriceValueChanged"]}, + "version": {"type": "number"}, + "value": {"$ref": "Money.schema.json"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "value" + ], + "$id": "https://api.commercetools.com/StandalonePriceValueChangedMessage.schema.json" +} diff --git a/json-schemas/StandalonePriceValueChangedMessagePayload.schema.json b/json-schemas/StandalonePriceValueChangedMessagePayload.schema.json new file mode 100644 index 00000000..c5b7a378 --- /dev/null +++ b/json-schemas/StandalonePriceValueChangedMessagePayload.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Generated after a successful [Change Value](ctp:api:types:StandalonePriceChangeValueAction) update action.", + "additionalProperties": false, + "title": "StandalonePriceValueChangedMessagePayload", + "type": "object", + "properties": { + "type": {"enum": ["StandalonePriceValueChanged"]}, + "value": {"$ref": "Money.schema.json"} + }, + "required": [ + "type", + "value" + ], + "$id": "https://api.commercetools.com/StandalonePriceValueChangedMessagePayload.schema.json" +} diff --git a/json-schemas/State.schema.json b/json-schemas/State.schema.json index 51f18ef3..c351edf4 100644 --- a/json-schemas/State.schema.json +++ b/json-schemas/State.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "State", "type": "object", @@ -41,5 +41,5 @@ "initial", "builtIn" ], - "$id": "https://example.com/State.schema.json" + "$id": "https://api.commercetools.com/State.schema.json" } diff --git a/json-schemas/StateAddRolesAction.schema.json b/json-schemas/StateAddRolesAction.schema.json index 68219786..47e2c3b9 100644 --- a/json-schemas/StateAddRolesAction.schema.json +++ b/json-schemas/StateAddRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateAddRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/StateAddRolesAction.schema.json" + "$id": "https://api.commercetools.com/StateAddRolesAction.schema.json" } diff --git a/json-schemas/StateChangeInitialAction.schema.json b/json-schemas/StateChangeInitialAction.schema.json index 9f64aeb3..96600c9e 100644 --- a/json-schemas/StateChangeInitialAction.schema.json +++ b/json-schemas/StateChangeInitialAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateChangeInitialAction", "type": "object", @@ -11,5 +11,5 @@ "action", "initial" ], - "$id": "https://example.com/StateChangeInitialAction.schema.json" + "$id": "https://api.commercetools.com/StateChangeInitialAction.schema.json" } diff --git a/json-schemas/StateChangeKeyAction.schema.json b/json-schemas/StateChangeKeyAction.schema.json index 6563dc72..01301905 100644 --- a/json-schemas/StateChangeKeyAction.schema.json +++ b/json-schemas/StateChangeKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateChangeKeyAction", "type": "object", @@ -11,5 +11,5 @@ "action", "key" ], - "$id": "https://example.com/StateChangeKeyAction.schema.json" + "$id": "https://api.commercetools.com/StateChangeKeyAction.schema.json" } diff --git a/json-schemas/StateChangeTypeAction.schema.json b/json-schemas/StateChangeTypeAction.schema.json index fcb48def..87fd9256 100644 --- a/json-schemas/StateChangeTypeAction.schema.json +++ b/json-schemas/StateChangeTypeAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateChangeTypeAction", "type": "object", @@ -11,5 +11,5 @@ "action", "type" ], - "$id": "https://example.com/StateChangeTypeAction.schema.json" + "$id": "https://api.commercetools.com/StateChangeTypeAction.schema.json" } diff --git a/json-schemas/StateDraft.schema.json b/json-schemas/StateDraft.schema.json index 903f9e23..8d39cccf 100644 --- a/json-schemas/StateDraft.schema.json +++ b/json-schemas/StateDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateDraft", "type": "object", @@ -22,5 +22,5 @@ "key", "type" ], - "$id": "https://example.com/StateDraft.schema.json" + "$id": "https://api.commercetools.com/StateDraft.schema.json" } diff --git a/json-schemas/StatePagedQueryResponse.schema.json b/json-schemas/StatePagedQueryResponse.schema.json index 0b202f19..e518fd56 100644 --- a/json-schemas/StatePagedQueryResponse.schema.json +++ b/json-schemas/StatePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [State](ctp:api:type:State).", "additionalProperties": false, "title": "StatePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/StatePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/StatePagedQueryResponse.schema.json" } diff --git a/json-schemas/StateReference.schema.json b/json-schemas/StateReference.schema.json index a5e35355..a4dbd8dc 100644 --- a/json-schemas/StateReference.schema.json +++ b/json-schemas/StateReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State).", "additionalProperties": false, "title": "StateReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/StateReference.schema.json" + "$id": "https://api.commercetools.com/StateReference.schema.json" } diff --git a/json-schemas/StateRemoveRolesAction.schema.json b/json-schemas/StateRemoveRolesAction.schema.json index b27d985a..bfb36006 100644 --- a/json-schemas/StateRemoveRolesAction.schema.json +++ b/json-schemas/StateRemoveRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateRemoveRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/StateRemoveRolesAction.schema.json" + "$id": "https://api.commercetools.com/StateRemoveRolesAction.schema.json" } diff --git a/json-schemas/StateResourceIdentifier.schema.json b/json-schemas/StateResourceIdentifier.schema.json index 28c18c57..0cdba330 100644 --- a/json-schemas/StateResourceIdentifier.schema.json +++ b/json-schemas/StateResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "StateResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/StateResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/StateResourceIdentifier.schema.json" } diff --git a/json-schemas/StateRoleEnumEnum.schema.json b/json-schemas/StateRoleEnumEnum.schema.json index 7d53f4fc..56bd3ed6 100644 --- a/json-schemas/StateRoleEnumEnum.schema.json +++ b/json-schemas/StateRoleEnumEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "For some resource types, a State can fulfill the following predefined roles:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "StateRoleEnum", "type": "string", "enum": [ "ReviewIncludedInStatistics", "Return" ], - "$id": "https://example.com/StateRoleEnumEnum.schema.json" + "$id": "https://api.commercetools.com/StateRoleEnumEnum.schema.json" } diff --git a/json-schemas/StateSetDescriptionAction.schema.json b/json-schemas/StateSetDescriptionAction.schema.json index 13caa75a..f2249907 100644 --- a/json-schemas/StateSetDescriptionAction.schema.json +++ b/json-schemas/StateSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateSetDescriptionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "description" ], - "$id": "https://example.com/StateSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/StateSetDescriptionAction.schema.json" } diff --git a/json-schemas/StateSetNameAction.schema.json b/json-schemas/StateSetNameAction.schema.json index 4acea930..f421ac0e 100644 --- a/json-schemas/StateSetNameAction.schema.json +++ b/json-schemas/StateSetNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateSetNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/StateSetNameAction.schema.json" + "$id": "https://api.commercetools.com/StateSetNameAction.schema.json" } diff --git a/json-schemas/StateSetRolesAction.schema.json b/json-schemas/StateSetRolesAction.schema.json index 5f41c5c4..ab01d955 100644 --- a/json-schemas/StateSetRolesAction.schema.json +++ b/json-schemas/StateSetRolesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateSetRolesAction", "type": "object", @@ -14,5 +14,5 @@ "action", "roles" ], - "$id": "https://example.com/StateSetRolesAction.schema.json" + "$id": "https://api.commercetools.com/StateSetRolesAction.schema.json" } diff --git a/json-schemas/StateSetTransitionsAction.schema.json b/json-schemas/StateSetTransitionsAction.schema.json index bf24820a..06430596 100644 --- a/json-schemas/StateSetTransitionsAction.schema.json +++ b/json-schemas/StateSetTransitionsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateSetTransitionsAction", "type": "object", @@ -11,5 +11,5 @@ "action": {"enum": ["setTransitions"]} }, "required": ["action"], - "$id": "https://example.com/StateSetTransitionsAction.schema.json" + "$id": "https://api.commercetools.com/StateSetTransitionsAction.schema.json" } diff --git a/json-schemas/StateTypeEnumEnum.schema.json b/json-schemas/StateTypeEnumEnum.schema.json index 1c1738d8..c15735e1 100644 --- a/json-schemas/StateTypeEnumEnum.schema.json +++ b/json-schemas/StateTypeEnumEnum.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Resource or object type the State can be assigned to.", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "StateTypeEnum", "type": "string", "enum": [ @@ -9,5 +10,5 @@ "ReviewState", "PaymentState" ], - "$id": "https://example.com/StateTypeEnumEnum.schema.json" + "$id": "https://api.commercetools.com/StateTypeEnumEnum.schema.json" } diff --git a/json-schemas/StateUpdate.schema.json b/json-schemas/StateUpdate.schema.json index c0a35a4e..a851a2fc 100644 --- a/json-schemas/StateUpdate.schema.json +++ b/json-schemas/StateUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/StateUpdate.schema.json" + "$id": "https://api.commercetools.com/StateUpdate.schema.json" } diff --git a/json-schemas/StateUpdateAction.schema.json b/json-schemas/StateUpdateAction.schema.json index 1968b5ba..beae662a 100644 --- a/json-schemas/StateUpdateAction.schema.json +++ b/json-schemas/StateUpdateAction.schema.json @@ -1,21 +1,31 @@ { "oneOf": [ - {"$ref": "https://example.com/StateAddRolesAction.schema.json"}, - {"$ref": "https://example.com/StateChangeInitialAction.schema.json"}, - {"$ref": "https://example.com/StateChangeKeyAction.schema.json"}, - {"$ref": "https://example.com/StateChangeTypeAction.schema.json"}, - {"$ref": "https://example.com/StateRemoveRolesAction.schema.json"}, - {"$ref": "https://example.com/StateSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/StateSetNameAction.schema.json"}, - {"$ref": "https://example.com/StateSetRolesAction.schema.json"}, - {"$ref": "https://example.com/StateSetTransitionsAction.schema.json"} + {"$ref": "https://api.commercetools.com/StateAddRolesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateChangeInitialAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateChangeKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateChangeTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateRemoveRolesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateSetNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateSetRolesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StateSetTransitionsAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StateUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addRoles", + "changeInitial", + "changeKey", + "changeType", + "removeRoles", + "setDescription", + "setName", + "setRoles", + "setTransitions" + ]}}, "required": ["action"], - "$id": "https://example.com/StateUpdateAction.schema.json", + "$id": "https://api.commercetools.com/StateUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/Store.schema.json b/json-schemas/Store.schema.json index 97baf7ed..b9660a21 100644 --- a/json-schemas/Store.schema.json +++ b/json-schemas/Store.schema.json @@ -1,13 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Store", "type": "object", "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, "lastModifiedAt": { "type": "string", "format": "date-time" @@ -20,17 +16,25 @@ "type": "array", "items": {"type": "string"} }, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, "createdBy": {"$ref": "CreatedBy.schema.json"}, "distributionChannels": { "type": "array", "items": {"$ref": "ChannelReference.schema.json"} }, - "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, - "custom": {"$ref": "CustomFields.schema.json"}, "name": {"$ref": "LocalizedString.schema.json"}, "id": {"type": "string"}, - "version": {"type": "number"}, - "key": {"type": "string"} + "key": {"type": "string"}, + "productSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + } }, "required": [ "id", @@ -38,7 +42,10 @@ "createdAt", "lastModifiedAt", "key", - "distributionChannels" + "languages", + "distributionChannels", + "supplyChannels", + "productSelections" ], - "$id": "https://example.com/Store.schema.json" + "$id": "https://api.commercetools.com/Store.schema.json" } diff --git a/json-schemas/StoreAddDistributionChannelAction.schema.json b/json-schemas/StoreAddDistributionChannelAction.schema.json index 06df0ab5..815cebb9 100644 --- a/json-schemas/StoreAddDistributionChannelAction.schema.json +++ b/json-schemas/StoreAddDistributionChannelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This action has no effect if a given distribution channel is already present in a Store.", "additionalProperties": false, "title": "StoreAddDistributionChannelAction", "type": "object", @@ -11,5 +12,5 @@ "action", "distributionChannel" ], - "$id": "https://example.com/StoreAddDistributionChannelAction.schema.json" + "$id": "https://api.commercetools.com/StoreAddDistributionChannelAction.schema.json" } diff --git a/json-schemas/StoreAddProductSelectionAction.schema.json b/json-schemas/StoreAddProductSelectionAction.schema.json new file mode 100644 index 00000000..95239c04 --- /dev/null +++ b/json-schemas/StoreAddProductSelectionAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "To make all included Products available to your customers of a given Store, add the [Product Selections](/../api/projects/product-selections) to the respective Store. This action has no effect if the given Product Selection is already present in the Store and has the same `active` flag.", + "additionalProperties": false, + "title": "StoreAddProductSelectionAction", + "type": "object", + "properties": { + "action": {"enum": ["addProductSelection"]}, + "active": {"type": "boolean"}, + "productSelection": {"$ref": "ProductSelectionResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "productSelection" + ], + "$id": "https://api.commercetools.com/StoreAddProductSelectionAction.schema.json" +} diff --git a/json-schemas/StoreAddSupplyChannelAction.schema.json b/json-schemas/StoreAddSupplyChannelAction.schema.json index 4d57b4a3..6ab25453 100644 --- a/json-schemas/StoreAddSupplyChannelAction.schema.json +++ b/json-schemas/StoreAddSupplyChannelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This action has no effect if a given supply channel is already present in a Store.", "additionalProperties": false, "title": "StoreAddSupplyChannelAction", "type": "object", @@ -11,5 +12,5 @@ "action", "supplyChannel" ], - "$id": "https://example.com/StoreAddSupplyChannelAction.schema.json" + "$id": "https://api.commercetools.com/StoreAddSupplyChannelAction.schema.json" } diff --git a/json-schemas/StoreChangeProductSelectionAction.schema.json b/json-schemas/StoreChangeProductSelectionAction.schema.json new file mode 100644 index 00000000..e7edcd98 --- /dev/null +++ b/json-schemas/StoreChangeProductSelectionAction.schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ProductSelection](ctp:api:type:ProductSelection) in a Store can be activated or deactivated using this update action.", + "additionalProperties": false, + "title": "StoreChangeProductSelectionAction", + "type": "object", + "properties": { + "action": {"enum": ["changeProductSelectionActive"]}, + "active": {"type": "boolean"}, + "productSelection": {"$ref": "ProductSelectionResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "productSelection" + ], + "$id": "https://api.commercetools.com/StoreChangeProductSelectionAction.schema.json" +} diff --git a/json-schemas/StoreCreatedMessage.schema.json b/json-schemas/StoreCreatedMessage.schema.json new file mode 100644 index 00000000..a3ed10a3 --- /dev/null +++ b/json-schemas/StoreCreatedMessage.schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreCreatedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "supplyChannels": { + "type": "array", + "items": {"$ref": "ChannelReference.schema.json"} + }, + "languages": { + "type": "array", + "items": {"type": "string"} + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "custom": {"$ref": "CustomFields.schema.json"}, + "type": {"enum": ["StoreCreated"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "distributionChannels": { + "type": "array", + "items": {"$ref": "ChannelReference.schema.json"} + }, + "name": {"$ref": "LocalizedString.schema.json"}, + "id": {"type": "string"}, + "productSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + } + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type", + "languages", + "distributionChannels", + "supplyChannels", + "productSelections" + ], + "$id": "https://api.commercetools.com/StoreCreatedMessage.schema.json" +} diff --git a/json-schemas/StoreCreatedMessagePayload.schema.json b/json-schemas/StoreCreatedMessagePayload.schema.json new file mode 100644 index 00000000..ea23e635 --- /dev/null +++ b/json-schemas/StoreCreatedMessagePayload.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreCreatedMessagePayload", + "type": "object", + "properties": { + "supplyChannels": { + "type": "array", + "items": {"$ref": "ChannelReference.schema.json"} + }, + "languages": { + "type": "array", + "items": {"type": "string"} + }, + "distributionChannels": { + "type": "array", + "items": {"$ref": "ChannelReference.schema.json"} + }, + "custom": {"$ref": "CustomFields.schema.json"}, + "name": {"$ref": "LocalizedString.schema.json"}, + "type": {"enum": ["StoreCreated"]}, + "productSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + } + }, + "required": [ + "type", + "languages", + "distributionChannels", + "supplyChannels", + "productSelections" + ], + "$id": "https://api.commercetools.com/StoreCreatedMessagePayload.schema.json" +} diff --git a/json-schemas/StoreDeletedMessage.schema.json b/json-schemas/StoreDeletedMessage.schema.json new file mode 100644 index 00000000..0808694d --- /dev/null +++ b/json-schemas/StoreDeletedMessage.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreDeletedMessage", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "id": {"type": "string"}, + "type": {"enum": ["StoreDeleted"]}, + "version": {"type": "number"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StoreDeletedMessage.schema.json" +} diff --git a/json-schemas/StoreDeletedMessagePayload.schema.json b/json-schemas/StoreDeletedMessagePayload.schema.json new file mode 100644 index 00000000..aa6d4cc6 --- /dev/null +++ b/json-schemas/StoreDeletedMessagePayload.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreDeletedMessagePayload", + "type": "object", + "properties": {"type": {"enum": ["StoreDeleted"]}}, + "required": ["type"], + "$id": "https://api.commercetools.com/StoreDeletedMessagePayload.schema.json" +} diff --git a/json-schemas/StoreDraft.schema.json b/json-schemas/StoreDraft.schema.json index 4b1a77f5..d01f5140 100644 --- a/json-schemas/StoreDraft.schema.json +++ b/json-schemas/StoreDraft.schema.json @@ -1,10 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreDraft", "type": "object", "properties": { - "name": {"$ref": "LocalizedString.schema.json"}, "supplyChannels": { "type": "array", "items": {"$ref": "ChannelResourceIdentifier.schema.json"} @@ -13,16 +12,18 @@ "type": "array", "items": {"type": "string"} }, - "key": {"type": "string"}, "distributionChannels": { "type": "array", "items": {"$ref": "ChannelResourceIdentifier.schema.json"} }, - "custom": {"$ref": "CustomFieldsDraft.schema.json"} + "custom": {"$ref": "CustomFieldsDraft.schema.json"}, + "name": {"$ref": "LocalizedString.schema.json"}, + "key": {"type": "string"}, + "productSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSettingDraft.schema.json"} + } }, - "required": [ - "key", - "name" - ], - "$id": "https://example.com/StoreDraft.schema.json" + "required": ["key"], + "$id": "https://api.commercetools.com/StoreDraft.schema.json" } diff --git a/json-schemas/StoreKeyReference.schema.json b/json-schemas/StoreKeyReference.schema.json index d1c8eb04..69a75425 100644 --- a/json-schemas/StoreKeyReference.schema.json +++ b/json-schemas/StoreKeyReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](/../api/types#reference) to a [Store](ctp:api:type:Store) by its key.", "additionalProperties": false, "title": "StoreKeyReference", "type": "object", @@ -11,5 +12,5 @@ "typeId", "key" ], - "$id": "https://example.com/StoreKeyReference.schema.json" + "$id": "https://api.commercetools.com/StoreKeyReference.schema.json" } diff --git a/json-schemas/StorePagedQueryResponse.schema.json b/json-schemas/StorePagedQueryResponse.schema.json index 01d38da2..a7ef7494 100644 --- a/json-schemas/StorePagedQueryResponse.schema.json +++ b/json-schemas/StorePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Store](ctp:api:type:Store).", "additionalProperties": false, "title": "StorePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/StorePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/StorePagedQueryResponse.schema.json" } diff --git a/json-schemas/StoreProductSelectionsChangedMessage.schema.json b/json-schemas/StoreProductSelectionsChangedMessage.schema.json new file mode 100644 index 00000000..16923b20 --- /dev/null +++ b/json-schemas/StoreProductSelectionsChangedMessage.schema.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreProductSelectionsChangedMessage", + "type": "object", + "properties": { + "sequenceNumber": {"type": "number"}, + "lastModifiedAt": { + "type": "string", + "format": "date-time" + }, + "resource": {"$ref": "Reference.schema.json"}, + "lastModifiedBy": {"$ref": "LastModifiedBy.schema.json"}, + "resourceVersion": {"type": "number"}, + "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"}, + "updatedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + }, + "type": {"enum": ["StoreProductSelectionsChanged"]}, + "version": {"type": "number"}, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "addedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + }, + "createdBy": {"$ref": "CreatedBy.schema.json"}, + "removedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + }, + "id": {"type": "string"} + }, + "required": [ + "id", + "version", + "createdAt", + "lastModifiedAt", + "sequenceNumber", + "resource", + "resourceVersion", + "type" + ], + "$id": "https://api.commercetools.com/StoreProductSelectionsChangedMessage.schema.json" +} diff --git a/json-schemas/StoreProductSelectionsChangedMessagePayload.schema.json b/json-schemas/StoreProductSelectionsChangedMessagePayload.schema.json new file mode 100644 index 00000000..057ebef9 --- /dev/null +++ b/json-schemas/StoreProductSelectionsChangedMessagePayload.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "additionalProperties": false, + "title": "StoreProductSelectionsChangedMessagePayload", + "type": "object", + "properties": { + "updatedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + }, + "addedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + }, + "type": {"enum": ["StoreProductSelectionsChanged"]}, + "removedProductSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSetting.schema.json"} + } + }, + "required": ["type"], + "$id": "https://api.commercetools.com/StoreProductSelectionsChangedMessagePayload.schema.json" +} diff --git a/json-schemas/StoreReference.schema.json b/json-schemas/StoreReference.schema.json index 6951f0a2..91081528 100644 --- a/json-schemas/StoreReference.schema.json +++ b/json-schemas/StoreReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](/../api/types#reference) to a [Store](ctp:api:type:Store).", "additionalProperties": false, "title": "StoreReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/StoreReference.schema.json" + "$id": "https://api.commercetools.com/StoreReference.schema.json" } diff --git a/json-schemas/StoreRemoveDistributionChannelAction.schema.json b/json-schemas/StoreRemoveDistributionChannelAction.schema.json index 2ad895eb..38d740f5 100644 --- a/json-schemas/StoreRemoveDistributionChannelAction.schema.json +++ b/json-schemas/StoreRemoveDistributionChannelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreRemoveDistributionChannelAction", "type": "object", @@ -11,5 +11,5 @@ "action", "distributionChannel" ], - "$id": "https://example.com/StoreRemoveDistributionChannelAction.schema.json" + "$id": "https://api.commercetools.com/StoreRemoveDistributionChannelAction.schema.json" } diff --git a/json-schemas/StoreRemoveProductSelectionAction.schema.json b/json-schemas/StoreRemoveProductSelectionAction.schema.json new file mode 100644 index 00000000..d437ba32 --- /dev/null +++ b/json-schemas/StoreRemoveProductSelectionAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "This action has no effect if the given Product Selection is not in the Store.", + "additionalProperties": false, + "title": "StoreRemoveProductSelectionAction", + "type": "object", + "properties": { + "action": {"enum": ["removeProductSelection"]}, + "productSelection": {"$ref": "ProductSelectionResourceIdentifier.schema.json"} + }, + "required": [ + "action", + "productSelection" + ], + "$id": "https://api.commercetools.com/StoreRemoveProductSelectionAction.schema.json" +} diff --git a/json-schemas/StoreRemoveSupplyChannelAction.schema.json b/json-schemas/StoreRemoveSupplyChannelAction.schema.json index abff5c99..52e17467 100644 --- a/json-schemas/StoreRemoveSupplyChannelAction.schema.json +++ b/json-schemas/StoreRemoveSupplyChannelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreRemoveSupplyChannelAction", "type": "object", @@ -11,5 +11,5 @@ "action", "supplyChannel" ], - "$id": "https://example.com/StoreRemoveSupplyChannelAction.schema.json" + "$id": "https://api.commercetools.com/StoreRemoveSupplyChannelAction.schema.json" } diff --git a/json-schemas/StoreResourceIdentifier.schema.json b/json-schemas/StoreResourceIdentifier.schema.json index 5ebdd0ce..ca5eed21 100644 --- a/json-schemas/StoreResourceIdentifier.schema.json +++ b/json-schemas/StoreResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](/../api/types#resourceidentifier) to a [Store](ctp:api:type:Store).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "StoreResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/StoreResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/StoreResourceIdentifier.schema.json" } diff --git a/json-schemas/StoreSetCustomFieldAction.schema.json b/json-schemas/StoreSetCustomFieldAction.schema.json index 5e4f61be..81403af6 100644 --- a/json-schemas/StoreSetCustomFieldAction.schema.json +++ b/json-schemas/StoreSetCustomFieldAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetCustomFieldAction", "type": "object", @@ -19,5 +19,5 @@ "action", "name" ], - "$id": "https://example.com/StoreSetCustomFieldAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetCustomFieldAction.schema.json" } diff --git a/json-schemas/StoreSetCustomTypeAction.schema.json b/json-schemas/StoreSetCustomTypeAction.schema.json index 7c2a7370..7c74511c 100644 --- a/json-schemas/StoreSetCustomTypeAction.schema.json +++ b/json-schemas/StoreSetCustomTypeAction.schema.json @@ -1,13 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetCustomTypeAction", "type": "object", "properties": { "type": {"$ref": "TypeResourceIdentifier.schema.json"}, - "fields": {"type": "object"}, + "fields": {"$ref": "FieldContainer.schema.json"}, "action": {"enum": ["setCustomType"]} }, "required": ["action"], - "$id": "https://example.com/StoreSetCustomTypeAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetCustomTypeAction.schema.json" } diff --git a/json-schemas/StoreSetDistributionChannelsAction.schema.json b/json-schemas/StoreSetDistributionChannelsAction.schema.json index b5666e31..5a6db6c3 100644 --- a/json-schemas/StoreSetDistributionChannelsAction.schema.json +++ b/json-schemas/StoreSetDistributionChannelsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetDistributionChannelsAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/StoreSetDistributionChannelsAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetDistributionChannelsAction.schema.json" } diff --git a/json-schemas/StoreSetLanguagesAction.schema.json b/json-schemas/StoreSetLanguagesAction.schema.json index e1184801..14cdad0c 100644 --- a/json-schemas/StoreSetLanguagesAction.schema.json +++ b/json-schemas/StoreSetLanguagesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetLanguagesAction", "type": "object", @@ -11,5 +11,5 @@ "action": {"enum": ["setLanguages"]} }, "required": ["action"], - "$id": "https://example.com/StoreSetLanguagesAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetLanguagesAction.schema.json" } diff --git a/json-schemas/StoreSetNameAction.schema.json b/json-schemas/StoreSetNameAction.schema.json index 0161e0c2..b6295979 100644 --- a/json-schemas/StoreSetNameAction.schema.json +++ b/json-schemas/StoreSetNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetNameAction", "type": "object", @@ -8,5 +8,5 @@ "action": {"enum": ["setName"]} }, "required": ["action"], - "$id": "https://example.com/StoreSetNameAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetNameAction.schema.json" } diff --git a/json-schemas/StoreSetProductSelectionsAction.schema.json b/json-schemas/StoreSetProductSelectionsAction.schema.json new file mode 100644 index 00000000..4d8444cf --- /dev/null +++ b/json-schemas/StoreSetProductSelectionsAction.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Instead of adding or removing [Product Selections](/../api/projects/product-selections) individually, you can also change all the Store's Product Selections in one go using this update action. The Store will only contain the Product Selections specified in the request.", + "additionalProperties": false, + "title": "StoreSetProductSelectionsAction", + "type": "object", + "properties": { + "action": {"enum": ["setProductSelections"]}, + "productSelections": { + "type": "array", + "items": {"$ref": "ProductSelectionSettingDraft.schema.json"} + } + }, + "required": ["action"], + "$id": "https://api.commercetools.com/StoreSetProductSelectionsAction.schema.json" +} diff --git a/json-schemas/StoreSetSupplyChannelsAction.schema.json b/json-schemas/StoreSetSupplyChannelsAction.schema.json index 39cbe761..7efa93ef 100644 --- a/json-schemas/StoreSetSupplyChannelsAction.schema.json +++ b/json-schemas/StoreSetSupplyChannelsAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreSetSupplyChannelsAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/StoreSetSupplyChannelsAction.schema.json" + "$id": "https://api.commercetools.com/StoreSetSupplyChannelsAction.schema.json" } diff --git a/json-schemas/StoreUpdate.schema.json b/json-schemas/StoreUpdate.schema.json index 3db2c3fb..edd2088d 100644 --- a/json-schemas/StoreUpdate.schema.json +++ b/json-schemas/StoreUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/StoreUpdate.schema.json" + "$id": "https://api.commercetools.com/StoreUpdate.schema.json" } diff --git a/json-schemas/StoreUpdateAction.schema.json b/json-schemas/StoreUpdateAction.schema.json index 02e7dedd..38fcb891 100644 --- a/json-schemas/StoreUpdateAction.schema.json +++ b/json-schemas/StoreUpdateAction.schema.json @@ -1,22 +1,41 @@ { "oneOf": [ - {"$ref": "https://example.com/StoreAddDistributionChannelAction.schema.json"}, - {"$ref": "https://example.com/StoreAddSupplyChannelAction.schema.json"}, - {"$ref": "https://example.com/StoreRemoveDistributionChannelAction.schema.json"}, - {"$ref": "https://example.com/StoreRemoveSupplyChannelAction.schema.json"}, - {"$ref": "https://example.com/StoreSetCustomFieldAction.schema.json"}, - {"$ref": "https://example.com/StoreSetCustomTypeAction.schema.json"}, - {"$ref": "https://example.com/StoreSetDistributionChannelsAction.schema.json"}, - {"$ref": "https://example.com/StoreSetLanguagesAction.schema.json"}, - {"$ref": "https://example.com/StoreSetNameAction.schema.json"}, - {"$ref": "https://example.com/StoreSetSupplyChannelsAction.schema.json"} + {"$ref": "https://api.commercetools.com/StoreAddDistributionChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreAddProductSelectionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreAddSupplyChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreChangeProductSelectionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreRemoveDistributionChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreRemoveProductSelectionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreRemoveSupplyChannelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetCustomFieldAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetCustomTypeAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetDistributionChannelsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetLanguagesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetProductSelectionsAction.schema.json"}, + {"$ref": "https://api.commercetools.com/StoreSetSupplyChannelsAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "StoreUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addDistributionChannel", + "addProductSelection", + "addSupplyChannel", + "changeProductSelectionActive", + "removeDistributionChannel", + "removeProductSelection", + "removeSupplyChannel", + "setCustomField", + "setCustomType", + "setDistributionChannels", + "setLanguages", + "setName", + "setProductSelections", + "setSupplyChannels" + ]}}, "required": ["action"], - "$id": "https://example.com/StoreUpdateAction.schema.json", + "$id": "https://api.commercetools.com/StoreUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/SubRate.schema.json b/json-schemas/SubRate.schema.json index fc2b00d4..3d470035 100644 --- a/json-schemas/SubRate.schema.json +++ b/json-schemas/SubRate.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "It is used to calculate the [taxPortions](/../api/projects/carts#taxedprice) field in a Cart or Order.", "additionalProperties": false, "title": "SubRate", "type": "object", @@ -11,5 +12,5 @@ "name", "amount" ], - "$id": "https://example.com/SubRate.schema.json" + "$id": "https://api.commercetools.com/SubRate.schema.json" } diff --git a/json-schemas/Subscription.schema.json b/json-schemas/Subscription.schema.json index 30ac38d5..f163bf1e 100644 --- a/json-schemas/Subscription.schema.json +++ b/json-schemas/Subscription.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Subscription", "type": "object", @@ -40,5 +40,5 @@ "format", "status" ], - "$id": "https://example.com/Subscription.schema.json" + "$id": "https://api.commercetools.com/Subscription.schema.json" } diff --git a/json-schemas/SubscriptionChangeDestinationAction.schema.json b/json-schemas/SubscriptionChangeDestinationAction.schema.json index 8ecc08c9..7281d05d 100644 --- a/json-schemas/SubscriptionChangeDestinationAction.schema.json +++ b/json-schemas/SubscriptionChangeDestinationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionChangeDestinationAction", "type": "object", @@ -11,5 +11,5 @@ "action", "destination" ], - "$id": "https://example.com/SubscriptionChangeDestinationAction.schema.json" + "$id": "https://api.commercetools.com/SubscriptionChangeDestinationAction.schema.json" } diff --git a/json-schemas/SubscriptionDelivery.schema.json b/json-schemas/SubscriptionDelivery.schema.json deleted file mode 100644 index c9c0279f..00000000 --- a/json-schemas/SubscriptionDelivery.schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "oneOf": [ - {"$ref": "https://example.com/MessageDelivery.schema.json"}, - {"$ref": "https://example.com/ResourceCreatedDelivery.schema.json"}, - {"$ref": "https://example.com/ResourceDeletedDelivery.schema.json"}, - {"$ref": "https://example.com/ResourceUpdatedDelivery.schema.json"} - ], - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "title": "SubscriptionDelivery", - "type": "object", - "properties": { - "projectKey": {"type": "string"}, - "notificationType": {"type": "string"}, - "resource": {"$ref": "Reference.schema.json"}, - "resourceUserProvidedIdentifiers": {"$ref": "UserProvidedIdentifiers.schema.json"} - }, - "required": [ - "projectKey", - "notificationType", - "resource" - ], - "$id": "https://example.com/SubscriptionDelivery.schema.json", - "discriminator": {"propertyName": "notificationType"} -} diff --git a/json-schemas/SubscriptionDraft.schema.json b/json-schemas/SubscriptionDraft.schema.json index 10076104..fbaaed7b 100644 --- a/json-schemas/SubscriptionDraft.schema.json +++ b/json-schemas/SubscriptionDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionDraft", "type": "object", @@ -17,5 +17,5 @@ "key": {"type": "string"} }, "required": ["destination"], - "$id": "https://example.com/SubscriptionDraft.schema.json" + "$id": "https://api.commercetools.com/SubscriptionDraft.schema.json" } diff --git a/json-schemas/SubscriptionHealthStatusEnum.schema.json b/json-schemas/SubscriptionHealthStatusEnum.schema.json index 986d273d..00af9ee4 100644 --- a/json-schemas/SubscriptionHealthStatusEnum.schema.json +++ b/json-schemas/SubscriptionHealthStatusEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "SubscriptionHealthStatus", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "ConfigurationErrorDeliveryStopped", "TemporaryError" ], - "$id": "https://example.com/SubscriptionHealthStatusEnum.schema.json" + "$id": "https://api.commercetools.com/SubscriptionHealthStatusEnum.schema.json" } diff --git a/json-schemas/SubscriptionPagedQueryResponse.schema.json b/json-schemas/SubscriptionPagedQueryResponse.schema.json index 804da1ee..cb3a8f43 100644 --- a/json-schemas/SubscriptionPagedQueryResponse.schema.json +++ b/json-schemas/SubscriptionPagedQueryResponse.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionPagedQueryResponse", "type": "object", @@ -19,5 +19,5 @@ "offset", "results" ], - "$id": "https://example.com/SubscriptionPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/SubscriptionPagedQueryResponse.schema.json" } diff --git a/json-schemas/SubscriptionSetChangesAction.schema.json b/json-schemas/SubscriptionSetChangesAction.schema.json index 7b0ea45f..d1d5eac1 100644 --- a/json-schemas/SubscriptionSetChangesAction.schema.json +++ b/json-schemas/SubscriptionSetChangesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionSetChangesAction", "type": "object", @@ -11,5 +11,5 @@ "action": {"enum": ["setChanges"]} }, "required": ["action"], - "$id": "https://example.com/SubscriptionSetChangesAction.schema.json" + "$id": "https://api.commercetools.com/SubscriptionSetChangesAction.schema.json" } diff --git a/json-schemas/SubscriptionSetKeyAction.schema.json b/json-schemas/SubscriptionSetKeyAction.schema.json index 840d92ef..02637e1d 100644 --- a/json-schemas/SubscriptionSetKeyAction.schema.json +++ b/json-schemas/SubscriptionSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/SubscriptionSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/SubscriptionSetKeyAction.schema.json" } diff --git a/json-schemas/SubscriptionSetMessagesAction.schema.json b/json-schemas/SubscriptionSetMessagesAction.schema.json index bf2fe0b9..ccf6d715 100644 --- a/json-schemas/SubscriptionSetMessagesAction.schema.json +++ b/json-schemas/SubscriptionSetMessagesAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionSetMessagesAction", "type": "object", @@ -11,5 +11,5 @@ } }, "required": ["action"], - "$id": "https://example.com/SubscriptionSetMessagesAction.schema.json" + "$id": "https://api.commercetools.com/SubscriptionSetMessagesAction.schema.json" } diff --git a/json-schemas/SubscriptionUpdate.schema.json b/json-schemas/SubscriptionUpdate.schema.json index 80c83eae..6e744eed 100644 --- a/json-schemas/SubscriptionUpdate.schema.json +++ b/json-schemas/SubscriptionUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/SubscriptionUpdate.schema.json" + "$id": "https://api.commercetools.com/SubscriptionUpdate.schema.json" } diff --git a/json-schemas/SubscriptionUpdateAction.schema.json b/json-schemas/SubscriptionUpdateAction.schema.json index f9380301..d63f5aed 100644 --- a/json-schemas/SubscriptionUpdateAction.schema.json +++ b/json-schemas/SubscriptionUpdateAction.schema.json @@ -1,16 +1,21 @@ { "oneOf": [ - {"$ref": "https://example.com/SubscriptionChangeDestinationAction.schema.json"}, - {"$ref": "https://example.com/SubscriptionSetChangesAction.schema.json"}, - {"$ref": "https://example.com/SubscriptionSetKeyAction.schema.json"}, - {"$ref": "https://example.com/SubscriptionSetMessagesAction.schema.json"} + {"$ref": "https://api.commercetools.com/SubscriptionChangeDestinationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/SubscriptionSetChangesAction.schema.json"}, + {"$ref": "https://api.commercetools.com/SubscriptionSetKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/SubscriptionSetMessagesAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SubscriptionUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "changeDestination", + "setChanges", + "setKey", + "setMessages" + ]}}, "required": ["action"], - "$id": "https://example.com/SubscriptionUpdateAction.schema.json", + "$id": "https://api.commercetools.com/SubscriptionUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/SuggestTokenizer.schema.json b/json-schemas/SuggestTokenizer.schema.json index ab902c47..3d84290a 100644 --- a/json-schemas/SuggestTokenizer.schema.json +++ b/json-schemas/SuggestTokenizer.schema.json @@ -1,14 +1,17 @@ { "oneOf": [ - {"$ref": "https://example.com/CustomTokenizer.schema.json"}, - {"$ref": "https://example.com/WhitespaceTokenizer.schema.json"} + {"$ref": "https://api.commercetools.com/CustomTokenizer.schema.json"}, + {"$ref": "https://api.commercetools.com/WhitespaceTokenizer.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SuggestTokenizer", "type": "object", - "properties": {"type": {"type": "string"}}, + "properties": {"type": {"enum": [ + "custom", + "whitespace" + ]}}, "required": ["type"], - "$id": "https://example.com/SuggestTokenizer.schema.json", + "$id": "https://api.commercetools.com/SuggestTokenizer.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/Suggestion.schema.json b/json-schemas/Suggestion.schema.json index c07040f0..71309b1f 100644 --- a/json-schemas/Suggestion.schema.json +++ b/json-schemas/Suggestion.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Suggestion", "type": "object", "properties": {"text": {"type": "string"}}, "required": ["text"], - "$id": "https://example.com/Suggestion.schema.json" + "$id": "https://api.commercetools.com/Suggestion.schema.json" } diff --git a/json-schemas/SuggestionResult.schema.json b/json-schemas/SuggestionResult.schema.json index 450edb7f..7cef6659 100644 --- a/json-schemas/SuggestionResult.schema.json +++ b/json-schemas/SuggestionResult.schema.json @@ -3,10 +3,10 @@ "type": "array", "items": {"$ref": "Suggestion.schema.json"} }}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SuggestionResult", "type": "object", "properties": {}, - "$id": "https://example.com/SuggestionResult.schema.json" + "$id": "https://api.commercetools.com/SuggestionResult.schema.json" } diff --git a/json-schemas/SyncInfo.schema.json b/json-schemas/SyncInfo.schema.json index ddcd4064..a4f71b33 100644 --- a/json-schemas/SyncInfo.schema.json +++ b/json-schemas/SyncInfo.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SyncInfo", "type": "object", @@ -15,5 +15,5 @@ "channel", "syncedAt" ], - "$id": "https://example.com/SyncInfo.schema.json" + "$id": "https://api.commercetools.com/SyncInfo.schema.json" } diff --git a/json-schemas/SyntaxErrorError.schema.json b/json-schemas/SyntaxErrorError.schema.json index d8e8ce18..06d486bc 100644 --- a/json-schemas/SyntaxErrorError.schema.json +++ b/json-schemas/SyntaxErrorError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "SyntaxErrorError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/SyntaxErrorError.schema.json" + "$id": "https://api.commercetools.com/SyntaxErrorError.schema.json" } diff --git a/json-schemas/TaxCalculationModeEnum.schema.json b/json-schemas/TaxCalculationModeEnum.schema.json index d14d5e49..898740b9 100644 --- a/json-schemas/TaxCalculationModeEnum.schema.json +++ b/json-schemas/TaxCalculationModeEnum.schema.json @@ -1,10 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TaxCalculationMode", "type": "string", "enum": [ "LineItemLevel", "UnitPriceLevel" ], - "$id": "https://example.com/TaxCalculationModeEnum.schema.json" + "$id": "https://api.commercetools.com/TaxCalculationModeEnum.schema.json" } diff --git a/json-schemas/TaxCategory.schema.json b/json-schemas/TaxCategory.schema.json index 0f0648eb..90fd5755 100644 --- a/json-schemas/TaxCategory.schema.json +++ b/json-schemas/TaxCategory.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategory", "type": "object", @@ -32,5 +32,5 @@ "name", "rates" ], - "$id": "https://example.com/TaxCategory.schema.json" + "$id": "https://api.commercetools.com/TaxCategory.schema.json" } diff --git a/json-schemas/TaxCategoryAddTaxRateAction.schema.json b/json-schemas/TaxCategoryAddTaxRateAction.schema.json index 04736f46..531f3c9b 100644 --- a/json-schemas/TaxCategoryAddTaxRateAction.schema.json +++ b/json-schemas/TaxCategoryAddTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryAddTaxRateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxRate" ], - "$id": "https://example.com/TaxCategoryAddTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryAddTaxRateAction.schema.json" } diff --git a/json-schemas/TaxCategoryChangeNameAction.schema.json b/json-schemas/TaxCategoryChangeNameAction.schema.json index 46a3d084..67265e8f 100644 --- a/json-schemas/TaxCategoryChangeNameAction.schema.json +++ b/json-schemas/TaxCategoryChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/TaxCategoryChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryChangeNameAction.schema.json" } diff --git a/json-schemas/TaxCategoryDraft.schema.json b/json-schemas/TaxCategoryDraft.schema.json index 04aff54a..eec4611b 100644 --- a/json-schemas/TaxCategoryDraft.schema.json +++ b/json-schemas/TaxCategoryDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryDraft", "type": "object", @@ -12,9 +12,6 @@ "items": {"$ref": "TaxRateDraft.schema.json"} } }, - "required": [ - "name", - "rates" - ], - "$id": "https://example.com/TaxCategoryDraft.schema.json" + "required": ["name"], + "$id": "https://api.commercetools.com/TaxCategoryDraft.schema.json" } diff --git a/json-schemas/TaxCategoryPagedQueryResponse.schema.json b/json-schemas/TaxCategoryPagedQueryResponse.schema.json index 0dda5cdd..bc040aa7 100644 --- a/json-schemas/TaxCategoryPagedQueryResponse.schema.json +++ b/json-schemas/TaxCategoryPagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [TaxCategory](ctp:api:type:TaxCategory).", "additionalProperties": false, "title": "TaxCategoryPagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/TaxCategoryPagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryPagedQueryResponse.schema.json" } diff --git a/json-schemas/TaxCategoryReference.schema.json b/json-schemas/TaxCategoryReference.schema.json index ee9a346b..e975b250 100644 --- a/json-schemas/TaxCategoryReference.schema.json +++ b/json-schemas/TaxCategoryReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [TaxCategory](ctp:api:type:TaxCategory).", "additionalProperties": false, "title": "TaxCategoryReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/TaxCategoryReference.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryReference.schema.json" } diff --git a/json-schemas/TaxCategoryRemoveTaxRateAction.schema.json b/json-schemas/TaxCategoryRemoveTaxRateAction.schema.json index 9c612d3d..78ccb242 100644 --- a/json-schemas/TaxCategoryRemoveTaxRateAction.schema.json +++ b/json-schemas/TaxCategoryRemoveTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryRemoveTaxRateAction", "type": "object", @@ -11,5 +11,5 @@ "action", "taxRateId" ], - "$id": "https://example.com/TaxCategoryRemoveTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryRemoveTaxRateAction.schema.json" } diff --git a/json-schemas/TaxCategoryReplaceTaxRateAction.schema.json b/json-schemas/TaxCategoryReplaceTaxRateAction.schema.json index f263d2f6..8451fd5c 100644 --- a/json-schemas/TaxCategoryReplaceTaxRateAction.schema.json +++ b/json-schemas/TaxCategoryReplaceTaxRateAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryReplaceTaxRateAction", "type": "object", @@ -13,5 +13,5 @@ "taxRateId", "taxRate" ], - "$id": "https://example.com/TaxCategoryReplaceTaxRateAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryReplaceTaxRateAction.schema.json" } diff --git a/json-schemas/TaxCategoryResourceIdentifier.schema.json b/json-schemas/TaxCategoryResourceIdentifier.schema.json index 0c553d4f..d06a3a24 100644 --- a/json-schemas/TaxCategoryResourceIdentifier.schema.json +++ b/json-schemas/TaxCategoryResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "TaxCategoryResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/TaxCategoryResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/TaxCategoryResourceIdentifier.schema.json" } diff --git a/json-schemas/TaxCategorySetDescriptionAction.schema.json b/json-schemas/TaxCategorySetDescriptionAction.schema.json index cef89842..8fef3107 100644 --- a/json-schemas/TaxCategorySetDescriptionAction.schema.json +++ b/json-schemas/TaxCategorySetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategorySetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/TaxCategorySetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategorySetDescriptionAction.schema.json" } diff --git a/json-schemas/TaxCategorySetKeyAction.schema.json b/json-schemas/TaxCategorySetKeyAction.schema.json index d70c2d8f..2d8e0388 100644 --- a/json-schemas/TaxCategorySetKeyAction.schema.json +++ b/json-schemas/TaxCategorySetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategorySetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/TaxCategorySetKeyAction.schema.json" + "$id": "https://api.commercetools.com/TaxCategorySetKeyAction.schema.json" } diff --git a/json-schemas/TaxCategoryUpdate.schema.json b/json-schemas/TaxCategoryUpdate.schema.json index bd0f2ce5..80cec4f8 100644 --- a/json-schemas/TaxCategoryUpdate.schema.json +++ b/json-schemas/TaxCategoryUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/TaxCategoryUpdate.schema.json" + "$id": "https://api.commercetools.com/TaxCategoryUpdate.schema.json" } diff --git a/json-schemas/TaxCategoryUpdateAction.schema.json b/json-schemas/TaxCategoryUpdateAction.schema.json index ba8e92fe..bb440fa3 100644 --- a/json-schemas/TaxCategoryUpdateAction.schema.json +++ b/json-schemas/TaxCategoryUpdateAction.schema.json @@ -1,18 +1,25 @@ { "oneOf": [ - {"$ref": "https://example.com/TaxCategoryAddTaxRateAction.schema.json"}, - {"$ref": "https://example.com/TaxCategoryChangeNameAction.schema.json"}, - {"$ref": "https://example.com/TaxCategoryRemoveTaxRateAction.schema.json"}, - {"$ref": "https://example.com/TaxCategoryReplaceTaxRateAction.schema.json"}, - {"$ref": "https://example.com/TaxCategorySetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/TaxCategorySetKeyAction.schema.json"} + {"$ref": "https://api.commercetools.com/TaxCategoryAddTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategoryChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategoryRemoveTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategoryReplaceTaxRateAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategorySetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TaxCategorySetKeyAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxCategoryUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addTaxRate", + "changeName", + "removeTaxRate", + "replaceTaxRate", + "setDescription", + "setKey" + ]}}, "required": ["action"], - "$id": "https://example.com/TaxCategoryUpdateAction.schema.json", + "$id": "https://api.commercetools.com/TaxCategoryUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/TaxModeEnum.schema.json b/json-schemas/TaxModeEnum.schema.json index 5eb02fce..d2be5af0 100644 --- a/json-schemas/TaxModeEnum.schema.json +++ b/json-schemas/TaxModeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TaxMode", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "ExternalAmount", "Disabled" ], - "$id": "https://example.com/TaxModeEnum.schema.json" + "$id": "https://api.commercetools.com/TaxModeEnum.schema.json" } diff --git a/json-schemas/TaxPortion.schema.json b/json-schemas/TaxPortion.schema.json index 965b70f0..2b407bc5 100644 --- a/json-schemas/TaxPortion.schema.json +++ b/json-schemas/TaxPortion.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxPortion", "type": "object", @@ -12,5 +12,5 @@ "rate", "amount" ], - "$id": "https://example.com/TaxPortion.schema.json" + "$id": "https://api.commercetools.com/TaxPortion.schema.json" } diff --git a/json-schemas/TaxPortionDraft.schema.json b/json-schemas/TaxPortionDraft.schema.json index 051fda4b..62b70f7b 100644 --- a/json-schemas/TaxPortionDraft.schema.json +++ b/json-schemas/TaxPortionDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxPortionDraft", "type": "object", @@ -12,5 +12,5 @@ "rate", "amount" ], - "$id": "https://example.com/TaxPortionDraft.schema.json" + "$id": "https://api.commercetools.com/TaxPortionDraft.schema.json" } diff --git a/json-schemas/TaxRate.schema.json b/json-schemas/TaxRate.schema.json index 7a58a0ee..efe3cb80 100644 --- a/json-schemas/TaxRate.schema.json +++ b/json-schemas/TaxRate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxRate", "type": "object", @@ -21,5 +21,5 @@ "includedInPrice", "country" ], - "$id": "https://example.com/TaxRate.schema.json" + "$id": "https://api.commercetools.com/TaxRate.schema.json" } diff --git a/json-schemas/TaxRateDraft.schema.json b/json-schemas/TaxRateDraft.schema.json index 7f593020..429bfe16 100644 --- a/json-schemas/TaxRateDraft.schema.json +++ b/json-schemas/TaxRateDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxRateDraft", "type": "object", @@ -19,5 +19,5 @@ "includedInPrice", "country" ], - "$id": "https://example.com/TaxRateDraft.schema.json" + "$id": "https://api.commercetools.com/TaxRateDraft.schema.json" } diff --git a/json-schemas/TaxedItemPrice.schema.json b/json-schemas/TaxedItemPrice.schema.json index 98530533..9b7ed294 100644 --- a/json-schemas/TaxedItemPrice.schema.json +++ b/json-schemas/TaxedItemPrice.schema.json @@ -1,9 +1,10 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxedItemPrice", "type": "object", "properties": { + "totalTax": {"$ref": "TypedMoney.schema.json"}, "totalGross": {"$ref": "TypedMoney.schema.json"}, "totalNet": {"$ref": "TypedMoney.schema.json"} }, @@ -11,5 +12,5 @@ "totalNet", "totalGross" ], - "$id": "https://example.com/TaxedItemPrice.schema.json" + "$id": "https://api.commercetools.com/TaxedItemPrice.schema.json" } diff --git a/json-schemas/TaxedItemPriceDraft.schema.json b/json-schemas/TaxedItemPriceDraft.schema.json index 712b383d..f8be5184 100644 --- a/json-schemas/TaxedItemPriceDraft.schema.json +++ b/json-schemas/TaxedItemPriceDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxedItemPriceDraft", "type": "object", @@ -11,5 +11,5 @@ "totalNet", "totalGross" ], - "$id": "https://example.com/TaxedItemPriceDraft.schema.json" + "$id": "https://api.commercetools.com/TaxedItemPriceDraft.schema.json" } diff --git a/json-schemas/TaxedPrice.schema.json b/json-schemas/TaxedPrice.schema.json index b72ca08a..932a35db 100644 --- a/json-schemas/TaxedPrice.schema.json +++ b/json-schemas/TaxedPrice.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxedPrice", "type": "object", @@ -8,6 +8,7 @@ "type": "array", "items": {"$ref": "TaxPortion.schema.json"} }, + "totalTax": {"$ref": "TypedMoney.schema.json"}, "totalGross": {"$ref": "TypedMoney.schema.json"}, "totalNet": {"$ref": "TypedMoney.schema.json"} }, @@ -16,5 +17,5 @@ "totalGross", "taxPortions" ], - "$id": "https://example.com/TaxedPrice.schema.json" + "$id": "https://api.commercetools.com/TaxedPrice.schema.json" } diff --git a/json-schemas/TaxedPriceDraft.schema.json b/json-schemas/TaxedPriceDraft.schema.json index 7af16aed..809aab69 100644 --- a/json-schemas/TaxedPriceDraft.schema.json +++ b/json-schemas/TaxedPriceDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TaxedPriceDraft", "type": "object", @@ -16,5 +16,5 @@ "totalGross", "taxPortions" ], - "$id": "https://example.com/TaxedPriceDraft.schema.json" + "$id": "https://api.commercetools.com/TaxedPriceDraft.schema.json" } diff --git a/json-schemas/TermFacetResult.schema.json b/json-schemas/TermFacetResult.schema.json index e57cf44a..52955081 100644 --- a/json-schemas/TermFacetResult.schema.json +++ b/json-schemas/TermFacetResult.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TermFacetResult", "type": "object", @@ -10,7 +10,7 @@ "type": {"enum": ["terms"]}, "terms": { "type": "array", - "items": {"$ref": "FacetResultTerm.schema.json"} + "items": {"$ref": "FacetTerm.schema.json"} }, "dataType": {"$ref": "TermFacetResultTypeEnum.schema.json"} }, @@ -22,5 +22,5 @@ "other", "terms" ], - "$id": "https://example.com/TermFacetResult.schema.json" + "$id": "https://api.commercetools.com/TermFacetResult.schema.json" } diff --git a/json-schemas/TermFacetResultTypeEnum.schema.json b/json-schemas/TermFacetResultTypeEnum.schema.json index e64d72e4..935caf42 100644 --- a/json-schemas/TermFacetResultTypeEnum.schema.json +++ b/json-schemas/TermFacetResultTypeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TermFacetResultType", "type": "string", "enum": [ @@ -10,5 +10,5 @@ "boolean", "number" ], - "$id": "https://example.com/TermFacetResultTypeEnum.schema.json" + "$id": "https://api.commercetools.com/TermFacetResultTypeEnum.schema.json" } diff --git a/json-schemas/TextInputHintEnum.schema.json b/json-schemas/TextInputHintEnum.schema.json index 569a4c79..c2fff56b 100644 --- a/json-schemas/TextInputHintEnum.schema.json +++ b/json-schemas/TextInputHintEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A text input hint is a string with one of the following values:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TextInputHint", "type": "string", "enum": [ "SingleLine", "MultiLine" ], - "$id": "https://example.com/TextInputHintEnum.schema.json" + "$id": "https://api.commercetools.com/TextInputHintEnum.schema.json" } diff --git a/json-schemas/TextLineItem.schema.json b/json-schemas/TextLineItem.schema.json index 0e9c424d..6fdb328c 100644 --- a/json-schemas/TextLineItem.schema.json +++ b/json-schemas/TextLineItem.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TextLineItem", "type": "object", @@ -20,5 +20,5 @@ "name", "quantity" ], - "$id": "https://example.com/TextLineItem.schema.json" + "$id": "https://api.commercetools.com/TextLineItem.schema.json" } diff --git a/json-schemas/TextLineItemDraft.schema.json b/json-schemas/TextLineItemDraft.schema.json index 3de5f558..e54dc0e6 100644 --- a/json-schemas/TextLineItemDraft.schema.json +++ b/json-schemas/TextLineItemDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TextLineItemDraft", "type": "object", @@ -14,5 +14,5 @@ "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": ["name"], - "$id": "https://example.com/TextLineItemDraft.schema.json" + "$id": "https://api.commercetools.com/TextLineItemDraft.schema.json" } diff --git a/json-schemas/TrackingData.schema.json b/json-schemas/TrackingData.schema.json index 9ae0bec5..923ef641 100644 --- a/json-schemas/TrackingData.schema.json +++ b/json-schemas/TrackingData.schema.json @@ -1,6 +1,6 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TrackingData", "type": "object", "properties": { @@ -10,5 +10,5 @@ "provider": {"type": "string"}, "trackingId": {"type": "string"} }, - "$id": "https://example.com/TrackingData.schema.json" + "$id": "https://api.commercetools.com/TrackingData.schema.json" } diff --git a/json-schemas/Transaction.schema.json b/json-schemas/Transaction.schema.json index 91111056..1307e342 100644 --- a/json-schemas/Transaction.schema.json +++ b/json-schemas/Transaction.schema.json @@ -1,11 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Transaction", "type": "object", "properties": { "amount": {"$ref": "TypedMoney.schema.json"}, "interactionId": {"type": "string"}, + "custom": {"$ref": "CustomFields.schema.json"}, "id": {"type": "string"}, "state": {"$ref": "TransactionStateEnum.schema.json"}, "type": {"$ref": "TransactionTypeEnum.schema.json"}, @@ -19,5 +20,5 @@ "type", "amount" ], - "$id": "https://example.com/Transaction.schema.json" + "$id": "https://api.commercetools.com/Transaction.schema.json" } diff --git a/json-schemas/TransactionDraft.schema.json b/json-schemas/TransactionDraft.schema.json index 0a6b596b..9bd5990c 100644 --- a/json-schemas/TransactionDraft.schema.json +++ b/json-schemas/TransactionDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TransactionDraft", "type": "object", @@ -11,11 +11,12 @@ "timestamp": { "type": "string", "format": "date-time" - } + }, + "custom": {"$ref": "CustomFieldsDraft.schema.json"} }, "required": [ "type", "amount" ], - "$id": "https://example.com/TransactionDraft.schema.json" + "$id": "https://api.commercetools.com/TransactionDraft.schema.json" } diff --git a/json-schemas/TransactionStateEnum.schema.json b/json-schemas/TransactionStateEnum.schema.json index 1dbd6841..8dab34d4 100644 --- a/json-schemas/TransactionStateEnum.schema.json +++ b/json-schemas/TransactionStateEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TransactionState", "type": "string", "enum": [ @@ -8,5 +8,5 @@ "Success", "Failure" ], - "$id": "https://example.com/TransactionStateEnum.schema.json" + "$id": "https://api.commercetools.com/TransactionStateEnum.schema.json" } diff --git a/json-schemas/TransactionTypeEnum.schema.json b/json-schemas/TransactionTypeEnum.schema.json index c958ffc0..7136737e 100644 --- a/json-schemas/TransactionTypeEnum.schema.json +++ b/json-schemas/TransactionTypeEnum.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TransactionType", "type": "string", "enum": [ @@ -9,5 +9,5 @@ "Refund", "Chargeback" ], - "$id": "https://example.com/TransactionTypeEnum.schema.json" + "$id": "https://api.commercetools.com/TransactionTypeEnum.schema.json" } diff --git a/json-schemas/Type.schema.json b/json-schemas/Type.schema.json index 9cab2008..648fe799 100644 --- a/json-schemas/Type.schema.json +++ b/json-schemas/Type.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Type", "type": "object", @@ -38,5 +38,5 @@ "resourceTypeIds", "fieldDefinitions" ], - "$id": "https://example.com/Type.schema.json" + "$id": "https://api.commercetools.com/Type.schema.json" } diff --git a/json-schemas/TypeAddEnumValueAction.schema.json b/json-schemas/TypeAddEnumValueAction.schema.json index 5703b711..b0621263 100644 --- a/json-schemas/TypeAddEnumValueAction.schema.json +++ b/json-schemas/TypeAddEnumValueAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Adds a value to an [EnumType](ctp:api:type:CustomFieldEnumType).\nThis update action can be used to update an [EnumType](ctp:api:type:CustomFieldEnumType) FieldDefinition and a [SetType](ctp:api:type:CustomFieldSetType) FieldDefinition of [EnumType](ctp:api:type:CustomFieldEnumType).", "additionalProperties": false, "title": "TypeAddEnumValueAction", "type": "object", @@ -13,5 +14,5 @@ "fieldName", "value" ], - "$id": "https://example.com/TypeAddEnumValueAction.schema.json" + "$id": "https://api.commercetools.com/TypeAddEnumValueAction.schema.json" } diff --git a/json-schemas/TypeAddFieldDefinitionAction.schema.json b/json-schemas/TypeAddFieldDefinitionAction.schema.json index 74d755e0..3f88eefa 100644 --- a/json-schemas/TypeAddFieldDefinitionAction.schema.json +++ b/json-schemas/TypeAddFieldDefinitionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeAddFieldDefinitionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "fieldDefinition" ], - "$id": "https://example.com/TypeAddFieldDefinitionAction.schema.json" + "$id": "https://api.commercetools.com/TypeAddFieldDefinitionAction.schema.json" } diff --git a/json-schemas/TypeAddLocalizedEnumValueAction.schema.json b/json-schemas/TypeAddLocalizedEnumValueAction.schema.json index 7e9d8776..0448d27f 100644 --- a/json-schemas/TypeAddLocalizedEnumValueAction.schema.json +++ b/json-schemas/TypeAddLocalizedEnumValueAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Adds a value to a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType).\nThis update action can be used to update a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinition and a [SetType](ctp:api:type:CustomFieldSetType) FieldDefinition of [CustomFieldLocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType).", "additionalProperties": false, "title": "TypeAddLocalizedEnumValueAction", "type": "object", @@ -13,5 +14,5 @@ "fieldName", "value" ], - "$id": "https://example.com/TypeAddLocalizedEnumValueAction.schema.json" + "$id": "https://api.commercetools.com/TypeAddLocalizedEnumValueAction.schema.json" } diff --git a/json-schemas/TypeChangeEnumValueLabelAction.schema.json b/json-schemas/TypeChangeEnumValueLabelAction.schema.json index 78fb7e94..c7a2c3c2 100644 --- a/json-schemas/TypeChangeEnumValueLabelAction.schema.json +++ b/json-schemas/TypeChangeEnumValueLabelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changes the `label` of an [EnumValue](ctp:api:type:CustomFieldEnumValue) of an [EnumType](ctp:api:type:CustomFieldEnumType) FieldDefinition.", "additionalProperties": false, "title": "TypeChangeEnumValueLabelAction", "type": "object", @@ -13,5 +14,5 @@ "fieldName", "value" ], - "$id": "https://example.com/TypeChangeEnumValueLabelAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeEnumValueLabelAction.schema.json" } diff --git a/json-schemas/TypeChangeEnumValueOrderAction.schema.json b/json-schemas/TypeChangeEnumValueOrderAction.schema.json index dd9afc01..4130fe3d 100644 --- a/json-schemas/TypeChangeEnumValueOrderAction.schema.json +++ b/json-schemas/TypeChangeEnumValueOrderAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changes the order of [EnumValues](ctp:api:type:CustomFieldEnumValue) in an [EnumType](ctp:api:type:CustomFieldEnumType) FieldDefinition.\nThis update action can be used to update an [EnumType](ctp:api:type:CustomFieldEnumType) FieldDefinition and a [SetType](ctp:api:type:CustomFieldSetType) FieldDefinition of [EnumType](ctp:api:type:CustomFieldEnumType).", "additionalProperties": false, "title": "TypeChangeEnumValueOrderAction", "type": "object", @@ -16,5 +17,5 @@ "fieldName", "keys" ], - "$id": "https://example.com/TypeChangeEnumValueOrderAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeEnumValueOrderAction.schema.json" } diff --git a/json-schemas/TypeChangeFieldDefinitionLabelAction.schema.json b/json-schemas/TypeChangeFieldDefinitionLabelAction.schema.json index b400daf5..b492454b 100644 --- a/json-schemas/TypeChangeFieldDefinitionLabelAction.schema.json +++ b/json-schemas/TypeChangeFieldDefinitionLabelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeChangeFieldDefinitionLabelAction", "type": "object", @@ -13,5 +13,5 @@ "fieldName", "label" ], - "$id": "https://example.com/TypeChangeFieldDefinitionLabelAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeFieldDefinitionLabelAction.schema.json" } diff --git a/json-schemas/TypeChangeFieldDefinitionOrderAction.schema.json b/json-schemas/TypeChangeFieldDefinitionOrderAction.schema.json index 37122f23..3ae40186 100644 --- a/json-schemas/TypeChangeFieldDefinitionOrderAction.schema.json +++ b/json-schemas/TypeChangeFieldDefinitionOrderAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeChangeFieldDefinitionOrderAction", "type": "object", @@ -14,5 +14,5 @@ "action", "fieldNames" ], - "$id": "https://example.com/TypeChangeFieldDefinitionOrderAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeFieldDefinitionOrderAction.schema.json" } diff --git a/json-schemas/TypeChangeInputHintAction.schema.json b/json-schemas/TypeChangeInputHintAction.schema.json index 600aeb20..6ce59602 100644 --- a/json-schemas/TypeChangeInputHintAction.schema.json +++ b/json-schemas/TypeChangeInputHintAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changes the `inputHint` of [CustomFieldStringType](ctp:api:type:CustomFieldStringType) [FieldDefinition](ctp:api:type:FieldDefinition), a [CustomFieldLocalizedStringType](ctp:api:type:CustomFieldLocalizedStringType) [FieldDefinition](ctp:api:type:FieldDefinition), and [CustomFieldSetType](ctp:api:type:CustomFieldSetType) [FieldDefinition](ctp:api:type:FieldDefinition) of these string-based FieldTypes.", "additionalProperties": false, "title": "TypeChangeInputHintAction", "type": "object", @@ -13,5 +14,5 @@ "fieldName", "inputHint" ], - "$id": "https://example.com/TypeChangeInputHintAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeInputHintAction.schema.json" } diff --git a/json-schemas/TypeChangeKeyAction.schema.json b/json-schemas/TypeChangeKeyAction.schema.json index bd2c9091..de8804c4 100644 --- a/json-schemas/TypeChangeKeyAction.schema.json +++ b/json-schemas/TypeChangeKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeChangeKeyAction", "type": "object", @@ -11,5 +11,5 @@ "action", "key" ], - "$id": "https://example.com/TypeChangeKeyAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeKeyAction.schema.json" } diff --git a/json-schemas/TypeChangeLabelAction.schema.json b/json-schemas/TypeChangeLabelAction.schema.json index 1e75e8d3..6cd5f210 100644 --- a/json-schemas/TypeChangeLabelAction.schema.json +++ b/json-schemas/TypeChangeLabelAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeChangeLabelAction", "type": "object", @@ -13,5 +13,5 @@ "fieldName", "label" ], - "$id": "https://example.com/TypeChangeLabelAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeLabelAction.schema.json" } diff --git a/json-schemas/TypeChangeLocalizedEnumValueLabelAction.schema.json b/json-schemas/TypeChangeLocalizedEnumValueLabelAction.schema.json index cd65c78f..a1b04dd3 100644 --- a/json-schemas/TypeChangeLocalizedEnumValueLabelAction.schema.json +++ b/json-schemas/TypeChangeLocalizedEnumValueLabelAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changes the `label` of a [LocalizedEnumValue](ctp:api:type:CustomFieldLocalizedEnumValue) of a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinition.", "additionalProperties": false, "title": "TypeChangeLocalizedEnumValueLabelAction", "type": "object", @@ -13,5 +14,5 @@ "fieldName", "value" ], - "$id": "https://example.com/TypeChangeLocalizedEnumValueLabelAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeLocalizedEnumValueLabelAction.schema.json" } diff --git a/json-schemas/TypeChangeLocalizedEnumValueOrderAction.schema.json b/json-schemas/TypeChangeLocalizedEnumValueOrderAction.schema.json index ac8c1039..3bfd5244 100644 --- a/json-schemas/TypeChangeLocalizedEnumValueOrderAction.schema.json +++ b/json-schemas/TypeChangeLocalizedEnumValueOrderAction.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Changes the order of [LocalizedEnumValues](ctp:api:type:CustomFieldLocalizedEnumValue) in a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinition.\nThis update action can be used to update a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinition and a [SetType](ctp:api:type:CustomFieldSetType) of [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinitions.", "additionalProperties": false, "title": "TypeChangeLocalizedEnumValueOrderAction", "type": "object", @@ -16,5 +17,5 @@ "fieldName", "keys" ], - "$id": "https://example.com/TypeChangeLocalizedEnumValueOrderAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeLocalizedEnumValueOrderAction.schema.json" } diff --git a/json-schemas/TypeChangeNameAction.schema.json b/json-schemas/TypeChangeNameAction.schema.json index eadcc9f8..3681f1ad 100644 --- a/json-schemas/TypeChangeNameAction.schema.json +++ b/json-schemas/TypeChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/TypeChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/TypeChangeNameAction.schema.json" } diff --git a/json-schemas/TypeDraft.schema.json b/json-schemas/TypeDraft.schema.json index 9345f541..8aa59ddc 100644 --- a/json-schemas/TypeDraft.schema.json +++ b/json-schemas/TypeDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeDraft", "type": "object", @@ -21,5 +21,5 @@ "name", "resourceTypeIds" ], - "$id": "https://example.com/TypeDraft.schema.json" + "$id": "https://api.commercetools.com/TypeDraft.schema.json" } diff --git a/json-schemas/TypePagedQueryResponse.schema.json b/json-schemas/TypePagedQueryResponse.schema.json index ae1559ec..d682dfbc 100644 --- a/json-schemas/TypePagedQueryResponse.schema.json +++ b/json-schemas/TypePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [Types](ctp:api:type:Type).", "additionalProperties": false, "title": "TypePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/TypePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/TypePagedQueryResponse.schema.json" } diff --git a/json-schemas/TypeReference.schema.json b/json-schemas/TypeReference.schema.json index 6d850efc..e738dc2a 100644 --- a/json-schemas/TypeReference.schema.json +++ b/json-schemas/TypeReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Type](ctp:api:type:Type).", "additionalProperties": false, "title": "TypeReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/TypeReference.schema.json" + "$id": "https://api.commercetools.com/TypeReference.schema.json" } diff --git a/json-schemas/TypeRemoveFieldDefinitionAction.schema.json b/json-schemas/TypeRemoveFieldDefinitionAction.schema.json index 74ed9d6b..f60a57bc 100644 --- a/json-schemas/TypeRemoveFieldDefinitionAction.schema.json +++ b/json-schemas/TypeRemoveFieldDefinitionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeRemoveFieldDefinitionAction", "type": "object", @@ -11,5 +11,5 @@ "action", "fieldName" ], - "$id": "https://example.com/TypeRemoveFieldDefinitionAction.schema.json" + "$id": "https://api.commercetools.com/TypeRemoveFieldDefinitionAction.schema.json" } diff --git a/json-schemas/TypeResourceIdentifier.schema.json b/json-schemas/TypeResourceIdentifier.schema.json index 200f29a0..3389632f 100644 --- a/json-schemas/TypeResourceIdentifier.schema.json +++ b/json-schemas/TypeResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) of a [Type](ctp:api:type:Type).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "TypeResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/TypeResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/TypeResourceIdentifier.schema.json" } diff --git a/json-schemas/TypeSetDescriptionAction.schema.json b/json-schemas/TypeSetDescriptionAction.schema.json index 0109f03d..b63403b9 100644 --- a/json-schemas/TypeSetDescriptionAction.schema.json +++ b/json-schemas/TypeSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"$ref": "LocalizedString.schema.json"} }, "required": ["action"], - "$id": "https://example.com/TypeSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/TypeSetDescriptionAction.schema.json" } diff --git a/json-schemas/TypeTextInputHintEnum.schema.json b/json-schemas/TypeTextInputHintEnum.schema.json index 0be52fe7..8c06896e 100644 --- a/json-schemas/TypeTextInputHintEnum.schema.json +++ b/json-schemas/TypeTextInputHintEnum.schema.json @@ -1,10 +1,11 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Provides a visual representation type for this field. It is only relevant for string-based field types like [CustomFieldStringType](ctp:api:type:CustomFieldStringType) and [CustomFieldLocalizedStringType](ctp:api:type:CustomFieldLocalizedStringType). Following values are supported:", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "TypeTextInputHint", "type": "string", "enum": [ "SingleLine", "MultiLine" ], - "$id": "https://example.com/TypeTextInputHintEnum.schema.json" + "$id": "https://api.commercetools.com/TypeTextInputHintEnum.schema.json" } diff --git a/json-schemas/TypeUpdate.schema.json b/json-schemas/TypeUpdate.schema.json index 3ecb4e23..6cb49015 100644 --- a/json-schemas/TypeUpdate.schema.json +++ b/json-schemas/TypeUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/TypeUpdate.schema.json" + "$id": "https://api.commercetools.com/TypeUpdate.schema.json" } diff --git a/json-schemas/TypeUpdateAction.schema.json b/json-schemas/TypeUpdateAction.schema.json index e966fd2d..ecafacde 100644 --- a/json-schemas/TypeUpdateAction.schema.json +++ b/json-schemas/TypeUpdateAction.schema.json @@ -1,27 +1,43 @@ { "oneOf": [ - {"$ref": "https://example.com/TypeAddEnumValueAction.schema.json"}, - {"$ref": "https://example.com/TypeAddFieldDefinitionAction.schema.json"}, - {"$ref": "https://example.com/TypeAddLocalizedEnumValueAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeEnumValueLabelAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeEnumValueOrderAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeFieldDefinitionLabelAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeFieldDefinitionOrderAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeInputHintAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeKeyAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeLabelAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeLocalizedEnumValueLabelAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeLocalizedEnumValueOrderAction.schema.json"}, - {"$ref": "https://example.com/TypeChangeNameAction.schema.json"}, - {"$ref": "https://example.com/TypeRemoveFieldDefinitionAction.schema.json"}, - {"$ref": "https://example.com/TypeSetDescriptionAction.schema.json"} + {"$ref": "https://api.commercetools.com/TypeAddEnumValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeAddFieldDefinitionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeAddLocalizedEnumValueAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeEnumValueLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeEnumValueOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeFieldDefinitionLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeFieldDefinitionOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeInputHintAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeKeyAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeLocalizedEnumValueLabelAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeLocalizedEnumValueOrderAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeRemoveFieldDefinitionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/TypeSetDescriptionAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypeUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addEnumValue", + "addFieldDefinition", + "addLocalizedEnumValue", + "changeEnumValueLabel", + "changeEnumValueOrder", + "changeFieldDefinitionLabel", + "changeFieldDefinitionOrder", + "changeInputHint", + "changeKey", + "changeLabel", + "changeLocalizedEnumValueLabel", + "changeLocalizedEnumValueOrder", + "changeName", + "removeFieldDefinition", + "setDescription" + ]}}, "required": ["action"], - "$id": "https://example.com/TypeUpdateAction.schema.json", + "$id": "https://api.commercetools.com/TypeUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/json-schemas/TypedMoney.schema.json b/json-schemas/TypedMoney.schema.json index fbd18787..520899d1 100644 --- a/json-schemas/TypedMoney.schema.json +++ b/json-schemas/TypedMoney.schema.json @@ -1,24 +1,28 @@ { "oneOf": [ - {"$ref": "https://example.com/CentPrecisionMoney.schema.json"}, - {"$ref": "https://example.com/HighPrecisionMoney.schema.json"} + {"$ref": "https://api.commercetools.com/CentPrecisionMoney.schema.json"}, + {"$ref": "https://api.commercetools.com/HighPrecisionMoney.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Base polymorphic read-only Money type which is stored in cent precision or high precision. The actual type is determined by the `type` field.", "additionalProperties": false, "title": "TypedMoney", "type": "object", "properties": { "centAmount": {"type": "number"}, "fractionDigits": {"type": "number"}, - "type": {"$ref": "MoneyTypeEnum.schema.json"}, + "type": {"enum": [ + "centPrecision", + "highPrecision" + ]}, "currencyCode": {"type": "string"} }, "required": [ - "type", - "fractionDigits", "centAmount", - "currencyCode" + "currencyCode", + "type", + "fractionDigits" ], - "$id": "https://example.com/TypedMoney.schema.json", + "$id": "https://api.commercetools.com/TypedMoney.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/TypedMoneyDraft.schema.json b/json-schemas/TypedMoneyDraft.schema.json index ea627043..709786cc 100644 --- a/json-schemas/TypedMoneyDraft.schema.json +++ b/json-schemas/TypedMoneyDraft.schema.json @@ -1,16 +1,19 @@ { "oneOf": [ - {"$ref": "https://example.com/CentPrecisionMoneyDraft.schema.json"}, - {"$ref": "https://example.com/HighPrecisionMoneyDraft.schema.json"} + {"$ref": "https://api.commercetools.com/CentPrecisionMoneyDraft.schema.json"}, + {"$ref": "https://api.commercetools.com/HighPrecisionMoneyDraft.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "TypedMoneyDraft", "type": "object", "properties": { "centAmount": {"type": "number"}, "fractionDigits": {"type": "number"}, - "type": {"$ref": "MoneyTypeEnum.schema.json"}, + "type": {"enum": [ + "centPrecision", + "highPrecision" + ]}, "currencyCode": {"type": "string"} }, "required": [ @@ -18,6 +21,6 @@ "currencyCode", "type" ], - "$id": "https://example.com/TypedMoneyDraft.schema.json", + "$id": "https://api.commercetools.com/TypedMoneyDraft.schema.json", "discriminator": {"propertyName": "type"} } diff --git a/json-schemas/Update.schema.json b/json-schemas/Update.schema.json index f2608fe3..9abb2cb6 100644 --- a/json-schemas/Update.schema.json +++ b/json-schemas/Update.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Update", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/Update.schema.json" + "$id": "https://api.commercetools.com/Update.schema.json" } diff --git a/json-schemas/UpdateAction.schema.json b/json-schemas/UpdateAction.schema.json index 34f29cbf..a64c3a33 100644 --- a/json-schemas/UpdateAction.schema.json +++ b/json-schemas/UpdateAction.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "UpdateAction", "type": "object", "properties": {"action": {"type": "string"}}, "required": ["action"], - "$id": "https://example.com/UpdateAction.schema.json" + "$id": "https://api.commercetools.com/UpdateAction.schema.json" } diff --git a/json-schemas/UserProvidedIdentifiers.schema.json b/json-schemas/UserProvidedIdentifiers.schema.json index 529b6c17..cfc3e49c 100644 --- a/json-schemas/UserProvidedIdentifiers.schema.json +++ b/json-schemas/UserProvidedIdentifiers.schema.json @@ -1,15 +1,16 @@ { "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "title": "UserProvidedIdentifiers", "type": "object", "properties": { - "externalId": {"type": "string"}, "orderNumber": {"type": "string"}, + "externalId": {"type": "string"}, + "containerAndKey": {"$ref": "ContainerAndKey.schema.json"}, "customerNumber": {"type": "string"}, "sku": {"type": "string"}, "key": {"type": "string"}, "slug": {"$ref": "LocalizedString.schema.json"} }, - "$id": "https://example.com/UserProvidedIdentifiers.schema.json" + "$id": "https://api.commercetools.com/UserProvidedIdentifiers.schema.json" } diff --git a/json-schemas/VariantValues.schema.json b/json-schemas/VariantValues.schema.json index 143cd573..3dece6dd 100644 --- a/json-schemas/VariantValues.schema.json +++ b/json-schemas/VariantValues.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "VariantValues", "type": "object", @@ -18,5 +18,5 @@ "prices", "attributes" ], - "$id": "https://example.com/VariantValues.schema.json" + "$id": "https://api.commercetools.com/VariantValues.schema.json" } diff --git a/json-schemas/WeakPasswordError.schema.json b/json-schemas/WeakPasswordError.schema.json index 7e0a6f81..50507b80 100644 --- a/json-schemas/WeakPasswordError.schema.json +++ b/json-schemas/WeakPasswordError.schema.json @@ -1,5 +1,13 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "patternProperties": {"": {"type": [ + "number", + "string", + "boolean", + "object", + "array", + "null" + ]}}, + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "WeakPasswordError", "type": "object", @@ -11,5 +19,5 @@ "code", "message" ], - "$id": "https://example.com/WeakPasswordError.schema.json" + "$id": "https://api.commercetools.com/WeakPasswordError.schema.json" } diff --git a/json-schemas/WhitespaceTokenizer.schema.json b/json-schemas/WhitespaceTokenizer.schema.json index f1d2114f..e1bfcc29 100644 --- a/json-schemas/WhitespaceTokenizer.schema.json +++ b/json-schemas/WhitespaceTokenizer.schema.json @@ -1,9 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "WhitespaceTokenizer", "type": "object", "properties": {"type": {"enum": ["whitespace"]}}, "required": ["type"], - "$id": "https://example.com/WhitespaceTokenizer.schema.json" + "$id": "https://api.commercetools.com/WhitespaceTokenizer.schema.json" } diff --git a/json-schemas/Zone.schema.json b/json-schemas/Zone.schema.json index cec7bdc4..fc8da092 100644 --- a/json-schemas/Zone.schema.json +++ b/json-schemas/Zone.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "Zone", "type": "object", @@ -32,5 +32,5 @@ "name", "locations" ], - "$id": "https://example.com/Zone.schema.json" + "$id": "https://api.commercetools.com/Zone.schema.json" } diff --git a/json-schemas/ZoneAddLocationAction.schema.json b/json-schemas/ZoneAddLocationAction.schema.json index dcc0a0dc..0ff2bd5a 100644 --- a/json-schemas/ZoneAddLocationAction.schema.json +++ b/json-schemas/ZoneAddLocationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneAddLocationAction", "type": "object", @@ -11,5 +11,5 @@ "action", "location" ], - "$id": "https://example.com/ZoneAddLocationAction.schema.json" + "$id": "https://api.commercetools.com/ZoneAddLocationAction.schema.json" } diff --git a/json-schemas/ZoneChangeNameAction.schema.json b/json-schemas/ZoneChangeNameAction.schema.json index f76da256..07b3d7a0 100644 --- a/json-schemas/ZoneChangeNameAction.schema.json +++ b/json-schemas/ZoneChangeNameAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneChangeNameAction", "type": "object", @@ -11,5 +11,5 @@ "action", "name" ], - "$id": "https://example.com/ZoneChangeNameAction.schema.json" + "$id": "https://api.commercetools.com/ZoneChangeNameAction.schema.json" } diff --git a/json-schemas/ZoneDraft.schema.json b/json-schemas/ZoneDraft.schema.json index 454a2306..85d24b15 100644 --- a/json-schemas/ZoneDraft.schema.json +++ b/json-schemas/ZoneDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneDraft", "type": "object", @@ -12,9 +12,6 @@ }, "key": {"type": "string"} }, - "required": [ - "name", - "locations" - ], - "$id": "https://example.com/ZoneDraft.schema.json" + "required": ["name"], + "$id": "https://api.commercetools.com/ZoneDraft.schema.json" } diff --git a/json-schemas/ZonePagedQueryResponse.schema.json b/json-schemas/ZonePagedQueryResponse.schema.json index 13b172c6..afe899f7 100644 --- a/json-schemas/ZonePagedQueryResponse.schema.json +++ b/json-schemas/ZonePagedQueryResponse.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[PagedQueryResult](/general-concepts#pagedqueryresult) with `results` containing an array of [Zone](ctp:api:type:Zone).", "additionalProperties": false, "title": "ZonePagedQueryResponse", "type": "object", @@ -15,9 +16,9 @@ }, "required": [ "limit", - "count", "offset", + "count", "results" ], - "$id": "https://example.com/ZonePagedQueryResponse.schema.json" + "$id": "https://api.commercetools.com/ZonePagedQueryResponse.schema.json" } diff --git a/json-schemas/ZoneRate.schema.json b/json-schemas/ZoneRate.schema.json index 6b872c45..5ad719cf 100644 --- a/json-schemas/ZoneRate.schema.json +++ b/json-schemas/ZoneRate.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "Defines shipping rates in different currencies for a specific [Zone](ctp:api:type:Zone).", "additionalProperties": false, "title": "ZoneRate", "type": "object", @@ -14,5 +15,5 @@ "zone", "shippingRates" ], - "$id": "https://example.com/ZoneRate.schema.json" + "$id": "https://api.commercetools.com/ZoneRate.schema.json" } diff --git a/json-schemas/ZoneRateDraft.schema.json b/json-schemas/ZoneRateDraft.schema.json index 2ee142ec..2921120b 100644 --- a/json-schemas/ZoneRateDraft.schema.json +++ b/json-schemas/ZoneRateDraft.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneRateDraft", "type": "object", @@ -14,5 +14,5 @@ "zone", "shippingRates" ], - "$id": "https://example.com/ZoneRateDraft.schema.json" + "$id": "https://api.commercetools.com/ZoneRateDraft.schema.json" } diff --git a/json-schemas/ZoneReference.schema.json b/json-schemas/ZoneReference.schema.json index d4ea8656..cac514f3 100644 --- a/json-schemas/ZoneReference.schema.json +++ b/json-schemas/ZoneReference.schema.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[Reference](ctp:api:type:Reference) to a [Zone](ctp:api:type:Zone).", "additionalProperties": false, "title": "ZoneReference", "type": "object", @@ -12,5 +13,5 @@ "typeId", "id" ], - "$id": "https://example.com/ZoneReference.schema.json" + "$id": "https://api.commercetools.com/ZoneReference.schema.json" } diff --git a/json-schemas/ZoneRemoveLocationAction.schema.json b/json-schemas/ZoneRemoveLocationAction.schema.json index 7ebe2a03..39607cfc 100644 --- a/json-schemas/ZoneRemoveLocationAction.schema.json +++ b/json-schemas/ZoneRemoveLocationAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneRemoveLocationAction", "type": "object", @@ -11,5 +11,5 @@ "action", "location" ], - "$id": "https://example.com/ZoneRemoveLocationAction.schema.json" + "$id": "https://api.commercetools.com/ZoneRemoveLocationAction.schema.json" } diff --git a/json-schemas/ZoneResourceIdentifier.schema.json b/json-schemas/ZoneResourceIdentifier.schema.json index 866417ad..8b2b7b6e 100644 --- a/json-schemas/ZoneResourceIdentifier.schema.json +++ b/json-schemas/ZoneResourceIdentifier.schema.json @@ -1,6 +1,7 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "description": "[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Zone](ctp:api:type:Zone).", "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", "title": "ZoneResourceIdentifier", "type": "object", "properties": { @@ -8,5 +9,6 @@ "key": {"type": "string"}, "id": {"type": "string"} }, - "$id": "https://example.com/ZoneResourceIdentifier.schema.json" + "required": ["typeId"], + "$id": "https://api.commercetools.com/ZoneResourceIdentifier.schema.json" } diff --git a/json-schemas/ZoneSetDescriptionAction.schema.json b/json-schemas/ZoneSetDescriptionAction.schema.json index 82f87a6e..023eb71c 100644 --- a/json-schemas/ZoneSetDescriptionAction.schema.json +++ b/json-schemas/ZoneSetDescriptionAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneSetDescriptionAction", "type": "object", @@ -8,5 +8,5 @@ "description": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ZoneSetDescriptionAction.schema.json" + "$id": "https://api.commercetools.com/ZoneSetDescriptionAction.schema.json" } diff --git a/json-schemas/ZoneSetKeyAction.schema.json b/json-schemas/ZoneSetKeyAction.schema.json index 92c648a0..9565d5ce 100644 --- a/json-schemas/ZoneSetKeyAction.schema.json +++ b/json-schemas/ZoneSetKeyAction.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneSetKeyAction", "type": "object", @@ -8,5 +8,5 @@ "key": {"type": "string"} }, "required": ["action"], - "$id": "https://example.com/ZoneSetKeyAction.schema.json" + "$id": "https://api.commercetools.com/ZoneSetKeyAction.schema.json" } diff --git a/json-schemas/ZoneUpdate.schema.json b/json-schemas/ZoneUpdate.schema.json index 9c22f892..e9bf9dad 100644 --- a/json-schemas/ZoneUpdate.schema.json +++ b/json-schemas/ZoneUpdate.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneUpdate", "type": "object", @@ -14,5 +14,5 @@ "version", "actions" ], - "$id": "https://example.com/ZoneUpdate.schema.json" + "$id": "https://api.commercetools.com/ZoneUpdate.schema.json" } diff --git a/json-schemas/ZoneUpdateAction.schema.json b/json-schemas/ZoneUpdateAction.schema.json index 2a1cb8f3..753365c8 100644 --- a/json-schemas/ZoneUpdateAction.schema.json +++ b/json-schemas/ZoneUpdateAction.schema.json @@ -1,17 +1,23 @@ { "oneOf": [ - {"$ref": "https://example.com/ZoneAddLocationAction.schema.json"}, - {"$ref": "https://example.com/ZoneChangeNameAction.schema.json"}, - {"$ref": "https://example.com/ZoneRemoveLocationAction.schema.json"}, - {"$ref": "https://example.com/ZoneSetDescriptionAction.schema.json"}, - {"$ref": "https://example.com/ZoneSetKeyAction.schema.json"} + {"$ref": "https://api.commercetools.com/ZoneAddLocationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneChangeNameAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneRemoveLocationAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneSetDescriptionAction.schema.json"}, + {"$ref": "https://api.commercetools.com/ZoneSetKeyAction.schema.json"} ], - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema#", "additionalProperties": false, "title": "ZoneUpdateAction", "type": "object", - "properties": {"action": {"type": "string"}}, + "properties": {"action": {"enum": [ + "addLocation", + "changeName", + "removeLocation", + "setDescription", + "setKey" + ]}}, "required": ["action"], - "$id": "https://example.com/ZoneUpdateAction.schema.json", + "$id": "https://api.commercetools.com/ZoneUpdateAction.schema.json", "discriminator": {"propertyName": "action"} } diff --git a/src/helpers.ts b/src/helpers.ts index ef4d54dc..bda79b8d 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,15 @@ import { v4 as uuidv4 } from 'uuid' import { ParsedQs } from 'qs' -import { Price } from '@commercetools/platform-sdk' +import { InvalidInputError } from '@commercetools/platform-sdk' +import { CommercetoolsError } from './exceptions' + +export const validateWithSchema = (obj: any, schema: any) => { + if (!schema(obj)) { + // @ts-ignore + const errors = schema.errors + throw new CommercetoolsError(errors) + } +} export const getBaseResourceProperties = () => { return { diff --git a/src/repositories/product.ts b/src/repositories/product.ts index 0650ec0c..f4739e92 100644 --- a/src/repositories/product.ts +++ b/src/repositories/product.ts @@ -6,7 +6,6 @@ import { ProductDraft, ProductPublishAction, ProductSetAttributeAction, - ProductType, ProductTypeReference, ProductVariant, ProductVariantDraft, @@ -19,11 +18,13 @@ import { Writable } from '../types' import { getReferenceFromResourceIdentifier } from './helpers' export class ProductRepository extends AbstractResourceRepository { + getTypeId(): ReferenceTypeId { return 'product' } create(context: RepositoryContext, draft: ProductDraft): Product { + if (!draft.masterVariant) { throw new Error('Missing master variant') } diff --git a/src/services/abstract.ts b/src/services/abstract.ts index 1965fc9e..6e6e4d1a 100644 --- a/src/services/abstract.ts +++ b/src/services/abstract.ts @@ -3,10 +3,20 @@ import { ParsedQs } from 'qs' import { Request, Response, Router } from 'express' import { AbstractResourceRepository } from '../repositories/abstract' import { getRepositoryContext } from '../repositories/helpers' +import { validateWithSchema } from '../helpers' +export type ValidationSchemas = { + update?: any + create?: any + +} export default abstract class AbstractService { protected abstract getBasePath(): string public abstract repository: AbstractResourceRepository + protected validationSchemas: ValidationSchemas = { + update: undefined, + create: undefined, + } createStatusCode = 201 @@ -88,6 +98,9 @@ export default abstract class AbstractService { post(request: Request, response: Response) { const draft = request.body + console.log(this.validationSchemas.create) + validateWithSchema(draft, this.validationSchemas.create) + const resource = this.repository.create( getRepositoryContext(request), draft @@ -98,6 +111,8 @@ export default abstract class AbstractService { postWithId(request: Request, response: Response) { const updateRequest: Update = request.body + validateWithSchema(updateRequest, this.validationSchemas.update) + const resource = this.repository.get( getRepositoryContext(request), request.params['id'] diff --git a/src/services/product.test.ts b/src/services/product.test.ts index 5044245f..63b83a95 100644 --- a/src/services/product.test.ts +++ b/src/services/product.test.ts @@ -135,6 +135,7 @@ describe('Product update actions', () => { { action: 'setAttribute', sku: '1338', name: 'foo', value: 'bar' }, ], }) + console.log(JSON.stringify(response.body, null, 4)) expect(response.status).toBe(200) expect(response.body.version).toBe(2) expect( diff --git a/src/services/product.ts b/src/services/product.ts index 36ce1b29..b8f607c1 100644 --- a/src/services/product.ts +++ b/src/services/product.ts @@ -1,10 +1,15 @@ -import AbstractService from './abstract' +import AbstractService, { ValidationSchemas } from './abstract' import { Router } from 'express' import { AbstractStorage } from '../storage' import { ProductRepository } from '../repositories/product' +import { ProductDraftSchema, ProductUpdateSchema } from '../validate' export class ProductService extends AbstractService { public repository: ProductRepository + validationSchemas: ValidationSchemas = { + update: ProductUpdateSchema, + create: ProductDraftSchema, + } constructor(parent: Router, storage: AbstractStorage) { super(parent) diff --git a/src/validate.js b/src/validate.js index d825abc0..9e5e2d62 100644 --- a/src/validate.js +++ b/src/validate.js @@ -1 +1 @@ -"use strict";exports.AccessDeniedErrorSchema = validate10;const schema11 = {"description":"A product in the catalog","allOf":[{"$ref":"ErrorObject.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["code","message"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/AccessDeniedError.schema.json"};const schema12 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["code","message"],"$id":"https://example.com/ErrorObject.schema.json"};function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/AccessDeniedError.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.code === undefined) && (missing0 = "code")) || ((data.message === undefined) && (missing0 = "message"))){validate10.errors = [{instancePath,schemaPath:"ErrorObject.schema.json/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs4 = errors;for(const key0 in data){if(!((key0 === "message") || (key0 === "code"))){validate10.errors = [{instancePath,schemaPath:"ErrorObject.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs4 === errors){if(data.message !== undefined){const _errs5 = errors;if(typeof data.message !== "string"){validate10.errors = [{instancePath:instancePath+"/message",schemaPath:"ErrorObject.schema.json/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.code !== undefined){const _errs7 = errors;if(typeof data.code !== "string"){validate10.errors = [{instancePath:instancePath+"/code",schemaPath:"ErrorObject.schema.json/properties/code/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}}}}}else {validate10.errors = [{instancePath,schemaPath:"ErrorObject.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.code === undefined) && (missing1 = "code")) || ((data.message === undefined) && (missing1 = "message"))){validate10.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs10 = errors;for(const key1 in data){if(!((key1 === "message") || (key1 === "code"))){validate10.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs10 === errors){if(data.message !== undefined){const _errs11 = errors;if(typeof data.message !== "string"){validate10.errors = [{instancePath:instancePath+"/message",schemaPath:"#/allOf/1/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs11 === errors;}else {var valid3 = true;}if(valid3){if(data.code !== undefined){const _errs13 = errors;if(typeof data.code !== "string"){validate10.errors = [{instancePath:instancePath+"/code",schemaPath:"#/allOf/1/properties/code/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs13 === errors;}else {var valid3 = true;}}}}}var valid0 = _errs9 === errors;}validate10.errors = vErrors;return errors === 0;}exports.AddressSchema = validate11;const schema13 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"lastName":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"title":{"type":"string"},"building":{"type":"string"},"streetName":{"type":"string"},"company":{"type":"string"},"id":{"type":"string"},"state":{"type":"string"},"department":{"type":"string"},"fax":{"type":"string"},"key":{"type":"string"},"email":{"type":"string"},"pOBox":{"type":"string"},"streetNumber":{"type":"string"},"custom":{"$ref":"CustomFields.schema.json"},"mobile":{"type":"string"},"externalId":{"type":"string"},"additionalAddressInfo":{"type":"string"},"firstName":{"type":"string"},"phone":{"type":"string"},"additionalStreetInfo":{"type":"string"},"salutation":{"type":"string"},"region":{"type":"string"},"apartment":{"type":"string"}},"required":["country"],"$id":"https://example.com/Address.schema.json"};const func4 = Object.prototype.hasOwnProperty;const schema14 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"type":{"$ref":"TypeReference.schema.json"},"fields":{"$ref":"FieldContainer.schema.json"}},"required":["type","fields"],"$id":"https://example.com/CustomFields.schema.json"};const schema37 = {"patternProperties":{"":{"type":["number","string","boolean","object","array","null"]}},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{},"required":[],"$id":"https://example.com/FieldContainer.schema.json"};const schema15 = {"description":"A product in the catalog","allOf":[{"$ref":"Reference.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"typeId":{"type":"string"},"obj":{"$ref":"Type.schema.json"},"id":{"type":"string"}},"required":["typeId","id"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/TypeReference.schema.json"};const schema16 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"typeId":{"type":"string"},"id":{"type":"string"}},"required":["typeId","id"],"$id":"https://example.com/Reference.schema.json"};const schema17 = {"description":"A product in the catalog","allOf":[{"$ref":"BaseResource.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"CreatedBy.schema.json"},"lastModifiedBy":{"$ref":"LastModifiedBy.schema.json"},"name":{"$ref":"LocalizedString.schema.json"},"description":{"$ref":"LocalizedString.schema.json"},"fieldDefinitions":{"type":"array","items":{"$ref":"FieldDefinition.schema.json"}},"id":{"type":"string"},"version":{"type":"integer"},"key":{"type":"string"},"resourceTypeIds":{"type":"array","items":{"type":"string"}}},"required":["id","version","createdAt","lastModifiedAt","key","name","resourceTypeIds","fieldDefinitions"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/Type.schema.json"};const schema18 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"version":{"type":"integer"}},"required":["id","version","createdAt","lastModifiedAt"],"$id":"https://example.com/BaseResource.schema.json"};const schema32 = {"patternProperties":{"^[a-z]{2}(-[A-Z]{2})?$":{"type":"string"}},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{},"required":[],"$id":"https://example.com/LocalizedString.schema.json"};const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];const schema19 = {"description":"A product in the catalog","allOf":[{"$ref":"ClientLogging.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"anonymousId":{"type":"string"},"clientId":{"type":"string"},"externalUserId":{"type":"string"},"customer":{"$ref":"CustomerReference.schema.json"}},"required":[]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/CreatedBy.schema.json"};const schema20 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"anonymousId":{"type":"string"},"clientId":{"type":"string"},"externalUserId":{"type":"string"},"customer":{"$ref":"CustomerReference.schema.json"}},"required":[],"$id":"https://example.com/ClientLogging.schema.json"};const schema21 = {"description":"A product in the catalog","allOf":[{"$ref":"Reference.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"typeId":{"type":"string"},"obj":{"$ref":"Customer.schema.json"},"id":{"type":"string"}},"required":["typeId","id"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/CustomerReference.schema.json"};const schema23 = {"description":"A product in the catalog","allOf":[{"$ref":"BaseResource.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"lastName":{"type":"string"},"addresses":{"type":"array","items":{"$ref":"Address.schema.json"}},"lastModifiedAt":{"type":"string","format":"date-time"},"companyName":{"type":"string"},"vatId":{"type":"string"},"title":{"type":"string"},"locale":{"type":"string"},"shippingAddressIds":{"type":"array","items":{"type":"string"}},"isEmailVerified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"password":{"type":"string"},"id":{"type":"string"},"email":{"type":"string"},"key":{"type":"string"},"customerGroup":{"$ref":"CustomerGroupReference.schema.json"},"stores":{"type":"array","items":{"$ref":"StoreKeyReference.schema.json"}},"lastModifiedBy":{"$ref":"LastModifiedBy.schema.json"},"custom":{"$ref":"CustomFields.schema.json"},"externalId":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"customerNumber":{"type":"string"},"defaultShippingAddressId":{"type":"string"},"billingAddressIds":{"type":"array","items":{"type":"string"}},"version":{"type":"integer"},"defaultBillingAddressId":{"type":"string"},"firstName":{"type":"string"},"createdBy":{"$ref":"CreatedBy.schema.json"},"middleName":{"type":"string"},"salutation":{"type":"string"}},"required":["id","version","createdAt","lastModifiedAt","email","password","addresses","isEmailVerified"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/Customer.schema.json"};const formats24 = require("ajv-formats/dist/formats").fullFormats.date;const wrapper0 = {validate: validate11};const wrapper4 = {validate: validate12};const wrapper1 = {validate: validate15};const schema25 = {"description":"A product in the catalog","allOf":[{"$ref":"Reference.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"typeId":{"type":"string"},"obj":{"$ref":"CustomerGroup.schema.json"},"id":{"type":"string"}},"required":["typeId","id"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/CustomerGroupReference.schema.json"};const schema27 = {"description":"A product in the catalog","allOf":[{"$ref":"BaseResource.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"createdAt":{"type":"string","format":"date-time"},"lastModifiedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"CreatedBy.schema.json"},"lastModifiedBy":{"$ref":"LastModifiedBy.schema.json"},"custom":{"$ref":"CustomFields.schema.json"},"name":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"key":{"type":"string"}},"required":["id","version","createdAt","lastModifiedAt","name"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/CustomerGroup.schema.json"};const schema29 = {"description":"A product in the catalog","allOf":[{"$ref":"ClientLogging.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"anonymousId":{"type":"string"},"clientId":{"type":"string"},"externalUserId":{"type":"string"},"customer":{"$ref":"CustomerReference.schema.json"}},"required":[]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/LastModifiedBy.schema.json"};const wrapper2 = {validate: validate16};const wrapper3 = {validate: validate17};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/LastModifiedBy.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;if(!(wrapper2.validate(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);errors = vErrors.length;}var valid0 = _errs1 === errors;if(valid0){const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){const _errs3 = errors;for(const key0 in data){if(!((((key0 === "anonymousId") || (key0 === "clientId")) || (key0 === "externalUserId")) || (key0 === "customer"))){validate21.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs3 === errors){if(data.anonymousId !== undefined){const _errs4 = errors;if(typeof data.anonymousId !== "string"){validate21.errors = [{instancePath:instancePath+"/anonymousId",schemaPath:"#/allOf/1/properties/anonymousId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.clientId !== undefined){const _errs6 = errors;if(typeof data.clientId !== "string"){validate21.errors = [{instancePath:instancePath+"/clientId",schemaPath:"#/allOf/1/properties/clientId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.externalUserId !== undefined){const _errs8 = errors;if(typeof data.externalUserId !== "string"){validate21.errors = [{instancePath:instancePath+"/externalUserId",schemaPath:"#/allOf/1/properties/externalUserId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs8 === errors;}else {var valid1 = true;}if(valid1){if(data.customer !== undefined){const _errs10 = errors;if(!(wrapper3.validate(data.customer, {instancePath:instancePath+"/customer",parentData:data,parentDataProperty:"customer",rootData}))){vErrors = vErrors === null ? wrapper3.validate.errors : vErrors.concat(wrapper3.validate.errors);errors = vErrors.length;}var valid1 = _errs10 === errors;}else {var valid1 = true;}}}}}}var valid0 = _errs2 === errors;}validate21.errors = vErrors;return errors === 0;}function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/CustomerGroup.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.id === undefined) && (missing0 = "id")) || ((data.version === undefined) && (missing0 = "version"))) || ((data.createdAt === undefined) && (missing0 = "createdAt"))) || ((data.lastModifiedAt === undefined) && (missing0 = "lastModifiedAt"))){validate20.errors = [{instancePath,schemaPath:"BaseResource.schema.json/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs4 = errors;for(const key0 in data){if(!((((key0 === "createdAt") || (key0 === "id")) || (key0 === "lastModifiedAt")) || (key0 === "version"))){validate20.errors = [{instancePath,schemaPath:"BaseResource.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs4 === errors){if(data.createdAt !== undefined){let data0 = data.createdAt;const _errs5 = errors;if(errors === _errs5){if(errors === _errs5){if(typeof data0 === "string"){if(!(formats0.validate(data0))){validate20.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"BaseResource.schema.json/properties/createdAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate20.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"BaseResource.schema.json/properties/createdAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.id !== undefined){const _errs7 = errors;if(typeof data.id !== "string"){validate20.errors = [{instancePath:instancePath+"/id",schemaPath:"BaseResource.schema.json/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.lastModifiedAt !== undefined){let data2 = data.lastModifiedAt;const _errs9 = errors;if(errors === _errs9){if(errors === _errs9){if(typeof data2 === "string"){if(!(formats0.validate(data2))){validate20.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"BaseResource.schema.json/properties/lastModifiedAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate20.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"BaseResource.schema.json/properties/lastModifiedAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs9 === errors;}else {var valid2 = true;}if(valid2){if(data.version !== undefined){let data3 = data.version;const _errs11 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate20.errors = [{instancePath:instancePath+"/version",schemaPath:"BaseResource.schema.json/properties/version/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid2 = _errs11 === errors;}else {var valid2 = true;}}}}}}}else {validate20.errors = [{instancePath,schemaPath:"BaseResource.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.id === undefined) && (missing1 = "id")) || ((data.version === undefined) && (missing1 = "version"))) || ((data.createdAt === undefined) && (missing1 = "createdAt"))) || ((data.lastModifiedAt === undefined) && (missing1 = "lastModifiedAt"))) || ((data.name === undefined) && (missing1 = "name"))){validate20.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs14 = errors;for(const key1 in data){if(!(func4.call(schema27.allOf[1].properties, key1))){validate20.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs14 === errors){if(data.createdAt !== undefined){let data4 = data.createdAt;const _errs15 = errors;if(errors === _errs15){if(errors === _errs15){if(typeof data4 === "string"){if(!(formats0.validate(data4))){validate20.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"#/allOf/1/properties/createdAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate20.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"#/allOf/1/properties/createdAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data.lastModifiedAt !== undefined){let data5 = data.lastModifiedAt;const _errs17 = errors;if(errors === _errs17){if(errors === _errs17){if(typeof data5 === "string"){if(!(formats0.validate(data5))){validate20.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"#/allOf/1/properties/lastModifiedAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate20.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"#/allOf/1/properties/lastModifiedAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid3 = _errs17 === errors;}else {var valid3 = true;}if(valid3){if(data.createdBy !== undefined){const _errs19 = errors;if(!(wrapper1.validate(data.createdBy, {instancePath:instancePath+"/createdBy",parentData:data,parentDataProperty:"createdBy",rootData}))){vErrors = vErrors === null ? wrapper1.validate.errors : vErrors.concat(wrapper1.validate.errors);errors = vErrors.length;}var valid3 = _errs19 === errors;}else {var valid3 = true;}if(valid3){if(data.lastModifiedBy !== undefined){const _errs20 = errors;if(!(validate21(data.lastModifiedBy, {instancePath:instancePath+"/lastModifiedBy",parentData:data,parentDataProperty:"lastModifiedBy",rootData}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}var valid3 = _errs20 === errors;}else {var valid3 = true;}if(valid3){if(data.custom !== undefined){const _errs21 = errors;if(!(wrapper4.validate(data.custom, {instancePath:instancePath+"/custom",parentData:data,parentDataProperty:"custom",rootData}))){vErrors = vErrors === null ? wrapper4.validate.errors : vErrors.concat(wrapper4.validate.errors);errors = vErrors.length;}var valid3 = _errs21 === errors;}else {var valid3 = true;}if(valid3){if(data.name !== undefined){const _errs22 = errors;if(typeof data.name !== "string"){validate20.errors = [{instancePath:instancePath+"/name",schemaPath:"#/allOf/1/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs22 === errors;}else {var valid3 = true;}if(valid3){if(data.id !== undefined){const _errs24 = errors;if(typeof data.id !== "string"){validate20.errors = [{instancePath:instancePath+"/id",schemaPath:"#/allOf/1/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs24 === errors;}else {var valid3 = true;}if(valid3){if(data.version !== undefined){let data11 = data.version;const _errs26 = errors;if(!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))){validate20.errors = [{instancePath:instancePath+"/version",schemaPath:"#/allOf/1/properties/version/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid3 = _errs26 === errors;}else {var valid3 = true;}if(valid3){if(data.key !== undefined){const _errs28 = errors;if(typeof data.key !== "string"){validate20.errors = [{instancePath:instancePath+"/key",schemaPath:"#/allOf/1/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs28 === errors;}else {var valid3 = true;}}}}}}}}}}}}var valid0 = _errs13 === errors;}validate20.errors = vErrors;return errors === 0;}function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/CustomerGroupReference.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate19.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.typeId === undefined) && (missing0 = "typeId")) || ((data.id === undefined) && (missing0 = "id"))){validate19.errors = [{instancePath,schemaPath:"Reference.schema.json/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs4 = errors;for(const key0 in data){if(!((key0 === "typeId") || (key0 === "id"))){validate19.errors = [{instancePath,schemaPath:"Reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs4 === errors){if(data.typeId !== undefined){const _errs5 = errors;if(typeof data.typeId !== "string"){validate19.errors = [{instancePath:instancePath+"/typeId",schemaPath:"Reference.schema.json/properties/typeId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.id !== undefined){const _errs7 = errors;if(typeof data.id !== "string"){validate19.errors = [{instancePath:instancePath+"/id",schemaPath:"Reference.schema.json/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}}}}}else {validate19.errors = [{instancePath,schemaPath:"Reference.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.typeId === undefined) && (missing1 = "typeId")) || ((data.id === undefined) && (missing1 = "id"))){validate19.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs10 = errors;for(const key1 in data){if(!(((key1 === "typeId") || (key1 === "obj")) || (key1 === "id"))){validate19.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs10 === errors){if(data.typeId !== undefined){const _errs11 = errors;if(typeof data.typeId !== "string"){validate19.errors = [{instancePath:instancePath+"/typeId",schemaPath:"#/allOf/1/properties/typeId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs11 === errors;}else {var valid3 = true;}if(valid3){if(data.obj !== undefined){const _errs13 = errors;if(!(validate20(data.obj, {instancePath:instancePath+"/obj",parentData:data,parentDataProperty:"obj",rootData}))){vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);errors = vErrors.length;}var valid3 = _errs13 === errors;}else {var valid3 = true;}if(valid3){if(data.id !== undefined){const _errs14 = errors;if(typeof data.id !== "string"){validate19.errors = [{instancePath:instancePath+"/id",schemaPath:"#/allOf/1/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs14 === errors;}else {var valid3 = true;}}}}}}var valid0 = _errs9 === errors;}validate19.errors = vErrors;return errors === 0;}const schema30 = {"description":"A product in the catalog","allOf":[{"$ref":"KeyReference.schema.json"},{"patternProperties":{},"additionalProperties":false,"properties":{"typeId":{"type":"string"},"key":{"type":"string"}},"required":["typeId","key"]}],"$schema":"http://json-schema.org/draft-07/schema#","title":"TODO","type":"object","$id":"https://example.com/StoreKeyReference.schema.json"};const schema31 = {"patternProperties":{},"$schema":"http://json-schema.org/draft-07/schema#","description":"A product in the catalog","additionalProperties":false,"title":"TODO","type":"object","properties":{"typeId":{"type":"string"},"key":{"type":"string"}},"required":["typeId","key"],"$id":"https://example.com/KeyReference.schema.json"};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/StoreKeyReference.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate25.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.typeId === undefined) && (missing0 = "typeId")) || ((data.key === undefined) && (missing0 = "key"))){validate25.errors = [{instancePath,schemaPath:"KeyReference.schema.json/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs4 = errors;for(const key0 in data){if(!((key0 === "typeId") || (key0 === "key"))){validate25.errors = [{instancePath,schemaPath:"KeyReference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs4 === errors){if(data.typeId !== undefined){const _errs5 = errors;if(typeof data.typeId !== "string"){validate25.errors = [{instancePath:instancePath+"/typeId",schemaPath:"KeyReference.schema.json/properties/typeId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.key !== undefined){const _errs7 = errors;if(typeof data.key !== "string"){validate25.errors = [{instancePath:instancePath+"/key",schemaPath:"KeyReference.schema.json/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}}}}}else {validate25.errors = [{instancePath,schemaPath:"KeyReference.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.typeId === undefined) && (missing1 = "typeId")) || ((data.key === undefined) && (missing1 = "key"))){validate25.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs10 = errors;for(const key1 in data){if(!((key1 === "typeId") || (key1 === "key"))){validate25.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs10 === errors){if(data.typeId !== undefined){const _errs11 = errors;if(typeof data.typeId !== "string"){validate25.errors = [{instancePath:instancePath+"/typeId",schemaPath:"#/allOf/1/properties/typeId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs11 === errors;}else {var valid3 = true;}if(valid3){if(data.key !== undefined){const _errs13 = errors;if(typeof data.key !== "string"){validate25.errors = [{instancePath:instancePath+"/key",schemaPath:"#/allOf/1/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs13 === errors;}else {var valid3 = true;}}}}}var valid0 = _errs9 === errors;}validate25.errors = vErrors;return errors === 0;}function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://example.com/Customer.schema.json" */;let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.id === undefined) && (missing0 = "id")) || ((data.version === undefined) && (missing0 = "version"))) || ((data.createdAt === undefined) && (missing0 = "createdAt"))) || ((data.lastModifiedAt === undefined) && (missing0 = "lastModifiedAt"))){validate18.errors = [{instancePath,schemaPath:"BaseResource.schema.json/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs4 = errors;for(const key0 in data){if(!((((key0 === "createdAt") || (key0 === "id")) || (key0 === "lastModifiedAt")) || (key0 === "version"))){validate18.errors = [{instancePath,schemaPath:"BaseResource.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs4 === errors){if(data.createdAt !== undefined){let data0 = data.createdAt;const _errs5 = errors;if(errors === _errs5){if(errors === _errs5){if(typeof data0 === "string"){if(!(formats0.validate(data0))){validate18.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"BaseResource.schema.json/properties/createdAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate18.errors = [{instancePath:instancePath+"/createdAt",schemaPath:"BaseResource.schema.json/properties/createdAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.id !== undefined){const _errs7 = errors;if(typeof data.id !== "string"){validate18.errors = [{instancePath:instancePath+"/id",schemaPath:"BaseResource.schema.json/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.lastModifiedAt !== undefined){let data2 = data.lastModifiedAt;const _errs9 = errors;if(errors === _errs9){if(errors === _errs9){if(typeof data2 === "string"){if(!(formats0.validate(data2))){validate18.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"BaseResource.schema.json/properties/lastModifiedAt/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate18.errors = [{instancePath:instancePath+"/lastModifiedAt",schemaPath:"BaseResource.schema.json/properties/lastModifiedAt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs9 === errors;}else {var valid2 = true;}if(valid2){if(data.version !== undefined){let data3 = data.version;const _errs11 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate18.errors = [{instancePath:instancePath+"/version",schemaPath:"BaseResource.schema.json/properties/version/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid2 = _errs11 === errors;}else {var valid2 = true;}}}}}}}else {validate18.errors = [{instancePath,schemaPath:"BaseResource.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((((((((data.id === undefined) && (missing1 = "id")) || ((data.version === undefined) && (missing1 = "version"))) || ((data.createdAt === undefined) && (missing1 = "createdAt"))) || ((data.lastModifiedAt === undefined) && (missing1 = "lastModifiedAt"))) || ((data.email === undefined) && (missing1 = "email"))) || ((data.password === undefined) && (missing1 = "password"))) || ((data.addresses === undefined) && (missing1 = "addresses"))) || ((data.isEmailVerified === undefined) && (missing1 = "isEmailVerified"))){validate18.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs14 = errors;for(const key1 in data){if(!(func4.call(schema23.allOf[1].properties, key1))){validate18.errors = [{instancePath,schemaPath:"#/allOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs14 === errors){if(data.lastName !== undefined){const _errs15 = errors;if(typeof data.lastName !== "string"){validate18.errors = [{instancePath:instancePath+"/lastName",schemaPath:"#/allOf/1/properties/lastName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data.addresses !== undefined){let data5 = data.addresses;const _errs17 = errors;if(errors === _errs17){if(Array.isArray(data5)){var valid4 = true;const len0 = data5.length;for(let i0=0; i0 items1 ? items0 : items1;}}else if(tag0 === "quote-request"){if(!(validate426(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate426.errors : vErrors.concat(validate426.errors);errors = vErrors.length;}}else if(tag0 === "quote"){if(!(validate418(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate418.errors : vErrors.concat(validate418.errors);errors = vErrors.length;}}else if(tag0 === "review"){if(!(validate1010(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate1010.errors : vErrors.concat(validate1010.errors);errors = vErrors.length;}}else if(tag0 === "shipping-method"){if(!(validate176(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate176.errors : vErrors.concat(validate176.errors);errors = vErrors.length;}}else if(tag0 === "shopping-list"){if(!(validate1012(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate1012.errors : vErrors.concat(validate1012.errors);errors = vErrors.length;}}else if(tag0 === "staged-quote"){if(!(validate421(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate421.errors : vErrors.concat(validate421.errors);errors = vErrors.length;}}else if(tag0 === "standalone-price"){if(!(validate348(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate348.errors : vErrors.concat(validate348.errors);errors = vErrors.length;}}else if(tag0 === "state"){if(!(validate230(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate230.errors : vErrors.concat(validate230.errors);errors = vErrors.length;}}else if(tag0 === "store"){if(!(validate1026(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate1026.errors : vErrors.concat(validate1026.errors);errors = vErrors.length;}}else if(tag0 === "tax-category"){if(!(validate180(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate180.errors : vErrors.concat(validate180.errors);errors = vErrors.length;}}else if(tag0 === "type"){if(!(validate24(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}}else if(tag0 === "zone"){if(!(validate188(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate188.errors : vErrors.concat(validate188.errors);errors = vErrors.length;}}else {validate101.errors = [{instancePath,schemaPath:"#/discriminator",keyword:"discriminator",params:{error: "mapping", tag: "typeId", tagValue: tag0},message:"value of tag \"typeId\" must be in oneOf"}];return false;}}else {validate101.errors = [{instancePath,schemaPath:"#/discriminator",keyword:"discriminator",params:{error: "tag", tag: "typeId", tagValue: tag0},message:"tag \"typeId\" must be string"}];return false;}}}}}}else {validate101.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate101.errors = vErrors;evaluated0.items = items0;return errors === 0;}validate101.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":true};const schema777 = {"oneOf":[{"$ref":"https://api.commercetools.com/ProductDiscountValueAbsolute.schema.json"},{"$ref":"https://api.commercetools.com/ProductDiscountValueExternal.schema.json"},{"$ref":"https://api.commercetools.com/ProductDiscountValueRelative.schema.json"}],"$schema":"https://json-schema.org/draft/2020-12/schema#","additionalProperties":false,"title":"ProductDiscountValue","type":"object","properties":{"type":{"enum":["absolute","external","relative"]}},"required":["type"],"$id":"https://api.commercetools.com/ProductDiscountValue.schema.json","discriminator":{"propertyName":"type"}};const schema780 = {"$schema":"https://json-schema.org/draft/2020-12/schema#","description":"Discounts the Product Price by allowing the client to explicitly [set a discounted value](/../api/projects/products#set-discounted-embedded-price).\nUsed when setting discounts using an external service.","additionalProperties":false,"title":"ProductDiscountValueExternal","type":"object","properties":{"type":{"enum":["external"]}},"required":["type"],"$id":"https://api.commercetools.com/ProductDiscountValueExternal.schema.json"};const schema781 = {"$schema":"https://json-schema.org/draft/2020-12/schema#","description":"Discounts the product price by a percentage, defined by the `permyriad` field.","additionalProperties":false,"title":"ProductDiscountValueRelative","type":"object","properties":{"type":{"enum":["relative"]},"permyriad":{"type":"number"}},"required":["type","permyriad"],"$id":"https://api.commercetools.com/ProductDiscountValueRelative.schema.json"};const schema778 = {"$schema":"https://json-schema.org/draft/2020-12/schema#","description":"Discounts the Product's Price by a fixed amount, defined by the `money` field.","additionalProperties":false,"title":"ProductDiscountValueAbsolute","type":"object","properties":{"type":{"enum":["absolute"]},"money":{"type":"array","items":{"$ref":"CentPrecisionMoney.schema.json"}}},"required":["type","money"],"$id":"https://api.commercetools.com/ProductDiscountValueAbsolute.schema.json"};function validate1065(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://api.commercetools.com/ProductDiscountValueAbsolute.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate1065.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.type === undefined) && (missing0 = "type")) || ((data.money === undefined) && (missing0 = "money"))){validate1065.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((key0 === "type") || (key0 === "money"))){validate1065.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.type !== undefined){const _errs2 = errors;if(!(data.type === "absolute")){validate1065.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema778.properties.type.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.money !== undefined){let data1 = data.money;const _errs3 = errors;if(errors === _errs3){if(Array.isArray(data1)){var valid1 = true;const len0 = data1.length;for(let i0=0; i0