From 452b3cd2af4f0ff1677a0f0222ed3084295cd949 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Thu, 7 Oct 2021 19:18:17 +0300 Subject: [PATCH 1/9] Add SAT --- .../ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734.json | 2 +- .../resources/seed/source_definitions.yaml | 2 +- .../Dockerfile | 2 +- .../acceptance-test-config.yml | 25 +++++++++++++++++++ .../acceptance-test-docker.sh | 16 ++++++++++++ .../build.gradle | 11 ++------ .../integration_tests/__init__.py | 0 .../integration_tests/abnormal_state.json | 17 +++++++++++++ .../integration_tests/acceptance.py | 14 +++++++++++ .../integration_tests/configured_catalog.json | 16 ++++++++++++ .../integration_tests/invalid_config.json | 5 ++++ .../requirements.txt | 1 + .../sample_files/sample_state.json | 15 ++++++++--- .../setup.py | 9 ++++++- .../api.py | 5 ++-- .../schemas/admin.json | 17 ++++++------- .../schemas/drive.json | 3 +++ .../schemas/logins.json | 3 +++ .../schemas/mobile.json | 3 +++ .../schemas/oauth_tokens.json | 3 +++ 20 files changed, 142 insertions(+), 27 deletions(-) create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-docker.sh create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json create mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734.json index 047e110a577b..b367cf99551f 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734.json @@ -2,6 +2,6 @@ "sourceDefinitionId": "ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734", "name": "Google Workspace Admin Reports", "dockerRepository": "airbyte/source-google-workspace-admin-reports", - "dockerImageTag": "0.1.4", + "dockerImageTag": "0.1.5", "documentationUrl": "https://docs.airbyte.io/integrations/sources/google-workspace-admin-reports" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index a73ae9aa4316..f3abde7d14b3 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -302,7 +302,7 @@ - sourceDefinitionId: ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734 name: Google Workspace Admin Reports dockerRepository: airbyte/source-google-workspace-admin-reports - dockerImageTag: 0.1.4 + dockerImageTag: 0.1.5 documentationUrl: https://docs.airbyte.io/integrations/sources/google-workspace-admin-reports sourceType: api - sourceDefinitionId: d1aa448b-7c54-498e-ad95-263cbebcd2db diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile b/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile index c2bbc233e452..fd398dd28f97 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile @@ -14,5 +14,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" -LABEL io.airbyte.version=0.1.4 +LABEL io.airbyte.version=0.1.5 LABEL io.airbyte.name=airbyte/source-google-workspace-admin-reports diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml new file mode 100755 index 000000000000..361c0f70b505 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml @@ -0,0 +1,25 @@ +# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) +# for more information about how to configure these tests +connector_image: airbyte/source-google-workspace-admin-reports:dev +tests: + spec: + - spec_path: "source_google_workspace_admin_reports/spec.json" + connection: + - config_path: "secrets/config.json" + status: "succeed" + - config_path: "integration_tests/invalid_config.json" + status: "failed" + discovery: + - config_path: "secrets/config.json" + basic_read: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + validate_schema: False + empty_streams: [] + full_refresh: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + incremental: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + future_state_path: "integration_tests/abnormal_state.json" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-docker.sh new file mode 100755 index 000000000000..7ad3352709bd --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-docker.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +# Build latest connector image +docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2):dev + +# Pull latest acctest image +docker pull airbyte/source-acceptance-test:latest + +# Run +docker run --rm -it \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /tmp:/tmp \ + -v $(pwd):/test_input \ + airbyte/source-acceptance-test \ + --acceptance-test-config /test_input + diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/build.gradle b/airbyte-integrations/connectors/source-google-workspace-admin-reports/build.gradle index 16389247447f..2a16cc8d2cf5 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/build.gradle +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/build.gradle @@ -1,21 +1,14 @@ plugins { id 'airbyte-python' id 'airbyte-docker' - id 'airbyte-standard-source-test-file' + id 'airbyte-source-acceptance-test' } airbytePython { moduleDirectory 'source_google_workspace_admin_reports' } -airbyteStandardSourceTestFile { - specPath = "source_google_workspace_admin_reports/spec.json" - configPath = "secrets/config.json" - configuredCatalogPath = "sample_files/configured_catalog.json" -} - - dependencies { - implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs) + implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs) implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs) } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py new file mode 100755 index 000000000000..e69de29bb2d1 diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json new file mode 100755 index 000000000000..82d6858927c6 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json @@ -0,0 +1,17 @@ +{ + "drive": { + "time": "2121-04-04T22:01:22.313Z" + }, + "oauth_tokens": { + "time": "2121-04-05T03:06:30.849Z" + }, + "admin": { + "time": "2121-04-05T03:06:30.849Z" + }, + "logins": { + "time": "2121-04-05T03:06:30.849Z" + }, + "mobile": { + "time": "2121-04-05T03:06:30.849Z" + } +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py new file mode 100755 index 000000000000..0347f2a0b143 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py @@ -0,0 +1,14 @@ +# +# Copyright (c) 2021 Airbyte, Inc., all rights reserved. +# + + +import pytest + +pytest_plugins = ("source_acceptance_test.plugin",) + + +@pytest.fixture(scope="session", autouse=True) +def connector_setup(): + """This fixture is a placeholder for external resources that acceptance test might require.""" + yield diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json new file mode 100755 index 000000000000..0a6847a28be5 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json @@ -0,0 +1,16 @@ +{ + "streams": [ + { + "stream": { + "name": "admin", + "json_schema": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + } + ] +} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json new file mode 100755 index 000000000000..f07688cdc319 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json @@ -0,0 +1,5 @@ +{ + "credentials_json": "{\n \"type\": \"service_account\"}\n", + "email": "test_email", + "lookback": 0 +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt b/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt index dd447512e620..e74f41a28ce1 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt @@ -1,4 +1,5 @@ # This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. -e ../../bases/airbyte-protocol -e ../../bases/base-python +-e ../../bases/source-acceptance-test -e . diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json index 224cfbbdbcb7..82d6858927c6 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json @@ -1,8 +1,17 @@ { "drive": { - "time": "2021-04-04T22:01:22.313Z" + "time": "2121-04-04T22:01:22.313Z" }, "oauth_tokens": { - "time": "2021-04-05T03:06:30.849Z" + "time": "2121-04-05T03:06:30.849Z" + }, + "admin": { + "time": "2121-04-05T03:06:30.849Z" + }, + "logins": { + "time": "2121-04-05T03:06:30.849Z" + }, + "mobile": { + "time": "2121-04-05T03:06:30.849Z" } -} +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py index 3ab286954a47..5680cc11c38e 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py @@ -5,6 +5,11 @@ from setuptools import find_packages, setup +TEST_REQUIREMENTS = [ + "pytest~=6.1", + "source-acceptance-test", +] + setup( name="source_google_workspace_admin_reports", description="Source implementation for Google Workspace Admin Reports.", @@ -14,7 +19,6 @@ install_requires=[ "airbyte-protocol", "base-python", - "pytest==6.1.2", "google-api-python-client==2.0.2", "google-auth-httplib2==0.1.0", "google-auth-oauthlib==0.4.3", @@ -22,4 +26,7 @@ "pendulum==2.1.2", ], package_data={"": ["*.json", "schemas/*.json"]}, + extras_require={ + "tests": TEST_REQUIREMENTS, + }, ) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py index f4680f1efb66..1bf61a4e3cdf 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py @@ -108,13 +108,13 @@ class IncrementalStreamAPI(StreamAPI, ABC): def state(self) -> Optional[Mapping[str, Any]]: """Current state, if wasn't set return None""" if self._state: - return {self.state_pk: str(self._state)} + return {self.state_pk: self._state.isoformat()} return None @state.setter def state(self, value): self._state = pendulum.parse(value[self.state_pk]) - self._start_time = self._state.isoformat() + self._start_time = self._state.to_iso8601_string() def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -128,6 +128,7 @@ def read(self, getter: Callable, params: Mapping[str, Any] = None) -> Iterator: "Report API return records from newest to oldest" if not cursor: cursor = pendulum.parse(record[self.state_pk]) + record[self.state_pk] = pendulum.parse(record[self.state_pk]).isoformat() yield record if cursor: diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json index da82d64dc67e..b6cbf0754844 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json @@ -20,8 +20,7 @@ "customerId": { "type": "string" } - }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + } }, "actor": { "type": "object", @@ -38,8 +37,7 @@ "key": { "type": "string" } - }, - "required": ["callerType", "email", "profileId", "key"] + } }, "ownerDomain": { "type": "string" @@ -48,7 +46,7 @@ "type": "string" }, "events": { - "type": "array", + "type": "object", "items": [ { "type": "object", @@ -77,15 +75,16 @@ "boolValue": { "type": "string" } - }, - "required": ["name", "value", "intValue", "boolValue"] + } } ] } - }, - "required": ["type", "name", "parameters"] + } } ] + }, + "time": { + "type": "string" } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json index 94a82f40b868..00cec91c5f16 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json @@ -140,6 +140,9 @@ "required": ["type", "name", "parameters"] } ] + }, + "time": { + "type": "string" } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json index e17ded2b00da..992bab8bfc33 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json @@ -103,6 +103,9 @@ "required": ["type", "name", "parameters"] } ] + }, + "time": { + "type": "string" } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json index 3a272a7e853e..a1e732f44c0e 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json @@ -170,6 +170,9 @@ "required": ["type", "name", "parameters"] } ] + }, + "time": { + "type": "string" } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json index 392b864a8517..d30dc27a0d5b 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json @@ -209,6 +209,9 @@ "required": ["name", "parameters"] } ] + }, + "time": { + "type": "string" } } } From 1b62e8fa3e0c7201290e2d0778a57cedb3936e0f Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Thu, 7 Oct 2021 19:22:28 +0300 Subject: [PATCH 2/9] Upd changelog --- docs/integrations/sources/google-workspace-admin-reports.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/integrations/sources/google-workspace-admin-reports.md b/docs/integrations/sources/google-workspace-admin-reports.md index 06bdafd0133e..b9558136630e 100644 --- a/docs/integrations/sources/google-workspace-admin-reports.md +++ b/docs/integrations/sources/google-workspace-admin-reports.md @@ -54,3 +54,8 @@ At the end of this process, you should have JSON credentials to this Google Serv You should now be ready to use the Google Workspace Admin Reports API connector in Airbyte. +## Changelog + +| Version | Date | Pull Request | Subject | +| :------ | :-------- | :----- | :------ | +| 0.1.5 | 2021-10-07 | [6878](https://github.com/airbytehq/airbyte/pull/6878) | Implement SAT | From 6846a5817fda9f489eb0ae5a1271e6b71b43336c Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Thu, 14 Oct 2021 16:10:58 +0300 Subject: [PATCH 3/9] Refactor --- .../acceptance-test-config.yml | 2 +- .../integration_tests/abnormal_state.json | 2 +- .../integration_tests/configured_catalog.json | 803 +++++++++++++++++- .../integration_tests/invalid_config.json | 2 +- .../sample_files/sample_state.json | 2 +- .../schemas/admin.json | 2 +- .../sources/google-workspace-admin-reports.md | 2 +- 7 files changed, 808 insertions(+), 7 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml index 361c0f70b505..3467d799aa7c 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml @@ -15,7 +15,7 @@ tests: - config_path: "secrets/config.json" configured_catalog_path: "integration_tests/configured_catalog.json" validate_schema: False - empty_streams: [] + empty_streams: ["admin"] full_refresh: - config_path: "secrets/config.json" configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json index 82d6858927c6..a478506a2278 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json @@ -14,4 +14,4 @@ "mobile": { "time": "2121-04-05T03:06:30.849Z" } -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json index 0a6847a28be5..574e8435b575 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json @@ -3,7 +3,808 @@ { "stream": { "name": "admin", - "json_schema": {}, + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "id": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "uniqueQualifier": { + "type": "string" + }, + "applicationName": { + "type": "string" + }, + "customerId": { + "type": "string" + } + }, + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] + }, + "actor": { + "type": "object", + "properties": { + "callerType": { + "type": "string" + }, + "email": { + "type": "string" + }, + "profileId": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "required": ["callerType", "email", "profileId", "key"] + }, + "ownerDomain": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "events": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "intValue": { + "type": "string" + }, + "boolValue": { + "type": "string" + } + }, + "required": ["name", "value", "intValue", "boolValue"] + } + ] + } + }, + "required": ["type", "name", "parameters"] + } + ] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "drive", + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "id": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "uniqQualifier": { + "type": "string" + }, + "applicationName": { + "type": "string" + }, + "customerId": { + "type": "string" + } + }, + "required": [ + "time", + "uniqQualifier", + "applicationName", + "customerId" + ] + }, + "actor": { + "type": "object", + "properties": { + "callerType": { + "type": "string" + }, + "email": { + "type": "string" + }, + "profileId": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "required": ["callerType", "email", "profileId", "key"] + }, + "ownerDomain": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "events": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + }, + "required": ["name", "boolValue"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + }, + "required": ["name", "boolValue"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + } + ] + } + }, + "required": ["type", "name", "parameters"] + } + ] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "logins", + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "id": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "uniqueQualifier": { + "type": "string" + }, + "applicationName": { + "type": "string" + }, + "customerId": { + "type": "string" + } + }, + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] + }, + "etag": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "profileId": { + "type": "string" + } + }, + "required": ["email", "profileId"] + }, + "ipAddress": { + "type": "string" + }, + "events": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + } + }, + "required": ["name", "multiValue"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + }, + "required": ["name", "boolValue"] + } + ] + } + }, + "required": ["type", "name", "parameters"] + } + ] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "mobile", + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "id": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "uniqueQualifier": { + "type": "string" + }, + "applicationName": { + "type": "string" + }, + "customerId": { + "type": "string" + } + }, + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] + }, + "etag": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "callerType": { + "type": "string" + }, + "email": { + "type": "string" + }, + "profileId": { + "type": "string" + } + }, + "required": ["callerType", "email", "profileId"] + }, + "events": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + }, + "required": ["name", "intValue"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + } + ] + } + }, + "required": ["type", "name", "parameters"] + } + ] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "oauth_tokens", + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "id": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "uniqueQualifier": { + "type": "string" + }, + "applicationName": { + "type": "string" + }, + "customerId": { + "type": "string" + } + }, + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] + }, + "etag": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "profileId": { + "type": "string" + } + }, + "required": ["email", "profileId"] + }, + "ipAddress": { + "type": "string" + }, + "events": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiMessageValue": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "parameter": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + } + }, + "required": ["name", "multiValue"] + } + ] + } + }, + "required": ["parameter"] + }, + { + "type": "object", + "properties": { + "parameter": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + } + }, + "required": ["name", "multiValue"] + } + ] + } + }, + "required": ["parameter"] + } + ] + } + }, + "required": ["name", "multiMessageValue"] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ] + } + }, + "required": ["name", "multiValue"] + } + ] + } + }, + "required": ["name", "parameters"] + } + ] + } + } + }, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json index f07688cdc319..7f5d8c564e69 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json @@ -2,4 +2,4 @@ "credentials_json": "{\n \"type\": \"service_account\"}\n", "email": "test_email", "lookback": 0 -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json index 82d6858927c6..a478506a2278 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json @@ -14,4 +14,4 @@ "mobile": { "time": "2121-04-05T03:06:30.849Z" } -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json index b6cbf0754844..9744e3f1ca92 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json @@ -46,7 +46,7 @@ "type": "string" }, "events": { - "type": "object", + "type": "array", "items": [ { "type": "object", diff --git a/docs/integrations/sources/google-workspace-admin-reports.md b/docs/integrations/sources/google-workspace-admin-reports.md index b9558136630e..0b0e32d9836a 100644 --- a/docs/integrations/sources/google-workspace-admin-reports.md +++ b/docs/integrations/sources/google-workspace-admin-reports.md @@ -58,4 +58,4 @@ You should now be ready to use the Google Workspace Admin Reports API connector | Version | Date | Pull Request | Subject | | :------ | :-------- | :----- | :------ | -| 0.1.5 | 2021-10-07 | [6878](https://github.com/airbytehq/airbyte/pull/6878) | Implement SAT | +| 0.1.5 | 2021-10-07 | [6878](https://github.com/airbytehq/airbyte/pull/6878) | Integrate SAT | From 04fdd819d33cac895919ce9b81e246dd04473cd2 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Thu, 14 Oct 2021 17:03:02 +0300 Subject: [PATCH 4/9] Upd acceptance-test-config: validate basic_read schema --- .../acceptance-test-config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml index 3467d799aa7c..5532aa10052a 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml @@ -14,7 +14,6 @@ tests: basic_read: - config_path: "secrets/config.json" configured_catalog_path: "integration_tests/configured_catalog.json" - validate_schema: False empty_streams: ["admin"] full_refresh: - config_path: "secrets/config.json" From e16c433fd824e832ba0e688228ee9d92f1452943 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Tue, 19 Oct 2021 16:30:52 +0300 Subject: [PATCH 5/9] Upd schemas: replace dynamic fields with object type --- .../schemas/admin.json | 38 +--- .../schemas/drive.json | 112 +---------- .../schemas/logins.json | 74 ++----- .../schemas/mobile.json | 143 ++------------ .../schemas/oauth_tokens.json | 181 ++---------------- 5 files changed, 50 insertions(+), 498 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json index 9744e3f1ca92..8f273ccaa74e 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json @@ -47,41 +47,9 @@ }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "intValue": { - "type": "string" - }, - "boolValue": { - "type": "string" - } - } - } - ] - } - } - } - ] + "items": { + "type": "object" + } }, "time": { "type": "string" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json index 00cec91c5f16..18a8cfe3becd 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json @@ -20,126 +20,30 @@ "customerId": { "type": "string" } - }, - "required": ["time", "uniqQualifier", "applicationName", "customerId"] + } + }, + "etag": { + "type": ["string"] }, "actor": { "type": "object", "properties": { - "callerType": { - "type": "string" - }, "email": { "type": "string" }, "profileId": { "type": "string" - }, - "key": { - "type": "string" } - }, - "required": ["callerType", "email", "profileId", "key"] - }, - "ownerDomain": { - "type": "string" + } }, "ipAddress": { "type": "string" }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] + "items": { + "type": "object" + } }, "time": { "type": "string" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json index 992bab8bfc33..0ae4ed1c2edc 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -36,73 +41,18 @@ "type": "string" } }, - "required": ["email", "profileId"] + "required": [ + "email" + ] }, "ipAddress": { "type": "string" }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] + "items": { + "type": "object" + } }, "time": { "type": "string" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json index a1e732f44c0e..436517d5a5d8 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -39,137 +44,17 @@ "type": "string" } }, - "required": ["callerType", "email", "profileId"] + "required": [ + "callerType", + "email", + "profileId" + ] }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - }, - "required": ["name", "intValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] + "items": { + "type": "object" + } }, "time": { "type": "string" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json index d30dc27a0d5b..b7508705fa9c 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -36,179 +41,19 @@ "type": "string" } }, - "required": ["email", "profileId"] + "required": [ + "email", + "profileId" + ] }, "ipAddress": { "type": "string" }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiMessageValue": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - }, - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - } - ] - } - }, - "required": ["name", "multiMessageValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["name", "parameters"] - } - ] + "items": { + "type": "object" + } }, "time": { "type": "string" From 3cff46f41a9deec96e4b0b6fd36a968d8c3c92b5 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Fri, 22 Oct 2021 15:58:52 +0300 Subject: [PATCH 6/9] Updates after review --- .../integration_tests/configured_catalog.json | 765 +----------------- .../sample_files/sample_state.json | 17 - 2 files changed, 6 insertions(+), 776 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json index 574e8435b575..5fd72751bcb1 100755 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json @@ -3,102 +3,7 @@ { "stream": { "name": "admin", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId", "key"] - }, - "ownerDomain": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "intValue": { - "type": "string" - }, - "boolValue": { - "type": "string" - } - }, - "required": ["name", "value", "intValue", "boolValue"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, + "json_schema": {}, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] @@ -110,156 +15,7 @@ { "stream": { "name": "drive", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqQualifier", - "applicationName", - "customerId" - ] - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId", "key"] - }, - "ownerDomain": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, + "json_schema": {}, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] @@ -271,119 +27,7 @@ { "stream": { "name": "logins", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email", "profileId"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, + "json_schema": {}, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] @@ -395,186 +39,7 @@ { "stream": { "name": "mobile", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId"] - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - }, - "required": ["name", "intValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, + "json_schema": {}, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] @@ -586,225 +51,7 @@ { "stream": { "name": "oauth_tokens", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email", "profileId"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiMessageValue": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - }, - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - } - ] - } - }, - "required": ["name", "multiMessageValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["name", "parameters"] - } - ] - } - } - }, + "json_schema": {}, "supported_sync_modes": ["incremental"], "source_defined_cursor": true, "default_cursor_field": ["time"] @@ -814,4 +61,4 @@ "destination_sync_mode": "append" } ] -} +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json deleted file mode 100644 index a478506a2278..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "drive": { - "time": "2121-04-04T22:01:22.313Z" - }, - "oauth_tokens": { - "time": "2121-04-05T03:06:30.849Z" - }, - "admin": { - "time": "2121-04-05T03:06:30.849Z" - }, - "logins": { - "time": "2121-04-05T03:06:30.849Z" - }, - "mobile": { - "time": "2121-04-05T03:06:30.849Z" - } -} From 801a3170dfd22d8ad2991ef9c9f23822377fd7f1 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Thu, 28 Oct 2021 17:35:17 +0300 Subject: [PATCH 7/9] Upd schemas --- .../schemas/admin.json | 16 +++++++++++++++- .../schemas/drive.json | 16 +++++++++++++++- .../schemas/logins.json | 16 +++++++++++++++- .../schemas/mobile.json | 16 +++++++++++++++- .../schemas/oauth_tokens.json | 13 ++++++++++++- 5 files changed, 72 insertions(+), 5 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json index 8f273ccaa74e..f17976ef92bc 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json @@ -48,7 +48,21 @@ "events": { "type": "array", "items": { - "type": "object" + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object" + } + } + } } }, "time": { diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json index 18a8cfe3becd..e287950bddf8 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json @@ -42,7 +42,21 @@ "events": { "type": "array", "items": { - "type": "object" + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object" + } + } + } } }, "time": { diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json index 0ae4ed1c2edc..63bbc4aaad48 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json @@ -51,7 +51,21 @@ "events": { "type": "array", "items": { - "type": "object" + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object" + } + } + } } }, "time": { diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json index 436517d5a5d8..b3bfa41e1fc5 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json @@ -53,7 +53,21 @@ "events": { "type": "array", "items": { - "type": "object" + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object" + } + } + } } }, "time": { diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json index b7508705fa9c..9076ed992f8a 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json @@ -52,7 +52,18 @@ "events": { "type": "array", "items": { - "type": "object" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object" + } + } + } } }, "time": { From 14602bfcb59359ccf3897daa2740137fe0b53f3d Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Fri, 29 Oct 2021 13:56:45 +0300 Subject: [PATCH 8/9] Upd schema --- .../schemas/admin.json | 51 +++++++- .../schemas/drive.json | 51 +++++++- .../schemas/logins.json | 51 +++++++- .../schemas/mobile.json | 51 +++++++- .../schemas/oauth_tokens.json | 122 +++++++++++++++++- 5 files changed, 321 insertions(+), 5 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json index f17976ef92bc..06589fde0fdb 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json @@ -59,7 +59,56 @@ "parameters": { "type": "array", "items": { - "type": "object" + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json index e287950bddf8..80595ba3b7b0 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json @@ -53,7 +53,56 @@ "parameters": { "type": "array", "items": { - "type": "object" + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json index 63bbc4aaad48..e83a23928aa4 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json @@ -62,7 +62,56 @@ "parameters": { "type": "array", "items": { - "type": "object" + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json index b3bfa41e1fc5..6d9a50a4b78d 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json @@ -64,7 +64,56 @@ "parameters": { "type": "array", "items": { - "type": "object" + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] } } } diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json index 9076ed992f8a..b9296988c3af 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json @@ -60,7 +60,127 @@ "parameters": { "type": "array", "items": { - "type": "object" + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiMessageValue": { + "type": "array", + "items": { + "type": "object", + "properties": { + "parameter": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "intValue": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + } + } + } + } + } + } + } + ] } } } From 7c1937909d7756460fefa1570ed6020a748de7c3 Mon Sep 17 00:00:00 2001 From: Arthur Galuza Date: Sun, 31 Oct 2021 13:14:43 +0300 Subject: [PATCH 9/9] Update docs/integrations/sources/google-workspace-admin-reports.md Co-authored-by: Sherif A. Nada --- docs/integrations/sources/google-workspace-admin-reports.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/sources/google-workspace-admin-reports.md b/docs/integrations/sources/google-workspace-admin-reports.md index 0b0e32d9836a..50e339267d2e 100644 --- a/docs/integrations/sources/google-workspace-admin-reports.md +++ b/docs/integrations/sources/google-workspace-admin-reports.md @@ -58,4 +58,4 @@ You should now be ready to use the Google Workspace Admin Reports API connector | Version | Date | Pull Request | Subject | | :------ | :-------- | :----- | :------ | -| 0.1.5 | 2021-10-07 | [6878](https://github.com/airbytehq/airbyte/pull/6878) | Integrate SAT | +| 0.1.5 | 2021-10-07 | [6878](https://github.com/airbytehq/airbyte/pull/6878) | Improve testing & output schemas |