Skip to content

Commit

Permalink
in schema, changed fields marked as numbers to singer.decimals (singe…
Browse files Browse the repository at this point in the history
…r-io#86)

* in schema, changed fields marked as numbers to singer.decimals

* added string entry

* added json validator

* modified json validator circle statement
  • Loading branch information
jacobrobertbaca authored Mar 11, 2021
1 parent c7579c5 commit 5445f6f
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 93 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
command: |
source /usr/local/share/virtualenvs/tap-shopify/bin/activate
make test
- run:
name: 'JSON Validator'
command: |
source /usr/local/share/virtualenvs/tap-tester/bin/activate
stitch-validate-json /usr/local/share/virtualenvs/tap-shopify/lib/python3.5/site-packages/tap_shopify/schemas/*.json
- add_ssh_keys
- run:
name: 'Integration Tests'
Expand Down
48 changes: 26 additions & 22 deletions tap_shopify/schemas/abandoned_checkouts.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
"latitude": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
},
"zip": {
"type": [
Expand Down Expand Up @@ -126,8 +127,9 @@
"longitude": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
}
}
},
Expand Down Expand Up @@ -157,9 +159,9 @@
"amount": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"code": {
"type": [
Expand Down Expand Up @@ -220,9 +222,9 @@
"total_line_items_price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"closed_at": {
"type": [
Expand Down Expand Up @@ -264,16 +266,16 @@
"total_tax": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"subtotal_price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"line_items": {
"$ref": "definitions.json#/line_items"
Expand All @@ -287,9 +289,9 @@
"total_discounts": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"note": {
"type": [
Expand Down Expand Up @@ -349,9 +351,9 @@
"price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"requested_fulfillment_service_id": {
"type": [
Expand Down Expand Up @@ -446,8 +448,9 @@
"latitude": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
},
"zip": {
"type": [
Expand Down Expand Up @@ -506,8 +509,9 @@
"longitude": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
}
}
},
Expand All @@ -529,9 +533,9 @@
"total_price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"cart_token": {
"type": [
Expand Down
34 changes: 18 additions & 16 deletions tap_shopify/schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"tax_amount": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"refund_id": {
"type": [
Expand All @@ -24,9 +24,9 @@
"amount": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"kind": {
"type": [
Expand Down Expand Up @@ -593,8 +593,9 @@
"amount": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
}
},
"type": [
Expand All @@ -616,8 +617,9 @@
"pre_tax_price": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
},
"sku": {
"type": [
Expand All @@ -634,9 +636,9 @@
"total_discount": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"name": {
"type": [
Expand Down Expand Up @@ -680,9 +682,9 @@
"price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"requires_shipping": {
"type": [
Expand Down Expand Up @@ -828,9 +830,9 @@
"price": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"title": {
"type": [
Expand All @@ -841,9 +843,9 @@
"rate": {
"type": [
"null",
"number"
"string"
],
"multipleOf": 1e-10
"format": "singer.decimal"
},
"compare_at": {
"type": [
Expand Down
15 changes: 9 additions & 6 deletions tap_shopify/schemas/order_refunds.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@
"total_tax": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
},
"quantity": {
"type": [
Expand Down Expand Up @@ -267,8 +268,9 @@
"rate": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
}
},
"type": [
Expand Down Expand Up @@ -650,8 +652,9 @@
"subtotal": {
"type": [
"null",
"number"
]
"string"
],
"format": "singer.decimal"
},
"restock_type": {
"type": [
Expand Down
Loading

0 comments on commit 5445f6f

Please sign in to comment.