Skip to content

Commit

Permalink
missed some optional[]s
Browse files Browse the repository at this point in the history
  • Loading branch information
joellabes committed Aug 14, 2024
1 parent 1b5e961 commit d64c11a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 126 deletions.
140 changes: 20 additions & 120 deletions schemas/latest/dbt_yml_files-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,9 @@
"default": null
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -620,16 +613,9 @@
"type": "string"
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"label": {
"title": "Label",
Expand Down Expand Up @@ -750,16 +736,9 @@
"type": "string"
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"label": {
"title": "Label",
Expand Down Expand Up @@ -874,16 +853,9 @@
"type": "string"
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"label": {
"title": "Label",
Expand Down Expand Up @@ -1389,16 +1361,6 @@
],
"title": "Input",
"type": "string"
},
"additionalProperties": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Additionalproperties"
}
},
"title": "GivenItem",
Expand Down Expand Up @@ -1791,16 +1753,9 @@
"default": null
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"latest_version": {
"anyOf": [
Expand Down Expand Up @@ -1982,16 +1937,9 @@
"type": "string"
},
"sql_header": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Sql Header"
"title": "Sql Header",
"type": "string"
},
"target_lag": {
"default": "",
Expand Down Expand Up @@ -2263,16 +2211,6 @@
}
],
"default": null
},
"additionalProperties": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Additionalproperties"
}
},
"title": "QueryParams",
Expand Down Expand Up @@ -2337,16 +2275,9 @@
"type": "string"
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"label": {
"title": "Label",
Expand Down Expand Up @@ -2565,16 +2496,9 @@
"default": null
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"tests": {
"anyOf": [
Expand Down Expand Up @@ -2798,16 +2722,9 @@
"type": "string"
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"label": {
"title": "Label",
Expand Down Expand Up @@ -2921,16 +2838,9 @@
"default": null
},
"group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "",
"title": "Group"
"title": "Group",
"type": "string"
},
"meta": {
"anyOf": [
Expand Down Expand Up @@ -3683,16 +3593,6 @@
}
],
"default": null
},
"additionalProperties": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Additionalproperties"
}
},
"required": [
Expand Down
12 changes: 6 additions & 6 deletions src/latest/dbt_yml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class Analysis(BaseModel):
columns: Optional[List[Column]] = None
config: Optional[Config] = None
docs: Optional[DocsConfig] = None
group: Optional[str] = ""
group: str = ""


class Exposure(BaseModel):
Expand Down Expand Up @@ -451,7 +451,7 @@ class MetricBase(BaseModel):
name: str = Field(..., pattern="(?!.*__).*^[a-z][a-z0-9_]*[a-z0-9]$")
description: str = ""
filter: str = ""
group: Optional[str] = ""
group: str = ""
label: str


Expand Down Expand Up @@ -661,7 +661,7 @@ class ModelConfigs(BaseModel):
on_configuration_change: OnConfigurationChange = OnConfigurationChange.fail
on_schema_change: Optional[OnSchemaChange] = OnSchemaChange.append_new_columns
snowflake_warehouse: str = ""
sql_header: Optional[str] = ""
sql_header: str = ""
target_lag: str = Field(
"", pattern="^(?:downstream|\\d+\\s*(?:seconds|minutes|hours|days))$"
)
Expand Down Expand Up @@ -893,7 +893,7 @@ class Model(BaseModel):
data_tests: Optional[List[DataTests]] = None
deprecation_date: str = ""
docs: Optional[DocsConfig] = None
group: Optional[str] = ""
group: str = ""
latest_version: Optional[float] = None
meta: Optional[Dict[str, Any]] = None
tests: Optional[List[DataTests]] = None
Expand All @@ -909,7 +909,7 @@ class Seed(BaseModel):
columns: Optional[List[ColumnProperties]] = None
config: Optional[SeedConfig] = Field(None, title="Seed Config")
docs: Optional[DocsConfig] = None
group: Optional[str] = ""
group: str = ""
tests: Optional[List[DataTests]] = None


Expand All @@ -923,7 +923,7 @@ class Snapshot(BaseModel):
config: Optional[SnapshotConfig] = Field(None, title="Snapshot Config")
data_tests: Optional[List[DataTests]] = None
docs: Optional[DocsConfig] = None
group: Optional[str] = ""
group: str = ""
meta: Optional[Dict[str, Any]] = None
tests: Optional[List[DataTests]] = None

Expand Down

0 comments on commit d64c11a

Please sign in to comment.