From 3fde40fb2733efe7a2613b05aadaaa13e156169d Mon Sep 17 00:00:00 2001 From: Johnny Graettinger Date: Sat, 2 Mar 2024 03:31:24 +0000 Subject: [PATCH] estuary-cdk: remove `namespace` from common.ResourceConfig We don't need it yet, so let's not have it. --- estuary-cdk/estuary_cdk/capture/common.py | 14 +++++++------- ..._native_tests_test_snapshots__spec__stdout.json | 14 -------------- ..._native_tests_test_snapshots__spec__stdout.json | 14 -------------- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/estuary-cdk/estuary_cdk/capture/common.py b/estuary-cdk/estuary_cdk/capture/common.py index feb84e8ab5..9407087530 100644 --- a/estuary-cdk/estuary_cdk/capture/common.py +++ b/estuary-cdk/estuary_cdk/capture/common.py @@ -81,20 +81,20 @@ def path(self) -> list[str]: class ResourceConfig(BaseResourceConfig): """ResourceConfig is a common resource configuration shape.""" - PATH_POINTERS: ClassVar[list[str]] = ["/schema", "/name"] + PATH_POINTERS: ClassVar[list[str]] = ["/name"] name: str = Field(description="Name of this resource") - namespace: str | None = Field( - default=None, description="Enclosing schema namespace of this resource" - ) interval: timedelta = Field( default=timedelta(), description="Interval between updates for this resource" ) - def path(self) -> list[str]: - if self.namespace: - return [self.namespace, self.name] + # NOTE(johnny): If we need a namespace, introduce an ExtResourceConfig (?) + # which adds a `namespace` field like: + # namespace: str | None = Field( + # default=None, description="Enclosing schema namespace of this resource" + # ) + def path(self) -> list[str]: return [self.name] diff --git a/source-google-sheets-native/tests/snapshots/source_google_sheets_native_tests_test_snapshots__spec__stdout.json b/source-google-sheets-native/tests/snapshots/source_google_sheets_native_tests_test_snapshots__spec__stdout.json index 81b922fb2a..82bfbbb3b6 100644 --- a/source-google-sheets-native/tests/snapshots/source_google_sheets_native_tests_test_snapshots__spec__stdout.json +++ b/source-google-sheets-native/tests/snapshots/source_google_sheets_native_tests_test_snapshots__spec__stdout.json @@ -93,19 +93,6 @@ "title": "Name", "type": "string" }, - "namespace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Enclosing schema namespace of this resource", - "title": "Namespace" - }, "interval": { "default": "PT0S", "description": "Interval between updates for this resource", @@ -134,7 +121,6 @@ } }, "resourcePathPointers": [ - "/schema", "/name" ] } diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json index 1e1a3090b1..831606daa7 100644 --- a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json +++ b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json @@ -86,19 +86,6 @@ "title": "Name", "type": "string" }, - "namespace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Enclosing schema namespace of this resource", - "title": "Namespace" - }, "interval": { "default": "PT0S", "description": "Interval between updates for this resource", @@ -127,7 +114,6 @@ } }, "resourcePathPointers": [ - "/schema", "/name" ] }