Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(taps): Ensure default property is passed to SCHEMA messages #2015

Merged
merged 4 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions singer_sdk/_singerlib/schema.py
prakharcode marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"minLength",
"format",
"type",
"default",
"required",
"enum",
"pattern",
Expand All @@ -47,6 +48,7 @@ class Schema:
"""

type: str | list[str] | None = None # noqa: A003
default: t.Any | None = None
properties: dict | None = None
items: t.Any | None = None
description: str | None = None
Expand Down
8 changes: 4 additions & 4 deletions tests/_singerlib/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from singer_sdk._singerlib import Schema, resolve_schema_references

STRING_SCHEMA = Schema(type="string", maxLength=32)
STRING_DICT = {"type": "string", "maxLength": 32}
INTEGER_SCHEMA = Schema(type="integer", maximum=1000000)
INTEGER_DICT = {"type": "integer", "maximum": 1000000}
STRING_SCHEMA = Schema(type="string", maxLength=32, default="")
STRING_DICT = {"type": "string", "maxLength": 32, "default": ""}
INTEGER_SCHEMA = Schema(type="integer", maximum=1000000, default=0)
INTEGER_DICT = {"type": "integer", "maximum": 1000000, "default": 0}
ARRAY_SCHEMA = Schema(type="array", items=INTEGER_SCHEMA)
ARRAY_DICT = {"type": "array", "items": INTEGER_DICT}
OBJECT_SCHEMA = Schema(
Expand Down
Loading