Skip to content

Commit

Permalink
estuary-cdk: remove namespace from common.ResourceConfig
Browse files Browse the repository at this point in the history
We don't need it yet, so let's not have it.
  • Loading branch information
jgraettinger committed Mar 4, 2024
1 parent e8e7b6b commit fca51f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
14 changes: 7 additions & 7 deletions estuary-cdk/estuary_cdk/capture/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -134,7 +121,6 @@
}
},
"resourcePathPointers": [
"/schema",
"/name"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -127,7 +114,6 @@
}
},
"resourcePathPointers": [
"/schema",
"/name"
]
}
Expand Down

0 comments on commit fca51f0

Please sign in to comment.