-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: Add pattern
, contentMediaType
, and contentEncoding
to Schema data class
#1581
feat: Add pattern
, contentMediaType
, and contentEncoding
to Schema data class
#1581
Conversation
@BuzzCutNorman - Thank you for your contribution! @edgarrmondragon - This is a bit out of my knowledge area. Do you mind reviewing and adding your own context/insight here? Thanks! |
Codecov Report
@@ Coverage Diff @@
## main #1581 +/- ##
=======================================
Coverage 85.60% 85.61%
=======================================
Files 57 57
Lines 4717 4720 +3
Branches 801 801
=======================================
+ Hits 4038 4041 +3
Misses 487 487
Partials 192 192
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @BuzzCutNorman!
This looks good, and it's a simple, stable improvement.
However, the SDK can't produce these JSON schema types yet and I assume that would require tricky changes to the StringType
base class so I'm happy to leave those for a future PR.
That means that currently, the only way to get a string type with pattern
set, is to customize the Singer catalog for the tap.
Hey @edgarrmondragon ! Thanks 🙏for approving this PR. I am very excited to see these in the SDK. 😃 I am working mainly with the SQL taps and targets and have found I can generate and translate
I agree it is tricky to expand the |
I would like to propose adding three new variables to the
singer_sdk._singerlib.Schema
data class andSTANDARD_KEYS
list.pattern
contentMediaType
contentEncoding
These JSON Schema variables are avaiable in JSON Schema Draft 7 and are defined at the following links.
https://json-schema.org/understanding-json-schema/reference/string.html#regular-expressions
https://json-schema.org/understanding-json-schema/reference/non_json_data.html#contentmediatype
https://json-schema.org/understanding-json-schema/reference/non_json_data.html#contentencoding
This addition of these variables will assist in resolving the following issue.
BuzzCutNorman/tap-mssql#32
BuzzCutNorman/tap-mssql#33
BuzzCutNorman/tap-mssql#34
📚 Documentation preview 📚: https://meltano-sdk--1581.org.readthedocs.build/en/1581/