Skip to content

Commit

Permalink
feat: Add pattern, contentMediaType, and contentEncoding to Sch…
Browse files Browse the repository at this point in the history
…ema data class (#1581)

add pattern, contentMediaType, contentEncoding to Schema data class

Co-authored-by: Edgar R. M <[email protected]>
  • Loading branch information
BuzzCutNorman and edgarrmondragon authored Apr 10, 2023
1 parent 6dc1c49 commit 1867c2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions singer_sdk/_singerlib/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1867c2b

Please sign in to comment.