From 324fc881d45824b358f8ba8b00b17d7bd35a1512 Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Mon, 3 Dec 2018 13:17:41 -0500 Subject: [PATCH] Schema Fixes (#17) * set order_refunds created_at to a date-time * make order_adjustments available and add to order_refunds --- tap_shopify/schemas/definitions.json | 56 +++++++++++++++++++++++ tap_shopify/schemas/order_refunds.json | 6 ++- tap_shopify/schemas/orders.json | 62 +------------------------- 3 files changed, 63 insertions(+), 61 deletions(-) diff --git a/tap_shopify/schemas/definitions.json b/tap_shopify/schemas/definitions.json index 4253229f..902ad536 100644 --- a/tap_shopify/schemas/definitions.json +++ b/tap_shopify/schemas/definitions.json @@ -1,4 +1,60 @@ { + "order_adjustments": { + "items": { + "properties": { + "order_id": { + "type": [ + "null", + "integer" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "refund_id": { + "type": [ + "null", + "integer" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "integer" + ] + }, + "reason": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": [ + "null", + "array" + ] + }, "customer": { "type": "object", "properties": { diff --git a/tap_shopify/schemas/order_refunds.json b/tap_shopify/schemas/order_refunds.json index 5fdd263f..d05a153d 100644 --- a/tap_shopify/schemas/order_refunds.json +++ b/tap_shopify/schemas/order_refunds.json @@ -13,6 +13,9 @@ "boolean" ] }, + "order_adjustments": { + "$ref": "definitions.json#/order_adjustments" + }, "processed_at": { "type": [ "null", @@ -38,7 +41,8 @@ ] }, "created_at": { - "type": "string" + "type": ["null", "string"], + "format": "date-time" }, "admin_graphql_api_id": { "type": [ diff --git a/tap_shopify/schemas/orders.json b/tap_shopify/schemas/orders.json index 6bcb149a..2c588f23 100644 --- a/tap_shopify/schemas/orders.json +++ b/tap_shopify/schemas/orders.json @@ -1,62 +1,4 @@ { - "definitions": { - "order_adjustments": { - "items": { - "properties": { - "order_id": { - "type": [ - "null", - "integer" - ] - }, - "tax_amount": { - "type": [ - "null", - "number" - ] - }, - "refund_id": { - "type": [ - "null", - "integer" - ] - }, - "amount": { - "type": [ - "null", - "number" - ] - }, - "kind": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": [ - "null", - "integer" - ] - }, - "reason": { - "type": [ - "null", - "string" - ] - } - }, - "type": [ - "null", - "object" - ] - }, - "type": [ - "null", - "array" - ] - } - }, "properties": { "presentment_currency": { "type": [ @@ -110,7 +52,7 @@ ] }, "order_adjustments": { - "$ref": "#/definitions/order_adjustments" + "$ref": "definitions.json#/order_adjustments" }, "shipping_lines": { "items": { @@ -1127,7 +1069,7 @@ "format": "date-time" }, "order_adjustments": { - "$ref": "#/definitions/order_adjustments" + "$ref": "definitions.json#/order_adjustments" } }, "type": [