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 2b41fd8bfca6..fb931cd56610 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -205,7 +205,7 @@ - name: Google Workspace Admin Reports sourceDefinitionId: ed9dfefa-1bbc-419d-8c5e-4d78f0ef6734 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 - name: Greenhouse 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..5532aa10052a --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml @@ -0,0 +1,24 @@ +# 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" + empty_streams: ["admin"] + 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..a478506a2278 --- /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" + } +} 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..5fd72751bcb1 --- /dev/null +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json @@ -0,0 +1,64 @@ +{ + "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" + }, + { + "stream": { + "name": "drive", + "json_schema": {}, + "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": {}, + "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": {}, + "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": {}, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["time"] + }, + "sync_mode": "incremental", + "cursor_field": ["time"], + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file 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..7f5d8c564e69 --- /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 +} 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 deleted file mode 100644 index 224cfbbdbcb7..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/sample_state.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "drive": { - "time": "2021-04-04T22:01:22.313Z" - }, - "oauth_tokens": { - "time": "2021-04-05T03:06:30.849Z" - } -} 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..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 @@ -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" @@ -49,19 +47,20 @@ }, "events": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -70,22 +69,53 @@ }, "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" + } } - }, - "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..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 @@ -20,72 +20,41 @@ "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"] - }, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -95,8 +64,7 @@ "value": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -104,11 +72,10 @@ "name": { "type": "string" }, - "value": { + "intValue": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -116,11 +83,10 @@ "name": { "type": "string" }, - "value": { - "type": "string" + "boolValue": { + "type": "boolean" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -128,18 +94,22 @@ "name": { "type": "string" }, - "value": { - "type": "string" + "multiValue": { + "type": "array", + "items": { + "type": "string" + } } - }, - "required": ["name", "value"] + } } ] } - }, - "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..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 @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -36,26 +41,29 @@ "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": [ + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -65,8 +73,7 @@ "value": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -74,16 +81,10 @@ "name": { "type": "string" }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] + "intValue": { + "type": "string" } - }, - "required": ["name", "multiValue"] + } }, { "type": "object", @@ -94,15 +95,30 @@ "boolValue": { "type": "boolean" } - }, - "required": ["name", "boolValue"] + } + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } + } + } } ] } - }, - "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..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 @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -39,83 +44,28 @@ "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"] - }, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -125,8 +75,7 @@ "value": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -134,11 +83,10 @@ "name": { "type": "string" }, - "value": { + "intValue": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -146,11 +94,10 @@ "name": { "type": "string" }, - "intValue": { - "type": "string" + "boolValue": { + "type": "boolean" } - }, - "required": ["name", "intValue"] + } }, { "type": "object", @@ -158,18 +105,22 @@ "name": { "type": "string" }, - "value": { - "type": "string" + "multiValue": { + "type": "array", + "items": { + "type": "string" + } } - }, - "required": ["name", "value"] + } } ] } - }, - "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..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 @@ -21,7 +21,12 @@ "type": "string" } }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] + "required": [ + "time", + "uniqueQualifier", + "applicationName", + "customerId" + ] }, "etag": { "type": "string" @@ -36,23 +41,27 @@ "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": [ + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -62,8 +71,7 @@ "value": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -71,11 +79,10 @@ "name": { "type": "string" }, - "value": { + "intValue": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -83,11 +90,24 @@ "name": { "type": "string" }, - "value": { + "boolValue": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "name": { "type": "string" + }, + "multiValue": { + "type": "array", + "items": { + "type": "string" + } } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -97,13 +117,14 @@ }, "multiMessageValue": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ + "items": { + "type": "object", + "properties": { + "parameter": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ { "type": "object", "properties": { @@ -113,8 +134,7 @@ "value": { "type": "string" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -122,39 +142,21 @@ "name": { "type": "string" }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] + "intValue": { + "type": "string" } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - }, - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ + } + }, { "type": "object", "properties": { "name": { "type": "string" }, - "value": { - "type": "string" + "boolValue": { + "type": "boolean" } - }, - "required": ["name", "value"] + } }, { "type": "object", @@ -164,51 +166,28 @@ }, "multiValue": { "type": "array", - "items": [ - { - "type": "string" - } - ] + "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"] + } } - ] + } + }, + "time": { + "type": "string" } } } diff --git a/docs/integrations/sources/google-workspace-admin-reports.md b/docs/integrations/sources/google-workspace-admin-reports.md index 06bdafd0133e..50e339267d2e 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) | Improve testing & output schemas |