From 1867c2b793649027cf6301097601a86484f2f73d Mon Sep 17 00:00:00 2001 From: Dan Norman Date: Mon, 10 Apr 2023 10:31:43 -0600 Subject: [PATCH] feat: Add `pattern`, `contentMediaType`, and `contentEncoding` to Schema data class (#1581) add pattern, contentMediaType, contentEncoding to Schema data class Co-authored-by: Edgar R. M --- singer_sdk/_singerlib/schema.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/singer_sdk/_singerlib/schema.py b/singer_sdk/_singerlib/schema.py index 3b396f971..9ef615e0d 100644 --- a/singer_sdk/_singerlib/schema.py +++ b/singer_sdk/_singerlib/schema.py @@ -23,6 +23,9 @@ "type", "required", "enum", + "pattern", + "contentMediaType", + "contentEncoding", # These are NOT simple keys (they can contain schemas themselves). We could # consider adding extra handling to them. "additionalProperties", @@ -61,6 +64,9 @@ class Schema: required: list[str] | None = None enum: list[t.Any] | None = None title: str | None = None + pattern: str | None = None + contentMediaType: str | None = None # noqa: N815 + contentEncoding: str | None = None # noqa: N815 def to_dict(self) -> dict[str, t.Any]: """Return the raw JSON Schema as a (possibly nested) dict.