Skip to content

Commit

Permalink
Source Cart: fix schema and allow to use connector on Airbyte Cloud (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmarxm authored Nov 16, 2023
1 parent 8b07903 commit 1cc5e53
Show file tree
Hide file tree
Showing 11 changed files with 158 additions and 34 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-cart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ COPY source_cart ./source_cart
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.1
LABEL io.airbyte.version=0.3.0
LABEL io.airbyte.name=airbyte/source-cart
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-cart:dev
tests:
test_strictness_level: low
acceptance_tests:
spec:
- spec_path: "source_cart/spec.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.6"
tests:
- spec_path: "source_cart/spec.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.6"
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
timeout_seconds: 180
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
timeout_seconds: 180
discovery:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.6"
tests:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.6"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 1800
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 1800
empty_streams:
- name: "order_payments"
bypass_reason: "no data"
- name: "products"
bypass_reason: "no data"
incremental:
- config_path: "secrets/config_central_api_router.json"
configured_catalog_path: "integration_tests/configured_catalog_wo_order_statuses.json"
future_state_path: "integration_tests/abnormal_state.json"
timeout_seconds: 1800
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
timeout_seconds: 1800
tests:
# - config_path: "secrets/config_central_api_router.json"
# configured_catalog_path: "integration_tests/configured_catalog_wo_order_statuses.json"
# future_state_path: "integration_tests/abnormal_state.json"
# timeout_seconds: 1800
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
timeout_seconds: 1800
full_refresh:
- config_path: "secrets/config_central_api_router.json"
configured_catalog_path: "integration_tests/configured_catalog_wo_order_statuses.json"
timeout_seconds: 1800
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 1800
tests:
- config_path: "secrets/config_central_api_router.json"
configured_catalog_path: "integration_tests/configured_catalog_wo_order_statuses.json"
timeout_seconds: 1800
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
timeout_seconds: 1800
4 changes: 2 additions & 2 deletions airbyte-integrations/connectors/source-cart/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ data:
connectorSubtype: api
connectorType: source
definitionId: bb1a6d31-6879-4819-a2bd-3eed299ea8e2
dockerImageTag: 0.2.1
dockerImageTag: 0.3.0
dockerRepository: airbyte/source-cart
githubIssueLabel: source-cart
icon: cart.svg
license: MIT
name: Cart.com
registries:
cloud:
enabled: false
enabled: true
oss:
enabled: true
releaseStage: alpha
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
Expand All @@ -10,6 +12,9 @@
"address_line_1": {
"type": ["string", "null"]
},
"address_type": {
"type": ["string", "null"]
},
"address_line_2": {
"type": ["string", "null"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
},
"customer_number": {
"type": ["string", "null"]
},
"credit_limit": {
"type": ["string", "null"]
},
"payment_net_term": {
"type": ["string", "null"]
},
"last_name": {
"type": ["string", "null"]
},
Expand Down Expand Up @@ -38,7 +46,13 @@
"type": ["integer", "null"]
},
"is_no_tax_customer": {
"type": "boolean"
"type": ["boolean", "null"]
},
"is_inactive": {
"type": ["boolean", "null"]
},
"lock_default_address": {
"type": ["boolean", "null"]
},
"comments": {
"type": ["string", "null"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
Expand Down Expand Up @@ -81,6 +83,69 @@
},
"warehouse_id": {
"type": ["integer", "null"]
},
"configuration": {
"type": ["string", "null"]
},
"description": {
"type": ["string", "null"]
},
"discount_amount": {
"type": ["number", "null"]
},
"discount_percentage": {
"type": ["number", "null"]
},
"fitment": {
"type": ["string", "null"]
},
"is_non_shipping_item": {
"type": ["boolean", "null"]
},
"item_number_full": {
"type": ["string", "null"]
},
"order_shipping_address_id": {
"type": ["string", "null"]
},
"personalizations": {
"type": ["array", "null"]
},
"selected_shipping_method": {
"type": ["string", "null"]
},
"selected_shipping_method_id": {
"type": ["string", "null"]
},
"selected_shipping_provider_service": {
"type": ["string", "null"]
},
"shipping_total": {
"type": ["string", "null"]
},
"status": {
"type": ["string", "null"]
},
"tax": {
"type": ["number", "null"]
},
"tax_code": {
"type": ["string", "null"]
},
"variant_inventory_id": {
"type": ["string", "null"]
},
"shipping_classification_code": {
"type": ["string", "null"]
},
"variants": {
"type": ["array", "null"]
},
"vendor_store_id": {
"type": ["integer", "null"]
},
"weight_unit": {
"type": ["string", "null"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": { "type": "integer" },
"name": { "type": ["null", "string"] },
Expand All @@ -13,6 +15,7 @@
"created_at": { "type": ["null", "string"] },
"is_fully_refunded": { "type": ["null", "boolean"] },
"is_partially_refunded": { "type": ["null", "boolean"] },
"is_quote_status": { "type": ["null", "boolean"] }
"is_quote_status": { "type": ["null", "boolean"] },
"is_partially_shipped": { "type": ["null", "boolean"] }
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
},
"customer_id": {
"type": ["integer", "null"]
},
"delivery_tax": {
"type": ["string", "null"]
},
"entered_by_type": {
"type": ["string", "null"]
},
"shipping_selections": {
"type": ["array", "null"],
"items": {
"type": ["null", "object"],
"additionalProperties": true,
"properties": {}
}
},
"sales_agent_user_id": {
"type": ["string", "null"]
},
"customer_type_id": {
"type": ["integer", "null"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "integer"
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Please follow these [steps](https://developers.cart.com/docs/rest-api/docs/READM

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------- |
| 0.3.0 | 2023-11-14 | [23317](https://github.com/airbytehq/airbyte/pull/23317) | Update schemas |
| 0.2.1 | 2023-02-22 | [23317](https://github.com/airbytehq/airbyte/pull/23317) | Remove support for incremental for `order_statuses` stream |
| 0.2.0 | 2022-09-21 | [16612](https://github.com/airbytehq/airbyte/pull/16612) | Source Cart.com: implement Central API Router access method and improve backoff policy |
| 0.1.6 | 2022-07-15 | [14752](https://github.com/airbytehq/airbyte/pull/14752) | Add `order_statuses` stream |
Expand Down

0 comments on commit 1cc5e53

Please sign in to comment.